This class implements a data structure for 2-manifold on each pane. More...
#include <Manifold_2.h>
Public Member Functions | |
Pane_manifold_2 () | |
Default constructors. More... | |
Pane_manifold_2 (const COM::Pane *p, const Pane_manifold_2 *parent=NULL) | |
Constructor from a pane. More... | |
~Pane_manifold_2 () | |
Destructor. More... | |
const Halfedge & | get_counterpart (Edge_ID eID) const |
Get the counterpart of an edge in the ACROSS_PANE mode, i.e. More... | |
const Vector_3< Real > & | get_bd_normal (Edge_ID) const |
Obtain normal of incident face of border edge. More... | |
int | get_bd_flag (Edge_ID) const |
Obtain flag of incident face of border edge. More... | |
bool | get_bdedge_flag (Edge_ID) const |
Obtain flag of opposite halfedge of a border halfedge. More... | |
Halfedge | get_opposite_edge (Edge_ID, Access_Mode mode) const |
Obtain the opposite edge in a given access mode. More... | |
Halfedge | get_prev_edge (Edge_ID, Access_Mode mode) const |
Obtain the previous edge in a given access mode. More... | |
Halfedge | get_next_edge (Edge_ID, Access_Mode mode) const |
Obtain the next edge in a given access mode. More... | |
Node | get_primary (int vID, Access_Mode mode) const |
Obtains a Node object corresponding to the primary copy of the given node. More... | |
bool | is_primary (int vID, Access_Mode mode) const |
Determines whether a given node is a primary copy. More... | |
bool | is_border_edge (Edge_ID eID, Access_Mode mode) const |
Is the edge on the boundary of a given mode? More... | |
bool | is_physical_border_edge (Edge_ID eID) const |
Is the given edge a physical border edge? More... | |
int | size_of_nodes (Access_Mode mode) const |
Number of primary nodes of the pane for a given mode. More... | |
int | size_of_edges (Access_Mode mode) const |
Number of primary edges of the pane in a given mode. More... | |
int | size_of_faces (Access_Mode mode) const |
Obtain the number of faces. More... | |
int | size_of_triangles (Access_Mode mode) const |
Obtain the number of triangles. More... | |
int | size_of_quadrilaterals (Access_Mode mode) const |
Obtain the number of quadrilaterals. More... | |
Public Member Functions inherited from Simple_manifold_2 | |
Simple_manifold_2 () | |
Default constructors. More... | |
Simple_manifold_2 (const COM::Pane *p, const Simple_manifold_2 *parent=NULL, bool with_ghost=true) | |
Constructors. More... | |
const COM::Pane * | pane () const |
Obtain a const pointer to the pane. More... | |
bool | is_real_node (int vID) const |
Is the given node a real node? More... | |
bool | is_ghost_node (int vID) const |
Is the given node a ghost node? More... | |
bool | is_real_element (int eid) const |
Is the element incident on the give edge a real element? More... | |
bool | is_ghost_element (int eid) const |
Is the element incident on the give edge a ghost element? More... | |
int | get_edge_index (const Edge_ID &eid, const int offset=0) const |
Get an index for internal edges. More... | |
int | upperbound_edge_index () const |
Get size of internal edges. More... | |
void | get_borders (std::vector< bool > &is_border, std::vector< bool > &is_isolated, std::vector< Edge_ID > *b, int *ng=NULL) const |
Obtain all the border nodes, isolated nodes, and border edges. More... | |
int | size_of_nodes () const |
Number of nodes of the pane. More... | |
int | maxsize_of_nodes () const |
Maximum number of nodes allowed in the pane. More... | |
int | size_of_real_nodes () const |
Number of real nodes of the pane. More... | |
int | maxsize_of_real_nodes () const |
Maximum number of real nodes allowed in the pane. More... | |
int | size_of_ghost_nodes () const |
Number of ghost nodes of the pane. More... | |
int | maxsize_of_ghost_nodes () const |
Maximum number of ghost nodes allowed in the pane. More... | |
int | size_of_elements () const |
Number of elements of the pane. More... | |
int | maxsize_of_elements () const |
Maximum number of elements allowed in the pane. More... | |
int | size_of_real_elements () const |
Number of real elements of the pane. More... | |
int | maxsize_of_real_elements () const |
Maximum number of real elements allowed in the pane. More... | |
int | size_of_ghost_elements () const |
Number of ghost elements of the pane. More... | |
int | maxsize_of_ghost_elements () const |
Maximum number of ghost elements allowed in the pane. More... | |
int | size_of_faces () const |
Number of elements of the pane. More... | |
int | maxsize_of_faces () const |
Maximum number of elements allowed in the pane. More... | |
int | size_of_real_faces () const |
Number of real elements of the pane. More... | |
int | maxsize_of_real_faces () const |
Maximum number of real elements allowed in the pane. More... | |
int | size_of_ghost_faces () const |
Number of ghost elements of the pane. More... | |
int | maxsize_of_ghost_faces () const |
Maximum number of ghost elements allowed in the pane. More... | |
int | size_of_triangles () const |
Total number of triangles of the pane. More... | |
int | maxsize_of_triangles () const |
Maximum number of triangles allowed in the pane. More... | |
int | size_of_real_triangles () const |
Number of real triangles of the pane. More... | |
int | maxsize_of_real_triangles () const |
Maximum number of real triangles allowed in the pane. More... | |
int | size_of_ghost_triangles () const |
Number of ghost triangles of the pane. More... | |
int | maxsize_of_ghost_triangles () const |
Maximum number of ghost triangles allowed in the pane. More... | |
int | size_of_quadrilaterals () const |
Total number of quadrilaterals of the pane. More... | |
int | maxsize_of_quadrilaterals () const |
Maximum number of quadrilaterals allowed in the pane. More... | |
int | size_of_real_quadrilaterals () const |
Number of real quadrilaterals of the pane. More... | |
int | maxsize_of_real_quadrilaterals () const |
Maximum number of real quadrilaterals allowed in the pane. More... | |
int | size_of_ghost_quadrilaterals () const |
Number of ghost quadrilaterals of the pane. More... | |
int | maxsize_of_ghost_quadrilaterals () const |
Maximum number of ghost quadrilaterals allowed in the pane. More... | |
int | size_of_halfedges () const |
Number of halfedges of the pane. More... | |
int | size_of_real_halfedges () const |
Number of real halfedges of the pane. More... | |
int | size_of_ghost_halfedges () const |
Number of ghost halfedges of the pane. More... | |
int | size_of_edges () const |
Number of edges of the pane. More... | |
int | size_of_real_edges () const |
Number of real edges of the pane. More... | |
int | size_of_ghost_edges () const |
Number of ghost edges of the pane. More... | |
int | size_of_border_edges () const |
Number of border edges of the whole pane. More... | |
int | size_of_real_border_edges () const |
Number of border edges of the real part of the pane. More... | |
int | size_of_ghost_border_edges () const |
Number of border edges of the ghost part of the pane. More... | |
int | size_of_isolated_nodes () const |
Number of isolated nodes. More... | |
int | get_origin (Edge_ID eID, Element_node_enumerator *ene_in=NULL) const |
Get the ID of the origin of a given edge. More... | |
int | get_destination (Edge_ID eID, Element_node_enumerator *ene_in=NULL) const |
Get the ID of the destination of a given edge. More... | |
Edge_ID | get_incident_edge (int vID) const |
Get the ID of an incident edge within the pane of a given node that originated from the node. More... | |
Edge_ID | get_incident_real_edge (int vID) const |
Get the ID of an incident real edge within the pane of a given node. More... | |
Edge_ID | get_incident_ghost_edge (int vID) const |
Get the ID of an incident real edge within the pane of a given node The incident edge may encode an isolated node. More... | |
bool | is_border_edge (const Edge_ID &eID) const |
Is a given edge on the boundary of the whole pane? More... | |
bool | is_pure_real_border_edge (const Edge_ID &eID) const |
Determine whether a given edge is a border edge of real part of the whole pane (on physical border). More... | |
bool | is_real_border_edge (const Edge_ID &eID) const |
Determine whether a given edge is a border edge of real part of the pane (either on physical border or between real and ghost elements) More... | |
bool | is_ghost_border_edge (const Edge_ID &eID) const |
Determine whether a given edge is a border edge of ghost part of the pane (either on physical border or between real and ghost elements) More... | |
bool | is_isolated_node (int vID) const |
Is the node isolated (i.e. not incident on any element)? More... | |
bool | is_real_border_node (int vID) const |
Is the node on the pane boundary of real part (not isolated)? More... | |
bool | is_ghost_border_node (int vID) const |
Is the node on pane boundary (not isolated)? It assumes vID is incident on the ghost (no checking is performed). More... | |
bool | is_border_node (int vID) const |
Is the node on pane boundary (not isolated)? More... | |
int | get_border_edgeID (Edge_ID eID) const |
Get the border edge index. Return -1 if not a border edge. More... | |
Edge_ID | get_a_real_border_edge () const |
Obtain a border edge on real part of the pane. More... | |
Edge_ID | get_a_ghost_border_edge () const |
Obtain a border edge on ghost part of the pane. More... | |
Edge_ID | get_a_border_edge () const |
Obtain the ID of a border edge of the whole pane. More... | |
int | get_a_real_border_node () const |
Obtain the ID of a border node of the real part of the pane. More... | |
int | get_a_ghost_border_node () const |
Obtain the ID of a border node of the ghost part of the pane. More... | |
int | get_a_border_node () const |
Obtain the ID of a border node. More... | |
Edge_ID | get_opposite_real_edge (const Edge_ID &eID) const |
Get the ID of the opposite real edge of a given real or border edge. More... | |
Edge_ID | get_opposite_ghost_edge (const Edge_ID &eID) const |
Get the ID of the opposite ghost edge of a given real or border edge. More... | |
Edge_ID | get_opposite_edge (const Edge_ID &eID) const |
Get the ID of the opposite edge of a given interior or border edge. More... | |
Edge_ID | get_prev_edge (const Edge_ID &eID) const |
Get the ID of the previous edge of the element or along the boundary. More... | |
Edge_ID | get_prev_real_edge (const Edge_ID &eID) const |
Get the ID of the previous real edge of the element or along the boundary. More... | |
Edge_ID | get_prev_ghost_edge (const Edge_ID &eID) const |
Get the ID of the previous ghost edge of the element or along the boundary. More... | |
Edge_ID | get_next_edge (const Edge_ID &eID) const |
Get the ID of the next edge of the element or along the boundary. More... | |
Edge_ID | get_next_real_edge (const Edge_ID &eID) const |
Get the ID of the next real edge of the element or along the boundary. More... | |
Edge_ID | get_next_ghost_edge (const Edge_ID &eID) const |
Get the ID of the next ghost edge of the element or along the boundary. More... | |
Protected Member Functions | |
void | convert_pconn_edge2ghost (const COM::Attribute *pconn_e, COM::Attribute *pconn_g) |
Convert from edge-based pconn to a ghost-node-style pconn for a pane attribute. More... | |
int | get_bnode_index (int vID) const |
Obtain the border node index (equal to ID of incident border edge). More... | |
Protected Member Functions inherited from Simple_manifold_2 | |
void | init (const COM::Pane *p, const Simple_manifold_2 *parent=NULL, bool with_ghost=true) |
Initialize the database for the pane, including ghost information, opposite halfedges, incident halfedges, and border halfedges. More... | |
void | determine_ghosts () |
Determine the ghost nodes and elements. More... | |
void | determine_opposite_halfedges () |
Determine the opposite halfedges of each halfedge, and identify border halfedge. More... | |
void | determine_incident_halfedges () |
Determine an incident halfedge for each node. More... | |
Protected Attributes | |
std::vector< int > | _cnt_pn |
std::vector< Halfedge > | _bd_cnt |
std::vector< Vector_3< Real > > | _bd_nrms |
std::vector< int > | _bd_flgs |
std::vector< char > | _bd_bm |
std::vector< Node > | _nd_prm |
Protected Attributes inherited from Simple_manifold_2 | |
const COM::Pane * | _pane |
bool | _is_str |
bool | _with_ghost |
std::vector< const COM::Connectivity * > | _elem_conns |
int | _nspe |
int | _maxsize_real_nodes |
int | _maxsize_real_elmts |
int | _size_real_borders |
int | _size_ghost_borders |
int | _size_rg_borders |
std::vector< bool > | _isghostnode |
std::vector< bool > | _isghostelmt |
std::vector< Edge_ID > | _oeIDs_real_or_str |
std::vector< Edge_ID > | _oeIDs_ghost |
std::vector< Edge_ID > | _ieIDs_real_or_str |
std::vector< Edge_ID > | _ieIDs_ghost |
std::vector< Edge_ID > | _beIDs |
std::vector< int > | _isovIDs |
Friends | |
class | Window_manifold_2 |
class | Node |
class | Halfedge |
Additional Inherited Members | |
Public Types inherited from Simple_manifold_2 | |
typedef Facet_ID | Edge_ID |
This class implements a data structure for 2-manifold on each pane.
It extends Simple_manifold_2 by adding data and function members to support partitioned meshes.
Definition at line 57 of file Manifold_2.h.
Pane_manifold_2 | ( | ) |
|
explicit |
Constructor from a pane.
Definition at line 55 of file Manifold_2.C.
References _bd_cnt, _cnt_pn, and _nd_prm.
~Pane_manifold_2 | ( | ) |
|
protected |
Convert from edge-based pconn to a ghost-node-style pconn for a pane attribute.
Definition at line 735 of file Manifold_2.C.
References COM_assertion, copy, Facet_ID::eid(), Simple_manifold_2::get_opposite_real_edge(), j, k, n, nk, and Simple_manifold_2::size_of_real_border_edges().
|
inline |
Obtain flag of incident face of border edge.
Definition at line 593 of file Manifold_2.h.
References _bd_flgs, COM_assertion_msg, Facet_ID::eid(), and Facet_ID::is_border().
Obtain normal of incident face of border edge.
Definition at line 587 of file Manifold_2.h.
References _bd_nrms, COM_assertion_msg, Facet_ID::eid(), and Facet_ID::is_border().
Referenced by get_normal().
|
inline |
Obtain flag of opposite halfedge of a border halfedge.
Definition at line 599 of file Manifold_2.h.
References _bd_bm, COM_assertion_msg, Facet_ID::eid(), and Facet_ID::is_border().
|
inlineprotected |
Obtain the border node index (equal to ID of incident border edge).
Return -1 if not a border edge.
Definition at line 157 of file Manifold_2.h.
References Simple_manifold_2::_beIDs, Simple_manifold_2::_size_ghost_borders, Facet_ID::eid(), Simple_manifold_2::get_incident_real_edge(), and Facet_ID::is_border().
Referenced by Window_manifold_2::determine_primaries(), get_primary(), and is_primary().
Get the counterpart of an edge in the ACROSS_PANE mode, i.e.
its correponding edge in an adjacent pane. If the edge is on the physical boundary, then its counterpart is Halfedge(NULL,Edge_ID(), ACROSS_PANE).
Definition at line 581 of file Manifold_2.h.
References _bd_cnt, COM_assertion, Facet_ID::eid(), and Facet_ID::is_border().
Referenced by get_opposite_edge(), Node::halfedge(), and is_border_edge().
Halfedge get_next_edge | ( | Edge_ID | eID, |
Access_Mode | mode | ||
) | const |
Obtain the next edge in a given access mode.
Definition at line 98 of file Manifold_2.C.
References ACROSS_PANE, COM_assertion_msg, Simple_manifold_2::get_next_edge(), Simple_manifold_2::get_next_real_edge(), get_opposite_edge(), Halfedge, Halfedge::is_border(), Simple_manifold_2::is_real_border_edge(), Halfedge::opposite(), Halfedge::prev(), REAL_PANE, and WHOLE_PANE.
Referenced by Halfedge::next().
|
inline |
Obtain the opposite edge in a given access mode.
Definition at line 607 of file Manifold_2.h.
References ACROSS_PANE, COM_assertion_msg, get_counterpart(), Simple_manifold_2::get_opposite_edge(), Simple_manifold_2::get_opposite_real_edge(), Halfedge, Facet_ID::is_border(), Halfedge::pane_manifold(), REAL_PANE, and WHOLE_PANE.
Referenced by get_next_edge(), get_prev_edge(), and Halfedge::opposite().
Halfedge get_prev_edge | ( | Edge_ID | eID, |
Access_Mode | mode | ||
) | const |
Obtain the previous edge in a given access mode.
Definition at line 71 of file Manifold_2.C.
References ACROSS_PANE, COM_assertion_msg, get_opposite_edge(), Simple_manifold_2::get_prev_edge(), Simple_manifold_2::get_prev_real_edge(), Halfedge, Facet_ID::is_border(), Halfedge::is_border(), Halfedge::next(), Halfedge::opposite(), REAL_PANE, and WHOLE_PANE.
Referenced by Halfedge::prev().
|
inline |
Obtains a Node object corresponding to the primary copy of the given node.
If the mode is not ACROSS_PANE, then the primary copy is always the node itself. If the mode is ACROSS_PANE, then the incident edge of the primary copy of the node must be a border edge, and the primary copy of an interior node is the one with smallest ID among shared nodes.
Definition at line 629 of file Manifold_2.h.
References _nd_prm, ACROSS_PANE, COM_assertion, get_bnode_index(), and Node.
Referenced by Node::coincide(), Halfedge::destination(), Node::get_primary(), and Halfedge::origin().
|
inline |
Is the edge on the boundary of a given mode?
Definition at line 653 of file Manifold_2.h.
References ACROSS_PANE, COM_assertion_msg, get_counterpart(), Facet_ID::is_border(), Simple_manifold_2::is_pure_real_border_edge(), Simple_manifold_2::is_real_border_edge(), Halfedge::pane_manifold(), REAL_PANE, and WHOLE_PANE.
Referenced by Halfedge::is_border().
|
inline |
Is the given edge a physical border edge?
Definition at line 110 of file Manifold_2.h.
References _cnt_pn, Simple_manifold_2::get_border_edgeID(), and Facet_ID::is_border().
Referenced by Halfedge::is_physical_border().
|
inline |
Determines whether a given node is a primary copy.
Definition at line 642 of file Manifold_2.h.
References _nd_prm, ACROSS_PANE, COM_assertion, and get_bnode_index().
Referenced by Node::is_primary().
int size_of_edges | ( | Access_Mode | mode | ) | const |
Number of primary edges of the pane in a given mode.
In ACROSS_PANE mode, the shared edges will be counted only if they are primary copies.
Definition at line 144 of file Manifold_2.C.
References _bd_cnt, Simple_manifold_2::_pane, ACROSS_PANE, COM_assertion_msg, iend, n, Halfedge::pane(), Halfedge::pane_manifold(), REAL_PANE, Simple_manifold_2::size_of_edges(), Simple_manifold_2::size_of_real_edges(), and WHOLE_PANE.
|
inline |
Obtain the number of faces.
Definition at line 122 of file Manifold_2.h.
References ACROSS_PANE, REAL_PANE, Simple_manifold_2::size_of_faces(), and Simple_manifold_2::size_of_real_faces().
int size_of_nodes | ( | Access_Mode | mode | ) | const |
Number of primary nodes of the pane for a given mode.
In ACROSS_PANE mode, the shared nodes will be counted only if they are primary copies.
Definition at line 123 of file Manifold_2.C.
References _nd_prm, ACROSS_PANE, COM_assertion_msg, iend, n, REAL_PANE, Simple_manifold_2::size_of_nodes(), Simple_manifold_2::size_of_real_nodes(), and WHOLE_PANE.
|
inline |
Obtain the number of quadrilaterals.
Definition at line 140 of file Manifold_2.h.
References ACROSS_PANE, REAL_PANE, Simple_manifold_2::size_of_quadrilaterals(), and Simple_manifold_2::size_of_real_quadrilaterals().
|
inline |
Obtain the number of triangles.
Definition at line 131 of file Manifold_2.h.
References ACROSS_PANE, REAL_PANE, Simple_manifold_2::size_of_real_triangles(), and Simple_manifold_2::size_of_triangles().
|
friend |
Definition at line 60 of file Manifold_2.h.
Referenced by get_next_edge(), get_opposite_edge(), and get_prev_edge().
|
friend |
Definition at line 59 of file Manifold_2.h.
Referenced by get_primary().
|
friend |
Definition at line 58 of file Manifold_2.h.
|
protected |
Definition at line 178 of file Manifold_2.h.
Referenced by get_bdedge_flag().
|
protected |
Definition at line 175 of file Manifold_2.h.
Referenced by Window_manifold_2::determine_counterparts(), get_counterpart(), Pane_manifold_2(), and size_of_edges().
|
protected |
Definition at line 177 of file Manifold_2.h.
Referenced by get_bd_flag().
Definition at line 176 of file Manifold_2.h.
Referenced by get_bd_normal().
|
protected |
Definition at line 169 of file Manifold_2.h.
Referenced by Window_manifold_2::determine_counterparts(), is_physical_border_edge(), and Pane_manifold_2().
|
protected |
Definition at line 179 of file Manifold_2.h.
Referenced by Window_manifold_2::determine_primaries(), get_primary(), is_primary(), Pane_manifold_2(), and size_of_nodes().