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) |
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) |
void | append_plane (const VectorNd &point, const VectorNd &normal) |
int | n_vertices () const |
int | n_edges () const |
int | n_faces () 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 & | get_face_connectivity () const |
const Eigen::MatrixXi & | get_edge_connectivity () const |
const Eigen::VectorXi & | get_vertex_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 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 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) |
Private Attributes | |
int | dim_ |
Eigen::MatrixXd | v_ |
Eigen::VectorXi | codim_v_ |
Eigen::MatrixXi | f_ |
Eigen::MatrixXi | e_ |
Eigen::VectorXi | in_v_ |
Eigen::MatrixXi | in_f_ |
Eigen::MatrixXi | in_e_ |
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 | ||
) |
Definition at line 96 of file Obstacle.cpp.
References append_mesh(), polyfem::utils::Interpolation::build(), dim_, displacements_, and faces.
Referenced by append_mesh(), append_mesh_sequence(), and polyfem::mesh::read_obstacle_geometry().
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 | ||
) |
Definition at line 124 of file Obstacle.cpp.
References append_mesh(), dim_, displacements_, faces, x, y, and z.
Referenced by polyfem::mesh::read_obstacle_geometry().
Definition at line 163 of file Obstacle.cpp.
Referenced by polyfem::mesh::read_obstacle_geometry().
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 172 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 std::shared_ptr< utils::Interpolation > & | interp = std::make_shared< utils::NoInterpolation >() |
||
) |
void polyfem::mesh::Obstacle::change_displacement | ( | const int | oid, |
const json & | val, | ||
const std::string & | interp = "" |
||
) |
Definition at line 180 of file Obstacle.cpp.
References polyfem::utils::Interpolation::build(), change_displacement(), and val.
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 176 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_v_, planes_, and v_.
Referenced by Obstacle(), and polyfem::State::reset_mesh().
|
inline |
Definition at line 42 of file Obstacle.hpp.
References codim_v_.
Referenced by polyfem::State::build_collision_mesh().
|
inline |
Definition at line 39 of file Obstacle.hpp.
References dim_.
Referenced by ndof().
|
inline |
Definition at line 44 of file Obstacle.hpp.
References e_.
Referenced by polyfem::State::build_collision_mesh(), polyfem::mesh::LocalMesh< M >::LocalMesh(), and polyfem::mesh::Remesher::write_mesh().
|
inline |
Definition at line 43 of file Obstacle.hpp.
References f_.
Referenced by polyfem::State::build_collision_mesh(), polyfem::mesh::LocalMesh< M >::LocalMesh(), and polyfem::mesh::Remesher::write_mesh().
|
inline |
Definition at line 47 of file Obstacle.hpp.
References in_e_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 46 of file Obstacle.hpp.
References in_f_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 48 of file Obstacle.hpp.
References in_v_.
Referenced by polyfem::io::OutGeometryData::save_volume().
|
inline |
Definition at line 37 of file Obstacle.hpp.
References e_.
Referenced by polyfem::mesh::LocalMesh< M >::LocalMesh(), and polyfem::mesh::Remesher::write_mesh().
|
inline |
Definition at line 38 of file Obstacle.hpp.
References f_.
Referenced by polyfem::mesh::LocalMesh< M >::LocalMesh().
|
inline |
Definition at line 36 of file Obstacle.hpp.
References v_.
Referenced by polyfem::State::build_basis(), polyfem::State::build_collision_mesh(), polyfem::State::build_mesh_matrices(), polyfem::mesh::LocalRelaxationData< M >::init_boundary_conditions(), polyfem::State::is_obstacle_vertex(), polyfem::mesh::LocalMesh< M >::LocalMesh(), ndof(), polyfem::mesh::Remesher::project_quantities(), polyfem::State::remesh(), polyfem::io::OutGeometryData::save_volume(), polyfem::io::OutGeometryData::save_volume_vector_field(), and polyfem::assembler::RhsAssembler::time_bc().
|
inline |
Definition at line 40 of file Obstacle.hpp.
References dim(), and n_vertices().
Referenced by polyfem::State::init_homogenization_solve(), polyfem::State::init_nonlinear_tensor_solve(), polyfem::mesh::Remesher::project_quantities(), polyfem::io::OutGeometryData::save_volume(), polyfem::io::OutGeometryData::save_volume_vector_field(), and polyfem::assembler::RhsAssembler::time_bc().
|
inline |
Definition at line 64 of file Obstacle.hpp.
References planes_.
void polyfem::mesh::Obstacle::set_units | ( | const Units & | units | ) |
Definition at line 245 of file Obstacle.cpp.
References displacements_, and polyfem::Units::length().
Referenced by polyfem::mesh::read_obstacle_geometry().
void polyfem::mesh::Obstacle::set_zero | ( | Eigen::MatrixXd & | sol | ) | const |
Definition at line 239 of file Obstacle.cpp.
void polyfem::mesh::Obstacle::update_displacement | ( | const double | t, |
Eigen::MatrixXd & | sol | ||
) | const |
Definition at line 212 of file Obstacle.cpp.
References dim_, displacements_, endings_, and v_.
|
inline |
Definition at line 41 of file Obstacle.hpp.
References v_.
Referenced by polyfem::State::build_collision_mesh(), polyfem::mesh::LocalMesh< M >::LocalMesh(), and polyfem::io::OutGeometryData::save_volume().
|
private |
Definition at line 77 of file Obstacle.hpp.
Referenced by append_mesh(), and codim_v().
|
private |
Definition at line 75 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 85 of file Obstacle.hpp.
Referenced by append_mesh(), append_mesh_sequence(), clear(), set_units(), and update_displacement().
|
private |
Definition at line 79 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), e(), and n_edges().
|
private |
Definition at line 87 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and update_displacement().
|
private |
Definition at line 78 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), f(), and n_faces().
|
private |
Definition at line 83 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_edge_connectivity().
|
private |
Definition at line 82 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_face_connectivity().
|
private |
Definition at line 81 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), and get_vertex_connectivity().
|
private |
Definition at line 89 of file Obstacle.hpp.
Referenced by append_plane(), clear(), and planes().
|
private |
Definition at line 76 of file Obstacle.hpp.
Referenced by append_mesh(), clear(), n_vertices(), set_zero(), update_displacement(), and v().