|
PolyFEM
|
#include <Obstacle.hpp>
Classes | |
| class | Plane |
Public Member Functions | |
| Obstacle () | |
| virtual | ~Obstacle ()=default |
| void | append_mesh (const Eigen::MatrixXd &vertices, const Eigen::VectorXi &codim_vertices, const Eigen::MatrixXi &codim_edges, const Eigen::MatrixXi &faces, const json &displacement, const io::ResourceIO &resources, const Eigen::MatrixXi &tets=Eigen::MatrixXi()) |
| void | append_mesh_sequence (const std::vector< Eigen::MatrixXd > &vertices, const Eigen::VectorXi &codim_vertices, const Eigen::MatrixXi &codim_edges, const Eigen::MatrixXi &faces, const int fps, const Eigen::MatrixXi &tets=Eigen::MatrixXi()) |
| void | append_plane (const VectorNd &point, const VectorNd &normal) |
| int | n_vertices () const |
| int | n_edges () const |
| int | n_faces () const |
| int | n_tets () const |
| int | dim () const |
| int | ndof () const |
| const Eigen::MatrixXd & | v () const |
| const Eigen::VectorXi & | codim_v () const |
| const Eigen::MatrixXi & | f () const |
| const Eigen::MatrixXi & | e () const |
| const Eigen::MatrixXi & | tets () const |
| const Eigen::MatrixXi & | get_face_connectivity () const |
| const Eigen::MatrixXi & | get_edge_connectivity () const |
| const Eigen::VectorXi & | get_vertex_connectivity () const |
| const Eigen::MatrixXi & | get_tet_connectivity () const |
| void | change_displacement (const int oid, const Eigen::RowVector3d &val, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >()) |
| void | change_displacement (const int oid, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >()) |
| void | change_displacement (const int oid, const json &val, const io::ResourceIO &resources, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >()) |
| void | change_displacement (const int oid, const Eigen::RowVector3d &val, const std::string &interp="") |
| void | change_displacement (const int oid, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const std::string &interp="") |
| void | change_displacement (const int oid, const json &val, const io::ResourceIO &resources, const std::string &interp="") |
| void | update_displacement (const double t, Eigen::MatrixXd &sol) const |
| void | set_zero (Eigen::MatrixXd &sol) const |
| void | clear () |
| const std::vector< Plane > & | planes () const |
| void | set_units (const Units &units) |
Private Member Functions | |
| void | append_mesh (const Eigen::MatrixXd &vertices, const Eigen::VectorXi &codim_vertices, const Eigen::MatrixXi &codim_edges, const Eigen::MatrixXi &faces, const Eigen::MatrixXi &tets=Eigen::MatrixXi()) |
| void | change_displacement (const int oid, const json &val, const std::shared_ptr< utils::Interpolation > &interp, const io::ResourceIO &resources) |
Private Attributes | |
| int | dim_ |
| Eigen::MatrixXd | v_ |
| Eigen::VectorXi | codim_v_ |
| Eigen::MatrixXi | f_ |
| Eigen::MatrixXi | e_ |
| Eigen::MatrixXi | tets_ |
| Eigen::VectorXi | in_v_ |
| Eigen::MatrixXi | in_f_ |
| Eigen::MatrixXi | in_e_ |
| Eigen::MatrixXi | in_tets_ |
| std::vector< assembler::TensorBCValue > | displacements_ |
| std::vector< int > | endings_ |
| std::vector< Plane > | planes_ |
Definition at line 16 of file Obstacle.hpp.
| polyfem::mesh::Obstacle::Obstacle | ( | ) |
Definition at line 17 of file Obstacle.cpp.
References clear().
|
virtualdefault |
|
private |
| void polyfem::mesh::Obstacle::append_mesh | ( | const Eigen::MatrixXd & | vertices, |
| const Eigen::VectorXi & | codim_vertices, | ||
| const Eigen::MatrixXi & | codim_edges, | ||
| const Eigen::MatrixXi & | faces, | ||
| const json & | displacement, | ||
| const io::ResourceIO & | resources, | ||
| const Eigen::MatrixXi & | tets = Eigen::MatrixXi() |
||
| ) |
Definition at line 113 of file Obstacle.cpp.
References append_mesh(), polyfem::utils::Interpolation::build(), dim_, displacements_, faces, and tets().
Referenced by append_mesh(), append_mesh_sequence(), and polyfem::mesh::GeometryLoader::load_obstacles().
| void polyfem::mesh::Obstacle::append_mesh_sequence | ( | const std::vector< Eigen::MatrixXd > & | vertices, |
| const Eigen::VectorXi & | codim_vertices, | ||
| const Eigen::MatrixXi & | codim_edges, | ||
| const Eigen::MatrixXi & | faces, | ||
| const int | fps, | ||
| const Eigen::MatrixXi & | tets = Eigen::MatrixXi() |
||
| ) |
Definition at line 143 of file Obstacle.cpp.
References append_mesh(), dim_, displacements_, faces, tets(), x, y, and z.
Referenced by polyfem::mesh::GeometryLoader::load_obstacles().
Definition at line 183 of file Obstacle.cpp.
Referenced by polyfem::mesh::GeometryLoader::load_obstacles().
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const Eigen::RowVector3d & | val, | ||
| const std::shared_ptr< utils::Interpolation > & | interp = std::make_shared< utils::NoInterpolation >() |
||
| ) |
Referenced by change_displacement(), change_displacement(), and change_displacement().
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const Eigen::RowVector3d & | val, | ||
| const std::string & | interp = "" |
||
| ) |
Definition at line 192 of file Obstacle.cpp.
References polyfem::utils::Interpolation::build(), change_displacement(), and val.
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const json & | val, | ||
| const io::ResourceIO & | resources, | ||
| const std::shared_ptr< utils::Interpolation > & | interp = std::make_shared< utils::NoInterpolation >() |
||
| ) |
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const json & | val, | ||
| const io::ResourceIO & | resources, | ||
| const std::string & | interp = "" |
||
| ) |
Definition at line 200 of file Obstacle.cpp.
References polyfem::utils::Interpolation::build(), change_displacement(), and val.
|
private |
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> & | func, | ||
| const std::shared_ptr< utils::Interpolation > & | interp = std::make_shared< utils::NoInterpolation >() |
||
| ) |
| void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
| const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> & | func, | ||
| const std::string & | interp = "" |
||
| ) |
Definition at line 196 of file Obstacle.cpp.
References polyfem::utils::Interpolation::build(), and change_displacement().
| void polyfem::mesh::Obstacle::clear | ( | ) |
Definition at line 22 of file Obstacle.cpp.
References dim_, displacements_, e_, endings_, f_, in_e_, in_f_, in_tets_, in_v_, planes_, tets_, and v_.
Referenced by Obstacle(), and polyfem::varform::NonlinearElasticVarForm::reset().
|
inline |
Definition at line 46 of file Obstacle.hpp.
References codim_v_.
Referenced by polyfem::varform::NonlinearElasticVarForm::build_collision_mesh().
|
inline |
Definition at line 43 of file Obstacle.hpp.
References dim_.
Referenced by diff_elastic_energy.AMIPSEnergy::eval(), diff_elastic_energy.AMIPSEnergy::get_standard(), and ndof().
|
inline |
Definition at line 48 of file Obstacle.hpp.
References e_.
Referenced by polyfem::varform::NonlinearElasticVarForm::build_collision_mesh().
|
inline |
Definition at line 47 of file Obstacle.hpp.
References f_.
Referenced by polyfem::varform::NonlinearElasticVarForm::build_collision_mesh().
|
inline |
Definition at line 52 of file Obstacle.hpp.
References in_e_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 51 of file Obstacle.hpp.
References in_f_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 54 of file Obstacle.hpp.
References in_tets_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 53 of file Obstacle.hpp.
References in_v_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 40 of file Obstacle.hpp.
References e_.
|
inline |
Definition at line 41 of file Obstacle.hpp.
References f_.
|
inline |
Definition at line 42 of file Obstacle.hpp.
References tets_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 39 of file Obstacle.hpp.
References v_.
Referenced by polyfem::varform::ElasticVarForm::append_primary_output_fields(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::NonlinearElasticVarForm::build_collision_mesh(), polyfem::varform::ThermoElasticVarForm::build_forms(), polyfem::varform::ElasticVarForm::elastic_output_fields(), polyfem::varform::NonlinearElasticVarForm::n_obstacle_vertices(), ndof(), polyfem::io::OutGeometryData::save_volume(), and polyfem::assembler::RhsAssembler::time_bc().
|
inline |
Definition at line 44 of file Obstacle.hpp.
References dim(), and n_vertices().
Referenced by polyfem::varform::ElasticVarForm::append_primary_output_fields(), polyfem::varform::ElasticVarForm::elastic_output_fields(), polyfem::varform::DifferentiableNonlinearElasticVarForm::init_forms(), and polyfem::assembler::RhsAssembler::time_bc().
|
inline |
Definition at line 70 of file Obstacle.hpp.
References planes_.
| void polyfem::mesh::Obstacle::set_units | ( | const Units & | units | ) |
Definition at line 269 of file Obstacle.cpp.
References displacements_, and polyfem::Units::length().
Referenced by polyfem::mesh::GeometryLoader::load_obstacles().
| void polyfem::mesh::Obstacle::set_zero | ( | Eigen::MatrixXd & | sol | ) | const |
Definition at line 263 of file Obstacle.cpp.
|
inline |
Definition at line 49 of file Obstacle.hpp.
References tets_.
Referenced by append_mesh(), append_mesh(), and append_mesh_sequence().
| void polyfem::mesh::Obstacle::update_displacement | ( | const double | t, |
| Eigen::MatrixXd & | sol | ||
| ) | const |
Definition at line 236 of file Obstacle.cpp.
References dim_, displacements_, endings_, and v_.
|
inline |
Definition at line 45 of file Obstacle.hpp.
References v_.
Referenced by polyfem::varform::ElasticVarForm::append_primary_output_fields(), polyfem::varform::NonlinearElasticVarForm::build_collision_mesh(), polyfem::varform::ElasticVarForm::elastic_output_fields(), and polyfem::io::OutGeometryData::save_volume().
|
private |
Definition at line 89 of file Obstacle.hpp.
Referenced by append_mesh(), and codim_v().
|
private |
Definition at line 87 of file Obstacle.hpp.
Referenced by append_mesh(), append_mesh(), append_mesh_sequence(), append_plane(), clear(), dim(), set_zero(), and update_displacement().
|
private |
Definition at line 99 of file Obstacle.hpp.
Referenced by append_mesh(), append_mesh_sequence(), clear(), set_units(), and update_displacement().
|
private |
Definition at line 91 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), e(), and n_edges().
|
private |
Definition at line 101 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and update_displacement().
|
private |
Definition at line 90 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), f(), and n_faces().
|
private |
Definition at line 96 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_edge_connectivity().
|
private |
Definition at line 95 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_face_connectivity().
|
private |
Definition at line 97 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_tet_connectivity().
|
private |
Definition at line 94 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_vertex_connectivity().
|
private |
Definition at line 103 of file Obstacle.hpp.
Referenced by append_plane(), clear(), and planes().
|
private |
Definition at line 92 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), n_tets(), and tets().
|
private |
Definition at line 88 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), n_vertices(), set_zero(), update_displacement(), and v().