Public Member Functions | |
ISMesh (std::vector< vec3 > &points, std::vector< int > &tets, const std::vector< int > &tet_labels) | |
ISMesh (const ISMesh &mesh) | |
unsigned int | get_no_nodes () const |
unsigned int | get_no_edges () const |
unsigned int | get_no_faces () const |
unsigned int | get_no_tets () const |
unsigned int | get_max_node_key () const |
unsigned int | get_max_edge_key () const |
unsigned int | get_max_face_key () const |
unsigned int | get_max_tet_key () const |
std::shared_ptr< Geometry > | get_subdomain () |
void | clear_subdomain () |
void | set_subdomain (std::shared_ptr< Geometry > subdomain) |
unsigned int | get_number_of_threads () const |
void | set_number_of_threads (unsigned int m_number_of_threads) |
std::vector< TetrahedronKey > | find_par_tet (std::function< bool(Tetrahedron &)> include) |
std::vector< FaceKey > | find_par_face (std::function< bool(Face &)> include) |
std::vector< EdgeKey > | find_par_edge (std::function< bool(Edge &)> include) |
std::vector< NodeKey > | find_par_node (std::function< bool(Node &)> include) |
template<typename key_type , typename value_type > | |
std::vector< key_type > | find_par (std::function< bool(value_type &)> include) |
template<typename value_type > | |
void | for_each_par (std::function< void(value_type &, int)> fn) |
template<typename simplex_type , typename return_type > | |
return_type | map_reduce_par (std::function< return_type(simplex_type &)> map_fn, std::function< return_type(return_type, return_type)> reduce_fn, return_type default_value={}) |
template<typename value_type > | |
void | for_each_par_sp (double partitionsize, int dimension, std::function< void(value_type &node, int threadid)> fn) |
NodeIterator | nodes () const |
EdgeIterator | edges () const |
FaceIterator | faces () const |
TetrahedronIterator | tetrahedra () const |
void | set_label (const TetrahedronKey &tid, int label) |
Node & | get (const NodeKey &nid) |
Edge & | get (const EdgeKey &eid) |
Face & | get (const FaceKey &fid) |
Tetrahedron & | get (const TetrahedronKey &tid) |
const Node & | get (const NodeKey &nid) const |
const Edge & | get (const EdgeKey &eid) const |
const Face & | get (const FaceKey &fid) const |
const Tetrahedron & | get (const TetrahedronKey &tid) const |
SimplexSet< NodeKey > | get_sorted_nodes (const FaceKey &fid, const TetrahedronKey &tid) |
SimplexSet< NodeKey > | get_sorted_nodes (const FaceKey &fid) |
template<typename key_type > | |
SimplexSet< NodeKey > | get_nodes (const SimplexSet< key_type > &keys) |
template<typename key_type > | |
SimplexSet< EdgeKey > | get_edges (const SimplexSet< key_type > &keys) |
template<typename key_type > | |
SimplexSet< FaceKey > | get_faces (const SimplexSet< key_type > &keys) |
template<typename key_type > | |
SimplexSet< TetrahedronKey > | get_tets (const SimplexSet< key_type > &keys) |
NodeKey | get_node (const EdgeKey &eid1, const EdgeKey &eid2) |
NodeKey | get_node (const EdgeKey &eid, const NodeKey &nid) |
EdgeKey | get_edge (const NodeKey &nid1, const NodeKey &nid2) |
EdgeKey | get_edge (const FaceKey &fid1, const FaceKey &fid2) |
FaceKey | get_face (const NodeKey &nid1, const NodeKey &nid2, const NodeKey &nid3) |
FaceKey | get_face (const TetrahedronKey &tid1, const TetrahedronKey &tid2) |
TetrahedronKey | get_tet (const TetrahedronKey &tid, const FaceKey &fid) |
std::vector< vec3 > | get_pos (const SimplexSet< NodeKey > &nids) |
bool | exists (const TetrahedronKey &t) |
bool | exists (const FaceKey &f) |
bool | exists (const EdgeKey &e) |
bool | exists (const NodeKey &n) |
bool | excluded (const TetrahedronKey &t) |
bool | excluded (const FaceKey &f) |
bool | excluded (const EdgeKey &e) |
bool | excluded (const NodeKey &n) |
bool | is_clockwise_order (const NodeKey &nid, SimplexSet< NodeKey > &nids) |
void | orient_cc (const NodeKey &nid, SimplexSet< NodeKey > &nids) |
bool | is_inverted (const TetrahedronKey &tid) |
bool | is_inverted_destination (const TetrahedronKey &tid) |
NodeKey | insert_node (const vec3 &p) |
EdgeKey | insert_edge (NodeKey node1, NodeKey node2) |
FaceKey | insert_face (EdgeKey edge1, EdgeKey edge2, EdgeKey edge3) |
TetrahedronKey | insert_tetrahedron (FaceKey face1, FaceKey face2, FaceKey face3, FaceKey face4) |
vec3 | get_barycenter (const SimplexSet< NodeKey > &nids, bool interface=false) |
NodeKey | split (const EdgeKey &eid, const vec3 &pos, const vec3 &destination) |
void | collapse (const EdgeKey &eid, const NodeKey &nid, double weight=0.5) |
FaceKey | flip_32 (const EdgeKey &eid) |
EdgeKey | flip_23 (const FaceKey &fid) |
void | flip (const EdgeKey &eid, const FaceKey &fid1, const FaceKey &fid2) |
void | flip_22 (const FaceKey &fid1, const FaceKey &fid2) |
void | flip_44 (const FaceKey &fid1, const FaceKey &fid2) |
double | volume_destination (const is_mesh::SimplexSet< is_mesh::NodeKey > &nids) |
double | signed_volume_destination (const is_mesh::SimplexSet< is_mesh::NodeKey > &nids) |
void | garbage_collect () |
virtual void | scale (const vec3 &s) |
void | extract_surface_mesh (std::vector< vec3 > &points, std::vector< int > &faces) |
void | extract_surface_mesh_debug (std::vector< vec3 > &points, std::vector< int > &faces) |
void | extract_tet_mesh (std::vector< vec3 > &points, std::vector< int > &tets, std::vector< int > &tet_labels) |
void | validity_check (bool skip_boundary_check=false) |
long | add_gc_listener (std::function< void(const GarbageCollectDeletions &)> fn) |
bool | remove_gc_listener (long id) |
long | add_label_listener (std::function< void(const TetrahedronKey &tid, unsigned int oldValue)> fn) |
bool | remove_label_listener (long id) |
long | add_split_listener (std::function< void(const NodeKey &nid_new, const NodeKey &nid1, const NodeKey &nid2)> fn) |
bool | remove_split_listener (long id) |
long | add_collapse_listener (std::function< void(const NodeKey &nid, const NodeKey &nid_removed, double weight)> fn) |
bool | remove_collapse_listener (long id) |
template<typename value_type > | |
void | for_each_par_sp (double partitionsize, int dimension, std::function< void(value_type &, int)> fn) |
template<> | |
kernel< NodeKey, Node > & | get_kernel () |
template<> | |
kernel< EdgeKey, Edge > & | get_kernel () |
template<> | |
kernel< FaceKey, Face > & | get_kernel () |
template<> | |
kernel< TetrahedronKey, Tetrahedron > & | get_kernel () |
Friends | |
class | Node |
class | Edge |
class | Face |
class | Tetrahedron |
Collapses the edge eid. The node nid must be adjacent to eid before the collapse. The node nid survives, while the other is removed. The weight parameter specifies how the attributes of the old nodes are weighted in the surviving node. For example the position of the surviving node is given by (1.-weight)*get(nid).get_pos() + weight*get(nid_remove).get_pos(). This means that if weight is 0, the surviving node retain its attributes.
vec3 is_mesh::ISMesh::get_barycenter | ( | const SimplexSet< NodeKey > & | nids, |
bool | interface = false |
||
) |
Calculates the average position of the nodes in the simplex set nids. If interface is true, the average position is only calculated among the nodes which are interface.
Returns the edge between the nodes nid1 and nid2.
Returns the edge shared by the faces fid1 and fid2.
FaceKey is_mesh::ISMesh::get_face | ( | const NodeKey & | nid1, |
const NodeKey & | nid2, | ||
const NodeKey & | nid3 | ||
) |
Returns the face between the nodes nid1, nid2 and nid3.
FaceKey is_mesh::ISMesh::get_face | ( | const TetrahedronKey & | tid1, |
const TetrahedronKey & | tid2 | ||
) |
Returns the face shared by the tetrahedra tid1 and tid2.
Returns the node shared by the edges eid1 and eid2.
Returns the node adjacent to edge eid which is not nid.
vector< vec3 > is_mesh::ISMesh::get_pos | ( | const SimplexSet< NodeKey > & | nids | ) |
Returns the positions of nodes nids.
TetrahedronKey is_mesh::ISMesh::get_tet | ( | const TetrahedronKey & | tid, |
const FaceKey & | fid | ||
) |
Returns the tetrahedron which shares the face fid with tid, i.e. the neighbour to tid.
Inserts an edge into the mesh. Updates the co-boundary of the boundary nodes with the newly created edge. Leaves the closure of the edge in an uncompressed state.
Inserts a face into the mesh. Updates the co-boundary of the boundary faces with the newly created face. Leaves the closure of the face in an uncompressed state.
TetrahedronKey is_mesh::ISMesh::insert_tetrahedron | ( | FaceKey | face1, |
FaceKey | face2, | ||
FaceKey | face3, | ||
FaceKey | face4 | ||
) |
Inserts a tetrahedron into the mesh. Updates the co-boundary of the boundary edges with the newly created tetrahedron. Leaves the closure of the tetrahedron in an uncompressed state.
bool is_mesh::ISMesh::is_inverted | ( | const TetrahedronKey & | tid | ) |
Returns whether the tetrahedron with ID tid is inverted.