PolyFEM
|
#include <PointBasedProblem.hpp>
Classes | |
class | BCValue |
Public Member Functions | |
PointBasedTensorProblem (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 | 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 |
bool | has_exact_sol () const override |
bool | is_scalar () const override |
void | set_parameters (const json ¶ms) override |
void | add_constant (const int bc_tag, const Eigen::Vector3d &value) |
void | add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const Eigen::MatrixXi &tri, const int coord) |
void | add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const std::string &rbf, const double eps, const int coord) |
void | add_constant (const int bc_tag, const Eigen::Vector3d &value, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false) |
void | add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const Eigen::MatrixXi &tri, const int coord, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false) |
void | add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const std::string &rbf, const double eps, const int coord, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false) |
bool | is_dimension_dirichet (const int tag, const int dim) const override |
bool | all_dimensions_dirichlet () 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 | 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 bool | is_time_dependent () const |
virtual bool | is_constant_in_time () const |
virtual void | initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) 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 | might_have_no_dirichlet () |
virtual bool | is_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) 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 | |
bool | initialized_ = false |
bool | all_dimensions_dirichlet_ = true |
double | rhs_ |
double | scaling_ |
Eigen::Vector3d | translation_ |
std::vector< BCValue > | bc_ |
std::vector< BCValue > | neumann_bc_ |
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 16 of file PointBasedProblem.hpp.
polyfem::problem::PointBasedTensorProblem::PointBasedTensorProblem | ( | const std::string & | name | ) |
Definition at line 109 of file PointBasedProblem.cpp.
References translation_.
|
inline |
Definition at line 108 of file PointBasedProblem.hpp.
References add_constant().
Referenced by add_constant().
void polyfem::problem::PointBasedTensorProblem::add_constant | ( | const int | bc_tag, |
const Eigen::Vector3d & | value, | ||
const Eigen::Matrix< bool, 3, 1 > & | dd, | ||
const bool | is_neumann = false |
||
) |
Definition at line 158 of file PointBasedProblem.cpp.
References all_dimensions_dirichlet_, bc_, polyfem::assembler::Problem::boundary_ids_, neumann_bc_, and polyfem::assembler::Problem::neumann_boundary_ids_.
|
inline |
Definition at line 115 of file PointBasedProblem.hpp.
References add_function().
Referenced by add_function(), and add_function().
void polyfem::problem::PointBasedTensorProblem::add_function | ( | const int | bc_tag, |
const Eigen::MatrixXd & | func, | ||
const Eigen::MatrixXd & | pts, | ||
const Eigen::MatrixXi & | tri, | ||
const int | coord, | ||
const Eigen::Matrix< bool, 3, 1 > & | dd, | ||
const bool | is_neumann = false |
||
) |
Definition at line 175 of file PointBasedProblem.cpp.
References all_dimensions_dirichlet_, bc_, polyfem::assembler::Problem::boundary_ids_, neumann_bc_, and polyfem::assembler::Problem::neumann_boundary_ids_.
|
inline |
Definition at line 122 of file PointBasedProblem.hpp.
References add_function().
void polyfem::problem::PointBasedTensorProblem::add_function | ( | const int | bc_tag, |
const Eigen::MatrixXd & | func, | ||
const Eigen::MatrixXd & | pts, | ||
const std::string & | rbf, | ||
const double | eps, | ||
const int | coord, | ||
const Eigen::Matrix< bool, 3, 1 > & | dd, | ||
const bool | is_neumann = false |
||
) |
Definition at line 193 of file PointBasedProblem.cpp.
References all_dimensions_dirichlet_, bc_, polyfem::assembler::Problem::boundary_ids_, neumann_bc_, and polyfem::assembler::Problem::neumann_boundary_ids_.
|
inlineoverridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 134 of file PointBasedProblem.hpp.
References all_dimensions_dirichlet_.
Referenced by polyfem::problem::PointBasedTensorProblem::BCValue::init(), and is_dimension_dirichet().
|
overridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 120 of file PointBasedProblem.cpp.
References bc_, polyfem::assembler::Problem::boundary_ids_, polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_boundary_id(), scaling_, translation_, and val.
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 103 of file PointBasedProblem.hpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 217 of file PointBasedProblem.cpp.
References all_dimensions_dirichlet(), bc_, and polyfem::assembler::Problem::boundary_ids_.
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 98 of file PointBasedProblem.hpp.
References rhs_.
|
inlineoverridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 104 of file PointBasedProblem.hpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 139 of file PointBasedProblem.cpp.
References polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_boundary_id(), neumann_bc_, polyfem::assembler::Problem::neumann_boundary_ids_, scaling_, translation_, and val.
|
overridevirtual |
Implements polyfem::assembler::Problem.
Definition at line 115 of file PointBasedProblem.cpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Problem.
Definition at line 234 of file PointBasedProblem.cpp.
References all_dimensions_dirichlet_, bc_, polyfem::assembler::Problem::boundary_ids_, initialized_, neumann_bc_, polyfem::assembler::Problem::neumann_boundary_ids_, rhs_, scaling_, and translation_.
|
private |
Definition at line 138 of file PointBasedProblem.hpp.
Referenced by add_constant(), add_function(), add_function(), all_dimensions_dirichlet(), and set_parameters().
|
private |
Definition at line 142 of file PointBasedProblem.hpp.
Referenced by add_constant(), add_function(), add_function(), dirichlet_bc(), is_dimension_dirichet(), and set_parameters().
|
private |
Definition at line 137 of file PointBasedProblem.hpp.
Referenced by set_parameters().
|
private |
Definition at line 143 of file PointBasedProblem.hpp.
Referenced by add_constant(), add_function(), add_function(), neumann_bc(), and set_parameters().
|
private |
Definition at line 139 of file PointBasedProblem.hpp.
Referenced by is_rhs_zero(), rhs(), and set_parameters().
|
private |
Definition at line 140 of file PointBasedProblem.hpp.
Referenced by dirichlet_bc(), neumann_bc(), and set_parameters().
|
private |
Definition at line 141 of file PointBasedProblem.hpp.
Referenced by dirichlet_bc(), neumann_bc(), PointBasedTensorProblem(), and set_parameters().