PolyFEM
|
#include <GenericProblem.hpp>
Public Member Functions | |
GenericScalarProblem (const std::string &name) | |
void | set_units (const assembler::Assembler &assembler, const Units &units) override |
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 | 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 override |
void | initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override |
void | dirichlet_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const double t, Eigen::MatrixXd &val) const override |
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 override |
bool | is_nodal_dirichlet_boundary (const int n_id, const int tag) override |
bool | is_nodal_neumann_boundary (const int n_id, const int tag) override |
bool | has_nodal_dirichlet () override |
bool | has_nodal_neumann () override |
void | update_nodes (const Eigen::VectorXi &in_node_to_node) override |
bool | has_exact_sol () const override |
bool | is_scalar () const override |
bool | is_time_dependent () const override |
void | set_time_dependent (const bool val) |
bool | is_constant_in_time () const override |
bool | might_have_no_dirichlet () override |
void | set_parameters (const json ¶ms) override |
void | exact (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override |
void | exact_grad (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override |
void | clear () override |
Public Member Functions inherited from polyfem::assembler::Problem | |
Problem (const std::string &name) | |
virtual | ~Problem () |
virtual void | init (const mesh::Mesh &mesh) |
const std::string & | name () 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 | 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 | 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) |
Private Attributes | |
std::vector< ScalarBCValue > | neumann_ |
std::vector< ScalarBCValue > | dirichlet_ |
std::vector< std::pair< int, utils::ExpressionValue > > | initial_solution_ |
std::map< int, ScalarBCValue > | nodal_dirichlet_ |
std::map< int, ScalarBCValue > | nodal_neumann_ |
std::vector< Eigen::MatrixXd > | nodal_dirichlet_mat_ |
utils::ExpressionValue | rhs_ |
utils::ExpressionValue | exact_ |
std::array< utils::ExpressionValue, 3 > | exact_grad_ |
bool | is_all_ |
bool | has_exact_ = false |
bool | has_exact_grad_ = false |
bool | is_time_dept_ = false |
Additional Inherited Members | |
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_ |
Definition at line 122 of file GenericProblem.hpp.
polyfem::assembler::GenericScalarProblem::GenericScalarProblem | ( | const std::string & | name | ) |
Definition at line 888 of file GenericProblem.cpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1325 of file GenericProblem.cpp.
References polyfem::utils::ExpressionValue::clear(), clear(), dirichlet_, exact_, exact_grad_, has_exact_, has_exact_grad_, is_all_, is_time_dept_, neumann_, nodal_dirichlet_, nodal_dirichlet_mat_, nodal_neumann_, and rhs_.
Referenced by clear().
|
overridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 929 of file GenericProblem.cpp.
References polyfem::assembler::Problem::boundary_ids_, dirichlet_, polyfem::mesh::Mesh::get_boundary_id(), is_all_, and val.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1100 of file GenericProblem.cpp.
References polyfem::mesh::Mesh::get_node_id(), is_all_, nodal_dirichlet_, nodal_dirichlet_mat_, and val.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1007 of file GenericProblem.cpp.
References exact_, has_exact_sol(), val, x, y, and z.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1020 of file GenericProblem.cpp.
References exact_grad_, has_exact_grad_, val, x, y, and z.
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 143 of file GenericProblem.hpp.
References has_exact_.
Referenced by exact().
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1164 of file GenericProblem.cpp.
References nodal_dirichlet_mat_.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1169 of file GenericProblem.cpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 975 of file GenericProblem.cpp.
References polyfem::mesh::Mesh::get_body_id(), initial_solution_, and val.
|
inlineoverridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 147 of file GenericProblem.hpp.
References is_time_dept_.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1142 of file GenericProblem.cpp.
References nodal_dirichlet_, and nodal_dirichlet_mat_.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1159 of file GenericProblem.cpp.
References nodal_neumann_.
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 129 of file GenericProblem.hpp.
References polyfem::utils::ExpressionValue::is_zero(), and rhs_.
Referenced by rhs().
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 144 of file GenericProblem.hpp.
|
inlineoverridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 145 of file GenericProblem.hpp.
References is_time_dept_.
|
inlineoverridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 148 of file GenericProblem.hpp.
References is_all_.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 955 of file GenericProblem.cpp.
References polyfem::mesh::Mesh::get_boundary_id(), neumann_, polyfem::assembler::Problem::neumann_boundary_ids_, val, x, y, and z.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1136 of file GenericProblem.cpp.
References polyfem::log_and_throw_error().
|
overridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 913 of file GenericProblem.cpp.
References is_rhs_zero(), rhs_, val, x, y, and z.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1186 of file GenericProblem.cpp.
References polyfem::assembler::Problem::boundary_ids_, polyfem::utils::Interpolation::build(), dirichlet_, exact_, exact_grad_, has_exact_, has_exact_grad_, polyfem::utils::ExpressionValue::init(), polyfem::assembler::Problem::init(), initial_solution_, is_all_, polyfem::utils::is_param_valid(), is_time_dept_, polyfem::log_and_throw_error(), neumann_, polyfem::assembler::Problem::neumann_boundary_ids_, nodal_dirichlet_, nodal_dirichlet_mat_, polyfem::io::read_matrix(), polyfem::utils::resolve_path(), and rhs_.
|
inline |
Definition at line 146 of file GenericProblem.hpp.
References is_time_dept_, and val.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 893 of file GenericProblem.cpp.
References dirichlet_, exact_, exact_grad_, initial_solution_, neumann_, rhs_, and polyfem::utils::ExpressionValue::set_unit_type().
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 1174 of file GenericProblem.cpp.
References nodal_dirichlet_mat_.
|
private |
Definition at line 159 of file GenericProblem.hpp.
Referenced by clear(), dirichlet_bc(), set_parameters(), and set_units().
|
private |
Definition at line 167 of file GenericProblem.hpp.
Referenced by clear(), exact(), set_parameters(), and set_units().
|
private |
Definition at line 168 of file GenericProblem.hpp.
Referenced by clear(), exact_grad(), set_parameters(), and set_units().
|
private |
Definition at line 170 of file GenericProblem.hpp.
Referenced by clear(), has_exact_sol(), and set_parameters().
|
private |
Definition at line 171 of file GenericProblem.hpp.
Referenced by clear(), exact_grad(), and set_parameters().
|
private |
Definition at line 160 of file GenericProblem.hpp.
Referenced by initial_solution(), set_parameters(), and set_units().
|
private |
Definition at line 169 of file GenericProblem.hpp.
Referenced by clear(), dirichlet_bc(), dirichlet_nodal_value(), might_have_no_dirichlet(), and set_parameters().
|
private |
Definition at line 172 of file GenericProblem.hpp.
Referenced by clear(), is_constant_in_time(), is_time_dependent(), set_parameters(), and set_time_dependent().
|
private |
Definition at line 158 of file GenericProblem.hpp.
Referenced by clear(), neumann_bc(), set_parameters(), and set_units().
|
private |
Definition at line 162 of file GenericProblem.hpp.
Referenced by clear(), dirichlet_nodal_value(), is_nodal_dirichlet_boundary(), and set_parameters().
|
private |
Definition at line 164 of file GenericProblem.hpp.
Referenced by clear(), dirichlet_nodal_value(), has_nodal_dirichlet(), is_nodal_dirichlet_boundary(), set_parameters(), and update_nodes().
|
private |
Definition at line 163 of file GenericProblem.hpp.
Referenced by clear(), and is_nodal_neumann_boundary().
|
private |
Definition at line 166 of file GenericProblem.hpp.
Referenced by clear(), is_rhs_zero(), rhs(), set_parameters(), and set_units().