PolyFEM
Loading...
Searching...
No Matches
polyfem::problem::Flow Class Reference

#include <StokesProblem.hpp>

Inheritance diagram for polyfem::problem::Flow:
[legend]
Collaboration diagram for polyfem::problem::Flow:
[legend]

Public Member Functions

 Flow (const std::string &name)
 
void rhs (const assembler::Assembler &assembler, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
bool is_rhs_zero () const override
 
void dirichlet_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
void set_parameters (const json &params) override
 
- Public Member Functions inherited from polyfem::problem::TimeDepentendStokesProblem
 TimeDepentendStokesProblem (const std::string &name)
 
virtual bool has_exact_sol () const override
 
bool is_scalar () const override
 
bool is_time_dependent () const override
 
bool is_constant_in_time () const override
 
virtual void initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override
 
- Public Member Functions inherited from polyfem::assembler::Problem
 Problem (const std::string &name)
 
virtual void set_units (const assembler::Assembler &assembler, const Units &units)
 
virtual ~Problem ()
 
virtual void init (const mesh::Mesh &mesh)
 
const std::string & name () const
 
virtual void neumann_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const
 
virtual void pressure_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const
 
virtual double pressure_cavity_bc (const int boundary_id, const double t) const
 
virtual bool is_boundary_pressure (const int boundary_id) const
 
virtual void dirichlet_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const double t, Eigen::MatrixXd &val) const
 
virtual void neumann_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const Eigen::MatrixXd &normal, const double t, Eigen::MatrixXd &val) const
 
virtual bool is_nodal_dirichlet_boundary (const int n_id, const int tag)
 
virtual bool is_nodal_neumann_boundary (const int n_id, const int tag)
 
virtual bool has_nodal_dirichlet ()
 
virtual bool has_nodal_neumann ()
 
virtual void exact (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const
 
virtual void exact_grad (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const
 
virtual void clear ()
 
virtual void initial_velocity (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_acceleration (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_density (const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual bool might_have_no_dirichlet ()
 
virtual bool is_dimension_dirichet (const int tag, const int dim) const
 
virtual bool is_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) const
 
virtual bool all_dimensions_dirichlet () const
 
void setup_bc (const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< basis::ElementBases > &pressure_bases, std::vector< mesh::LocalBoundary > &local_boundary, std::vector< int > &boundary_nodes, std::vector< mesh::LocalBoundary > &local_neumann_boundary, std::vector< mesh::LocalBoundary > &local_pressure_boundary, std::unordered_map< int, std::vector< mesh::LocalBoundary > > &local_pressure_cavity, std::vector< int > &pressure_boundary_nodes, std::vector< int > &dirichlet_nodes, std::vector< int > &neumann_nodes)
 
virtual void update_nodes (const Eigen::VectorXi &in_node_to_node)
 

Private Attributes

int inflow_
 
int outflow_
 
int flow_dir_
 
double inflow_amout_
 
double outflow_amout_
 

Additional Inherited Members

- Protected Attributes inherited from polyfem::problem::TimeDepentendStokesProblem
bool is_time_dependent_
 
- Protected Attributes inherited from polyfem::assembler::Problem
std::vector< int > boundary_ids_
 
std::vector< int > neumann_boundary_ids_
 
std::vector< int > normal_aligned_neumann_boundary_ids_
 
std::vector< int > pressure_boundary_ids_
 
std::vector< int > pressure_cavity_ids_
 
std::vector< int > splitting_pressure_boundary_ids_
 

Detailed Description

Definition at line 88 of file StokesProblem.hpp.

Constructor & Destructor Documentation

◆ Flow()

polyfem::problem::Flow::Flow ( const std::string &  name)

Member Function Documentation

◆ dirichlet_bc()

void polyfem::problem::Flow::dirichlet_bc ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  uv,
const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Implements polyfem::assembler::Problem.

Definition at line 258 of file StokesProblem.cpp.

References flow_dir_, polyfem::mesh::Mesh::get_boundary_id(), inflow_, inflow_amout_, polyfem::problem::TimeDepentendStokesProblem::is_time_dependent_, outflow_, outflow_amout_, and val.

Here is the call graph for this function:

◆ is_rhs_zero()

bool polyfem::problem::Flow::is_rhs_zero ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 94 of file StokesProblem.hpp.

◆ rhs()

void polyfem::problem::Flow::rhs ( const assembler::Assembler assembler,
const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Implements polyfem::assembler::Problem.

Definition at line 253 of file StokesProblem.cpp.

References val.

◆ set_parameters()

void polyfem::problem::Flow::set_parameters ( const json params)
overridevirtual

Reimplemented from polyfem::problem::TimeDepentendStokesProblem.

Definition at line 274 of file StokesProblem.cpp.

References polyfem::assembler::Problem::boundary_ids_, flow_dir_, inflow_, inflow_amout_, outflow_, outflow_amout_, polyfem::problem::TimeDepentendStokesProblem::set_parameters(), and polyfem::utils::StringUtils::split().

Here is the call graph for this function:

Member Data Documentation

◆ flow_dir_

int polyfem::problem::Flow::flow_dir_
private

Definition at line 104 of file StokesProblem.hpp.

Referenced by dirichlet_bc(), Flow(), and set_parameters().

◆ inflow_

int polyfem::problem::Flow::inflow_
private

Definition at line 101 of file StokesProblem.hpp.

Referenced by dirichlet_bc(), Flow(), and set_parameters().

◆ inflow_amout_

double polyfem::problem::Flow::inflow_amout_
private

Definition at line 106 of file StokesProblem.hpp.

Referenced by dirichlet_bc(), Flow(), and set_parameters().

◆ outflow_

int polyfem::problem::Flow::outflow_
private

Definition at line 102 of file StokesProblem.hpp.

Referenced by dirichlet_bc(), Flow(), and set_parameters().

◆ outflow_amout_

double polyfem::problem::Flow::outflow_amout_
private

Definition at line 107 of file StokesProblem.hpp.

Referenced by dirichlet_bc(), Flow(), and set_parameters().


The documentation for this class was generated from the following files: