Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pane_manifold_2 Class Reference

This class implements a data structure for 2-manifold on each pane. More...

#include <Manifold_2.h>

Inheritance diagram for Pane_manifold_2:
Collaboration diagram for Pane_manifold_2:

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 Halfedgeget_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
 

Detailed Description

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.

Constructor & Destructor Documentation

Default constructors.

Definition at line 52 of file Manifold_2.C.

52 {}
Pane_manifold_2 ( const COM::Pane *  p,
const Pane_manifold_2 parent = NULL 
)
explicit

Constructor from a pane.

Definition at line 55 of file Manifold_2.C.

References _bd_cnt, _cnt_pn, and _nd_prm.

57  : Simple_manifold_2( p, parent)
58 {
59  if ( parent) {
60  _cnt_pn = parent->_cnt_pn;
61  _bd_cnt = parent->_bd_cnt;
62  _nd_prm = parent->_nd_prm;
63  }
64  else; // Otherwise, they are filled by Window_manifold_2::init()
65 }
Simple_manifold_2()
Default constructors.
std::vector< int > _cnt_pn
Definition: Manifold_2.h:169
std::vector< Node > _nd_prm
Definition: Manifold_2.h:179
std::vector< Halfedge > _bd_cnt
Definition: Manifold_2.h:175

Destructor.

Definition at line 67 of file Manifold_2.C.

67 {}

Member Function Documentation

void convert_pconn_edge2ghost ( const COM::Attribute *  pconn_e,
COM::Attribute *  pconn_g 
)
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().

736  {
737  const int *b2e_l = (const int*)pconn_e->pointer();
738 
739  int n=pconn_e->size_of_items();
740  pconn_g->set_size( n+n+1, n+n);
741  int *buf = (int*)pconn_g->allocate( 1, n+n+1, true);
742 
743  buf[0] = 0; // Shared-node part is empty
744  buf[1] = b2e_l[ 0]; // Number of communicating panes
745 
746  // Extracting the edge-ID part.
747  for ( int j=1; j<n; j+=b2e_l[j+1]+2) {
748  buf[j+1] = b2e_l[j]; // Pane ID
749  buf[j+2] = b2e_l[j+1]; // Number of items
750 
751  const Edge_ID *es = (const Edge_ID*)(&b2e_l[j+2]);
752  for ( int k=0, nk=b2e_l[j+1]; k<nk; ++k) {
753  buf[j+k+3] = get_opposite_real_edge(es[k]).eid();
754  COM_assertion( buf[j+k+3]>=1 && buf[j+k+3]<=size_of_real_border_edges());
755  }
756  }
757 
758  // Copy the sending part into the receiving part.
759  std::copy( &buf[1], &buf[n+1], &buf[n+1]);
760 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
j indices k indices k
Definition: Indexing.h:6
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
int eid() const
Element ID of the halfedge.
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.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
const NT & n
void int int * nk
Definition: read.cpp:74
j indices j
Definition: Indexing.h:6
int size_of_real_border_edges() const
Number of border edges of the real part of the pane.

Here is the call graph for this function:

int get_bd_flag ( Edge_ID  eID) const
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().

593  {
594  COM_assertion_msg( eID.is_border() && !_bd_flgs.empty(),
595  "get_bd_flag must be called on border edges and be called after update_bd_flags() has been called.");
596  return _bd_flgs[ eID.eid()-1];
597 }
#define COM_assertion_msg(EX, msg)
std::vector< int > _bd_flgs
Definition: Manifold_2.h:177

Here is the call graph for this function:

const Vector_3< Real > & get_bd_normal ( Edge_ID  eID) const
inline

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().

587  {
588  COM_assertion_msg( eID.is_border() && !_bd_nrms.empty(),
589  "get_bd_normal must be called on border edges and be called after update_bd_normals() has been called.");
590  return _bd_nrms[ eID.eid()-1];
591 }
#define COM_assertion_msg(EX, msg)
std::vector< Vector_3< Real > > _bd_nrms
Definition: Manifold_2.h:176

Here is the call graph for this function:

Here is the caller graph for this function:

bool get_bdedge_flag ( Edge_ID  eID) const
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().

599  {
600  COM_assertion_msg( eID.is_border() && !_bd_bm.empty(),
601  "get_bdedge_flag must be called on border edges and be called after update_bdedge_bitmap() has been called.");
602  return _bd_bm[ eID.eid()-1];
603 }
#define COM_assertion_msg(EX, msg)
std::vector< char > _bd_bm
Definition: Manifold_2.h:178

Here is the call graph for this function:

int get_bnode_index ( int  vID) const
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().

157  {
158  Edge_ID eID = get_incident_real_edge( vID);
159 
160  if ( !eID.is_border()) return -1;
161 
162  int bid = eID.eid()-1;
163  if ( bid>=int(_beIDs.size())) return bid-_size_ghost_borders;
164  else return bid;
165  }
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
Edge_ID get_incident_real_edge(int vID) const
Get the ID of an incident real edge within the pane of a given node.
std::vector< Edge_ID > _beIDs

Here is the call graph for this function:

Here is the caller graph for this function:

const Halfedge & get_counterpart ( Edge_ID  eID) const
inline

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().

582 {
583  COM_assertion( eID.is_border());
584  return _bd_cnt[ eID.eid()-1];
585 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
std::vector< Halfedge > _bd_cnt
Definition: Manifold_2.h:175

Here is the call graph for this function:

Here is the caller graph for this function:

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().

99 {
100  Edge_ID nxt;
101  switch ( mode) {
102  case REAL_PANE:
103  nxt = get_next_real_edge( eID); break;
104  case WHOLE_PANE:
105  nxt = Simple_manifold_2::get_next_edge( eID); break;
106  case ACROSS_PANE: {
107  // In the across-pane mode, it is illegal to access halfedges that are
108  // not on physical boundaries but on pane boundaries. So a pane-border
109  // halfedge must be a physical border edge.
110  if ( !is_real_border_edge(eID))
111  { nxt = get_next_real_edge( eID); break; }
112  else { // the edge is on physical boundary.
114  while ( !h.is_border()) h = h.prev().opposite();
115  return h;
116  }
117  }
118  default: COM_assertion_msg(false, "Should never reach here");
119  }
120  return Halfedge( this, nxt, mode);
121 }
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 o...
#define COM_assertion_msg(EX, msg)
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
Halfedge opposite() const
Get the ID of the opposite edge of a given edge.
Definition: Manifold_2.h:454
Halfedge prev() const
Get the previous halfedge of its owner element.
Definition: Manifold_2.h:460
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
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.
bool is_border() const
Is the edge a border edge?
Definition: Manifold_2.h:476
friend class Halfedge
Definition: Manifold_2.h:60
Halfedge get_opposite_edge(Edge_ID, Access_Mode mode) const
Obtain the opposite edge in a given access mode.
Definition: Manifold_2.h:607
Edge_ID get_next_edge(const Edge_ID &eID) const
Get the ID of the next edge of the element or along the boundary.

Here is the call graph for this function:

Here is the caller graph for this function:

Halfedge get_opposite_edge ( Edge_ID  eID,
Access_Mode  mode 
) const
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().

607  {
608  Edge_ID opp;
609  switch ( mode) {
610  case REAL_PANE:
611  opp = get_opposite_real_edge( eID); break;
612  case WHOLE_PANE:
613  opp = Simple_manifold_2::get_opposite_edge( eID); break;
614  case ACROSS_PANE: {
615  opp=get_opposite_real_edge( eID);
616 
617  if ( opp.is_border()) {
618  Halfedge h = get_counterpart(opp);
619  if ( h.pane_manifold()) return h;
620  }
621 
622  break;
623  }
624  default: COM_assertion_msg(false, "Should never reach here");
625  }
626  return Halfedge( this, opp, mode);
627 }
#define COM_assertion_msg(EX, msg)
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
const Halfedge & get_counterpart(Edge_ID eID) const
Get the counterpart of an edge in the ACROSS_PANE mode, i.e.
Definition: Manifold_2.h:581
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
Edge_ID get_opposite_edge(const Edge_ID &eID) const
Get the ID of the opposite edge of a given interior or border edge.
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.
friend class Halfedge
Definition: Manifold_2.h:60
const Pane_manifold_2 * pane_manifold() const
Obtain the pane manifold that owns the edge.
Definition: Manifold_2.h:540

Here is the call graph for this function:

Here is the caller graph for this function:

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().

72 {
73  Edge_ID prv;
74  switch ( mode) {
75  case REAL_PANE:
76  prv = get_prev_real_edge( eID); break;
77  case WHOLE_PANE:
78  prv = Simple_manifold_2::get_prev_edge( eID); break;
79  case ACROSS_PANE: {
80  // In the across-pane mode, it is illegal to access halfedges that are
81  // not on physical boundaries but on pane boundaries. So a pane-border
82  // halfedge must be a physical border edge.
83  if ( !eID.is_border())
84  { prv = get_prev_real_edge( eID); break; }
85  else { // the edge is on physical boundary.
87  while ( !h.is_border()) h = h.next().opposite();
88  return h;
89  }
90  }
91  default: COM_assertion_msg(false, "Should never reach here");
92  }
93 
94  return Halfedge( this, prv, mode);
95 }
#define COM_assertion_msg(EX, msg)
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
Halfedge opposite() const
Get the ID of the opposite edge of a given edge.
Definition: Manifold_2.h:454
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
Halfedge next() const
Get the next halfedge of its owner element.
Definition: Manifold_2.h:465
Edge_ID get_prev_edge(const Edge_ID &eID) const
Get the ID of the previous edge of the element or along the boundary.
bool is_border() const
Is the edge a border edge?
Definition: Manifold_2.h:476
friend class Halfedge
Definition: Manifold_2.h:60
Halfedge get_opposite_edge(Edge_ID, Access_Mode mode) const
Obtain the opposite edge in a given access mode.
Definition: Manifold_2.h:607
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.

Here is the call graph for this function:

Here is the caller graph for this function:

Node get_primary ( int  vID,
Access_Mode  mode 
) const
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().

630 {
631  if ( mode != ACROSS_PANE) return Node(this, vID, mode);
632 
633  int bid = get_bnode_index( vID);
634 
635  COM_assertion( bid<int(_nd_prm.size()));
636  if ( bid >=0 && _nd_prm[ bid].pane_manifold())
637  return _nd_prm[ bid];
638  else
639  return Node( this, vID, ACROSS_PANE);
640 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
std::vector< Node > _nd_prm
Definition: Manifold_2.h:179
friend class Node
Definition: Manifold_2.h:59
int get_bnode_index(int vID) const
Obtain the border node index (equal to ID of incident border edge).
Definition: Manifold_2.h:157

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_border_edge ( Edge_ID  eID,
Access_Mode  mode 
) const
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().

654 {
655  switch ( mode) {
656  case REAL_PANE:
657  return is_real_border_edge( eID);
658  case WHOLE_PANE:
659  // For whole pane, an edge is border only if it is pure real border edge.
660  return is_pure_real_border_edge( eID);
661  case ACROSS_PANE:
662  return eID.is_border() && get_counterpart( eID).pane_manifold() == NULL;
663  default: COM_assertion_msg(false, "Should never reach here");
664  return false;
665  }
666 }
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)...
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 o...
#define COM_assertion_msg(EX, msg)
const Halfedge & get_counterpart(Edge_ID eID) const
Get the counterpart of an edge in the ACROSS_PANE mode, i.e.
Definition: Manifold_2.h:581
const Pane_manifold_2 * pane_manifold() const
Obtain the pane manifold that owns the edge.
Definition: Manifold_2.h:540

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_physical_border_edge ( Edge_ID  eID) const
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().

111  { return eID.is_border() && _cnt_pn[get_border_edgeID(eID)-1]==0; }
std::vector< int > _cnt_pn
Definition: Manifold_2.h:169
int get_border_edgeID(Edge_ID eID) const
Get the border edge index. Return -1 if not a border edge.

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_primary ( int  vID,
Access_Mode  mode 
) const
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().

643 {
644  if ( mode != ACROSS_PANE) return true;
645 
646  int bid = get_bnode_index( vID);
647 
648  COM_assertion( bid<int(_nd_prm.size()));
649  return bid <0 || !_nd_prm[ bid].pane_manifold();
650 }
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
std::vector< Node > _nd_prm
Definition: Manifold_2.h:179
int get_bnode_index(int vID) const
Obtain the border node index (equal to ID of incident border edge).
Definition: Manifold_2.h:157

Here is the call graph for this function:

Here is the caller graph for this function:

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.

145 {
146  switch (mode) {
147  case REAL_PANE: return size_of_real_edges();
149  case ACROSS_PANE: {
150  int n = size_of_real_edges();
151 
152  int branch=0;
153  // Loop through border edges
154  for ( std::vector<Halfedge>::const_iterator
155  it=_bd_cnt.begin(), iend=_bd_cnt.end(); it != iend; ++it) {
156  Halfedge hopp = *it;
157  if ( hopp.pane_manifold()) {
158  if (hopp.pane()->id()<_pane->id()) --n;
159  else if (hopp.pane()->id()==_pane->id()) ++branch;
160  }
161  }
162  if ( branch) n-=branch/2;
163  return n;
164  }
165  default:
166  COM_assertion_msg(false, "Should never reach here");
167  }
168  return 0;
169 }
int size_of_edges() const
Number of edges of the pane.
#define COM_assertion_msg(EX, msg)
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
const NT & n
const COM::Pane * _pane
std::vector< Halfedge > _bd_cnt
Definition: Manifold_2.h:175
const Pane_manifold_2 * pane_manifold() const
Obtain the pane manifold that owns the edge.
Definition: Manifold_2.h:540
int size_of_real_edges() const
Number of real edges of the pane.
const COM::Pane * pane() const
Obtain the owner Pane_manifold_2 of the node.
Definition: Manifold_2.h:543

Here is the call graph for this function:

int size_of_faces ( Access_Mode  mode) const
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().

122  {
123  switch ( mode) {
124  case REAL_PANE:
125  case ACROSS_PANE: return size_of_real_faces();
126  default: return Simple_manifold_2::size_of_faces();
127  }
128  }
int size_of_faces() const
Number of elements of the pane.
int size_of_real_faces() const
Number of real elements of the pane.

Here is the call graph for this function:

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.

124 {
125  switch (mode) {
126  case REAL_PANE: return size_of_real_nodes();
128  case ACROSS_PANE: {
129  int n = size_of_real_nodes();
130  // Loop through border nodes
131  for ( std::vector<Node>::const_iterator
132  it=_nd_prm.begin(), iend=_nd_prm.end(); it != iend; ++it) {
133  if ( it->pane_manifold()) --n;
134  }
135  return n;
136  }
137  default:
138  COM_assertion_msg(false, "Should never reach here");
139  }
140 
141  return 0;
142 }
#define COM_assertion_msg(EX, msg)
int size_of_real_nodes() const
Number of real nodes of the pane.
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
const NT & n
std::vector< Node > _nd_prm
Definition: Manifold_2.h:179
int size_of_nodes() const
Number of nodes of the pane.

Here is the call graph for this function:

int size_of_quadrilaterals ( Access_Mode  mode) const
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().

140  {
141  switch ( mode) {
142  case REAL_PANE:
145  }
146  }
int size_of_quadrilaterals() const
Total number of quadrilaterals of the pane.
int size_of_real_quadrilaterals() const
Number of real quadrilaterals of the pane.

Here is the call graph for this function:

int size_of_triangles ( Access_Mode  mode) const
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().

131  {
132  switch ( mode) {
133  case REAL_PANE:
134  case ACROSS_PANE: return size_of_real_triangles();
135  default: return Simple_manifold_2::size_of_triangles();
136  }
137  }
int size_of_triangles() const
Total number of triangles of the pane.
int size_of_real_triangles() const
Number of real triangles of the pane.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class Halfedge
friend

Definition at line 60 of file Manifold_2.h.

Referenced by get_next_edge(), get_opposite_edge(), and get_prev_edge().

friend class Node
friend

Definition at line 59 of file Manifold_2.h.

Referenced by get_primary().

friend class Window_manifold_2
friend

Definition at line 58 of file Manifold_2.h.

Member Data Documentation

std::vector<char > _bd_bm
protected

Definition at line 178 of file Manifold_2.h.

Referenced by get_bdedge_flag().

std::vector<Halfedge> _bd_cnt
protected
std::vector<int > _bd_flgs
protected

Definition at line 177 of file Manifold_2.h.

Referenced by get_bd_flag().

std::vector<Vector_3<Real> > _bd_nrms
protected

Definition at line 176 of file Manifold_2.h.

Referenced by get_bd_normal().

std::vector<int> _cnt_pn
protected
std::vector<Node> _nd_prm
protected

The documentation for this class was generated from the following files: