oomph::TetMeshVertex Class Reference

#include <tet_mesh.h>

Public Member Functions

 TetMeshVertex (const Vector< double > &x)
 Constructor: Pass coordinates (length 3!) More...
 
 TetMeshVertex (Node *const &node_pt)
 
void set_zeta_in_geom_object (const Vector< double > &zeta)
 Set intrinisic coordinates in GeomObject. More...
 
Vector< doublezeta_in_geom_object () const
 
double x (const unsigned &i) const
 i-th coordinate More...
 
unsigned one_based_boundary_id () const
 First (of possibly multiple) one-based boundary id. More...
 

Private Member Functions

void set_one_based_boundary_id (const unsigned &id)
 Set of (one-based!) boundary IDs this vertex lives on. More...
 

Private Attributes

Vector< doubleX
 Coordinate vector. More...
 
std::set< unsignedOne_based_boundary_id
 Set of (one-based!) boundary IDs this vertex lives on. More...
 
Vector< doubleZeta_in_geom_object
 

Friends

class TetMeshFacet
 Only friends can set boundary ID – the facet is my only friend! More...
 

Detailed Description

Vertex for Tet mesh generation. Can lie on multiple boundaries (identified via one-based enumeration!) and can have intrinisic coordinates in a DiskLikeGeomObjectWithBoundaries.

Constructor & Destructor Documentation

◆ TetMeshVertex() [1/2]

oomph::TetMeshVertex::TetMeshVertex ( const Vector< double > &  x)
inline

Constructor: Pass coordinates (length 3!)

56  : X(x)
57  {
58 #ifdef PARANOID
59  if (X.size() != 3)
60  {
61  std::ostringstream error_stream;
62  error_stream << "TetMeshVertex should only be used in 3D!\n"
63  << "Your Vector of coordinates, contains data for "
64  << x.size() << "-dimensional coordinates." << std::endl;
65  throw OomphLibError(
67  }
68 #endif
69  }
Vector< double > X
Coordinate vector.
Definition: tet_mesh.h:147
double x(const unsigned &i) const
i-th coordinate
Definition: tet_mesh.h:124
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, x(), and X.

◆ TetMeshVertex() [2/2]

oomph::TetMeshVertex::TetMeshVertex ( Node *const &  node_pt)
inline
73  {
74  const unsigned n_dim = node_pt->ndim();
75 #ifdef PARANOID
76  if (n_dim != 3)
77  {
78  std::ostringstream error_stream;
79  error_stream << "TetMeshVertex should only be used in 3D!\n"
80  << "Your Node contains data for " << n_dim
81  << "-dimensional coordinates." << std::endl;
82  throw OomphLibError(
84  }
85 #endif
86 
87  // Copy over the positions from the node
88  X.resize(n_dim);
89  for (unsigned i = 0; i < n_dim; ++i)
90  {
91  X[i] = node_pt->x(i);
92  }
93  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9

References i, oomph::Node::ndim(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::Node::x(), and X.

Member Function Documentation

◆ one_based_boundary_id()

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

First (of possibly multiple) one-based boundary id.

131  {
132  if (One_based_boundary_id.size() == 0)
133  {
134  return 0;
135  }
136  return *(One_based_boundary_id.begin());
137  }
std::set< unsigned > One_based_boundary_id
Set of (one-based!) boundary IDs this vertex lives on.
Definition: tet_mesh.h:150

References One_based_boundary_id.

◆ set_one_based_boundary_id()

void oomph::TetMeshVertex::set_one_based_boundary_id ( const unsigned id)
inlineprivate

Set of (one-based!) boundary IDs this vertex lives on.

142  {
143  One_based_boundary_id.insert(id);
144  }

References One_based_boundary_id.

Referenced by oomph::TetMeshFacet::set_one_based_boundary_id(), and oomph::TetMeshFacet::set_vertex_pt().

◆ set_zeta_in_geom_object()

void oomph::TetMeshVertex::set_zeta_in_geom_object ( const Vector< double > &  zeta)
inline

Set intrinisic coordinates in GeomObject.

98  {
99 #ifdef PARANOID
100  if (zeta.size() != 2)
101  {
102  std::ostringstream error_stream;
103  error_stream
104  << "TetMeshVertex should only be used in 3D!\n"
105  << "Your Vector of intrinisic coordinates, contains data for "
106  << zeta.size() << "-dimensional coordinates but should be 2!"
107  << std::endl;
108  throw OomphLibError(
109  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
110  }
111 #endif
112 
114  }
Vector< double > Zeta_in_geom_object
Definition: tet_mesh.h:154
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Eigen::zeta(), and Zeta_in_geom_object.

◆ x()

double oomph::TetMeshVertex::x ( const unsigned i) const
inline

i-th coordinate

125  {
126  return X[i];
127  }

References i, and X.

Referenced by oomph::TetMeshBase::setup_boundary_coordinates(), TetMeshVertex(), and oomph::GmshTetScaffoldMesh::write_geo_file().

◆ zeta_in_geom_object()

Vector<double> oomph::TetMeshVertex::zeta_in_geom_object ( ) const
inline

Get intrinisic coordinates in GeomObject (returns zero sized vector if no such coordinates have been specified)

119  {
120  return Zeta_in_geom_object;
121  }

References Zeta_in_geom_object.

Referenced by oomph::DiskTetMeshFacetedSurface::boundary_zeta01(), and oomph::TetMeshBase::snap_nodes_onto_geometric_objects().

Friends And Related Function Documentation

◆ TetMeshFacet

friend class TetMeshFacet
friend

Only friends can set boundary ID – the facet is my only friend!

Member Data Documentation

◆ One_based_boundary_id

std::set<unsigned> oomph::TetMeshVertex::One_based_boundary_id
private

Set of (one-based!) boundary IDs this vertex lives on.

Referenced by one_based_boundary_id(), and set_one_based_boundary_id().

◆ X

Vector<double> oomph::TetMeshVertex::X
private

Coordinate vector.

Referenced by TetMeshVertex(), and x().

◆ Zeta_in_geom_object

Vector<double> oomph::TetMeshVertex::Zeta_in_geom_object
private

Intrinisic coordinates in GeomObject (zero sized if there isn't one.

Referenced by set_zeta_in_geom_object(), and zeta_in_geom_object().


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