oomph::TetMeshFacet Class Reference

#include <tet_mesh.h>

Public Member Functions

 TetMeshFacet (const unsigned &nvertex)
 Constructor: Specify number of vertices. More...
 
unsigned nvertex () const
 Number of vertices. More...
 
TetMeshVertexvertex_pt (const unsigned &j) const
 Pointer to j-th vertex (const) More...
 
void set_vertex_pt (const unsigned &j, TetMeshVertex *vertex_pt)
 
unsigned one_based_boundary_id () const
 Constant access to (one-based!) boundary IDs this facet lives on. More...
 
void set_one_based_boundary_id (const unsigned &one_based_id)
 
void set_one_based_adjacent_region_id (const unsigned &one_based_id)
 
std::set< unsignedone_based_adjacent_region_id () const
 Return set of (one-based!) region IDs this facet is adjacent to. More...
 
bool facet_is_embedded_in_a_specified_region ()
 Boolean indicating that facet is embedded in a specified region. More...
 
void set_one_based_region_that_facet_is_embedded_in (const unsigned &one_based_region_id)
 Facet is to be embedded in specified one-based region. More...
 
unsigned one_based_region_that_facet_is_embedded_in ()
 
void output (std::ostream &outfile) const
 Output. More...
 

Private Attributes

Vector< TetMeshVertex * > Vertex_pt
 Pointer to vertices. More...
 
unsigned One_based_boundary_id
 (One-based!) boundary IDs this facet lives on More...
 
std::set< unsignedOne_based_adjacent_region_id
 
unsigned One_based_region_id_that_facet_is_embedded_in
 

Detailed Description

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Facet for Tet mesh generation. Can lie on boundary (identified via one-based enumeration!) and can have GeomObject associated with those boundaries.

Constructor & Destructor Documentation

◆ TetMeshFacet()

oomph::TetMeshFacet::TetMeshFacet ( const unsigned nvertex)
inline

Constructor: Specify number of vertices.

172  : One_based_boundary_id(0), // Initialision implies not on any boundary
174  0) // Initialisation implies
175  // not embedded in any region
176  {
177  Vertex_pt.resize(nvertex, 0);
178  }
Vector< TetMeshVertex * > Vertex_pt
Pointer to vertices.
Definition: tet_mesh.h:280
unsigned nvertex() const
Number of vertices.
Definition: tet_mesh.h:181
unsigned One_based_boundary_id
(One-based!) boundary IDs this facet lives on
Definition: tet_mesh.h:283
unsigned One_based_region_id_that_facet_is_embedded_in
Definition: tet_mesh.h:292

References nvertex(), and Vertex_pt.

Member Function Documentation

◆ facet_is_embedded_in_a_specified_region()

bool oomph::TetMeshFacet::facet_is_embedded_in_a_specified_region ( )
inline

Boolean indicating that facet is embedded in a specified region.

244  {
246  }

References One_based_region_id_that_facet_is_embedded_in.

Referenced by oomph::GmshTetScaffoldMesh::write_geo_file().

◆ nvertex()

unsigned oomph::TetMeshFacet::nvertex ( ) const
inline

◆ one_based_adjacent_region_id()

std::set<unsigned> oomph::TetMeshFacet::one_based_adjacent_region_id ( ) const
inline

Return set of (one-based!) region IDs this facet is adjacent to.

238  {
240  }
std::set< unsigned > One_based_adjacent_region_id
Definition: tet_mesh.h:287

References One_based_adjacent_region_id.

Referenced by oomph::GmshTetScaffoldMesh::write_geo_file().

◆ one_based_boundary_id()

unsigned oomph::TetMeshFacet::one_based_boundary_id ( ) const
inline

Constant access to (one-based!) boundary IDs this facet lives on.

208  {
209  return One_based_boundary_id;
210  }

References One_based_boundary_id.

◆ one_based_region_that_facet_is_embedded_in()

unsigned oomph::TetMeshFacet::one_based_region_that_facet_is_embedded_in ( )
inline

Which (one-based) region is facet embedded in (if zero, it's not embedded in any region)

258  {
260  }

References One_based_region_id_that_facet_is_embedded_in.

Referenced by oomph::GmshTetScaffoldMesh::write_geo_file().

◆ output()

void oomph::TetMeshFacet::output ( std::ostream &  outfile) const
inline

Output.

264  {
265  unsigned n = Vertex_pt.size();
266  outfile << "ZONE I=" << n + 1 << std::endl;
267  for (unsigned j = 0; j < n; j++)
268  {
269  outfile << Vertex_pt[j]->x(0) << " " << Vertex_pt[j]->x(1) << " "
270  << Vertex_pt[j]->x(2) << " " << One_based_boundary_id
271  << std::endl;
272  }
273  outfile << Vertex_pt[0]->x(0) << " " << Vertex_pt[0]->x(1) << " "
274  << Vertex_pt[0]->x(2) << " " << One_based_boundary_id
275  << std::endl;
276  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, n, One_based_boundary_id, and Vertex_pt.

◆ set_one_based_adjacent_region_id()

void oomph::TetMeshFacet::set_one_based_adjacent_region_id ( const unsigned one_based_id)
inline

Set (one-based!) region ID this facet is adjacent to. Specification of zero argument is harmless as it indicates that that facet is not adjacent to any region.

232  {
233  One_based_adjacent_region_id.insert(one_based_id);
234  }

References One_based_adjacent_region_id.

◆ set_one_based_boundary_id()

void oomph::TetMeshFacet::set_one_based_boundary_id ( const unsigned one_based_id)
inline

Set (one-based!) boundary IDs this facet lives on. Passed to any existing vertices and to any future ones

215  {
216  One_based_boundary_id = one_based_id;
217  unsigned nv = Vertex_pt.size();
218  for (unsigned j = 0; j < nv; j++)
219  {
220  TetMeshVertex* v_pt = Vertex_pt[j];
221  if (v_pt != 0)
222  {
223  v_pt->set_one_based_boundary_id(one_based_id);
224  }
225  }
226  }

References j, One_based_boundary_id, oomph::TetMeshVertex::set_one_based_boundary_id(), and Vertex_pt.

◆ set_one_based_region_that_facet_is_embedded_in()

void oomph::TetMeshFacet::set_one_based_region_that_facet_is_embedded_in ( const unsigned one_based_region_id)
inline

Facet is to be embedded in specified one-based region.

251  {
252  One_based_region_id_that_facet_is_embedded_in = one_based_region_id;
253  }

References One_based_region_id_that_facet_is_embedded_in.

◆ set_vertex_pt()

void oomph::TetMeshFacet::set_vertex_pt ( const unsigned j,
TetMeshVertex vertex_pt 
)
inline

Set pointer to j-th vertex and pass one-based boundary id that may already have been set for this facet.

195  {
196  Vertex_pt[j] = vertex_pt;
197  // If not set yet, this is harmless since it simply over-writes
198  // the dummy value in vertex
199  TetMeshVertex* v_pt = Vertex_pt[j];
200  if (v_pt != 0)
201  {
202  v_pt->set_one_based_boundary_id(One_based_boundary_id);
203  }
204  }
TetMeshVertex * vertex_pt(const unsigned &j) const
Pointer to j-th vertex (const)
Definition: tet_mesh.h:187

References j, One_based_boundary_id, oomph::TetMeshVertex::set_one_based_boundary_id(), vertex_pt(), and Vertex_pt.

Referenced by oomph::DiskWithTorusAroundEdgeTetMeshFacetedSurface::DiskWithTorusAroundEdgeTetMeshFacetedSurface().

◆ vertex_pt()

TetMeshVertex* oomph::TetMeshFacet::vertex_pt ( const unsigned j) const
inline

Member Data Documentation

◆ One_based_adjacent_region_id

std::set<unsigned> oomph::TetMeshFacet::One_based_adjacent_region_id
private

Set of one-based adjacent region ids; no adjacent region if it's zero.

Referenced by one_based_adjacent_region_id(), and set_one_based_adjacent_region_id().

◆ One_based_boundary_id

unsigned oomph::TetMeshFacet::One_based_boundary_id
private

(One-based!) boundary IDs this facet lives on

Referenced by one_based_boundary_id(), output(), set_one_based_boundary_id(), and set_vertex_pt().

◆ One_based_region_id_that_facet_is_embedded_in

unsigned oomph::TetMeshFacet::One_based_region_id_that_facet_is_embedded_in
private

Facet is to be embedded in specified one-based region. Defaults to zero, indicating that its not embedded.

Referenced by facet_is_embedded_in_a_specified_region(), one_based_region_that_facet_is_embedded_in(), and set_one_based_region_that_facet_is_embedded_in().

◆ Vertex_pt

Vector<TetMeshVertex*> oomph::TetMeshFacet::Vertex_pt
private

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