oomph::CubicTetMeshFacetedSurface Class Reference

CubicTetMeshFacetedClosedSurface from (+/- half width)^2 x +/- half length. More...

#include <tetmesh_faceted_surfaces.h>

+ Inheritance diagram for oomph::CubicTetMeshFacetedSurface:

Public Member Functions

 CubicTetMeshFacetedSurface (const double &box_half_width, const double &box_half_length, const unsigned &one_based_boundary_id_offset=0)
 
 CubicTetMeshFacetedSurface (const double &box_half_width, const double &box_half_length, const Vector< double > &offset, const unsigned &one_based_boundary_id_offset=0)
 
 CubicTetMeshFacetedSurface (const unsigned &one_based_region_id, const double &box_half_width, const double &box_half_length, const unsigned &one_based_boundary_id_offset=0)
 
 CubicTetMeshFacetedSurface (const unsigned &one_based_region_id, const double &box_half_width, const double &box_half_length, const Vector< double > &offset, const unsigned &one_based_boundary_id_offset=0)
 
- Public Member Functions inherited from oomph::TetMeshFacetedClosedSurface
 TetMeshFacetedClosedSurface ()
 Constructor: More...
 
virtual ~TetMeshFacetedClosedSurface ()
 Empty destructor. More...
 
void enable_faceted_volume_represents_hole_for_gmsh ()
 Declare closed surface to represent hole for gmsh. More...
 
void disable_faceted_volume_represents_hole_for_gmsh ()
 Declare closed surface NOT to represent hole for gmsh. More...
 
bool faceted_volume_represents_hole_for_gmsh () const
 Does closed surface represent hole for gmsh? More...
 
const doubleinternal_point_for_tetgen (const unsigned &j, const unsigned &i) const
 i=th coordinate of the j-th internal point for tetgen More...
 
void set_hole_for_tetgen (const Vector< double > &hole_point)
 Specify coordinate of hole for tetgen. More...
 
void set_region_for_tetgen (const unsigned &region_id, const Vector< double > &region_point)
 
unsigned ninternal_point_for_tetgen ()
 
const intregion_id_for_tetgen (const unsigned &j) const
 
bool internal_point_identifies_hole_for_tetgen (const unsigned &j)
 Is j-th internal point for tetgen associated with a hole? More...
 
bool internal_point_identifies_region_for_tetgen (const unsigned &j)
 Is j-th internal point for tetgen associated with a region? More...
 
- Public Member Functions inherited from oomph::TetMeshFacetedSurface
 TetMeshFacetedSurface ()
 Constructor: More...
 
virtual ~TetMeshFacetedSurface ()
 Empty destructor. More...
 
unsigned nvertex () const
 Number of vertices. More...
 
unsigned nfacet () const
 Number of facets. More...
 
unsigned one_based_facet_boundary_id (const unsigned &j) const
 One-based boundary id of j-th facet. More...
 
unsigned one_based_vertex_boundary_id (const unsigned &j) const
 First (of possibly multiple) one-based boundary id of j-th vertex. More...
 
double vertex_coordinate (const unsigned &j, const unsigned &i) const
 i-th coordinate of j-th vertex More...
 
unsigned nvertex_on_facet (const unsigned &j) const
 Number of vertices defining the j-th facet. More...
 
bool boundaries_can_be_split_in_tetgen ()
 Test whether boundary can be split in tetgen. More...
 
void enable_boundaries_can_be_split_in_tetgen ()
 Test whether boundaries can be split in tetgen. More...
 
void disable_boundaries_can_be_split_in_tetgen ()
 Test whether boundaries can be split in tetgen. More...
 
TetMeshFacetfacet_pt (const unsigned &j) const
 Pointer to j-th facet. More...
 
TetMeshVertexvertex_pt (const unsigned &j) const
 Pointer to j-th vertex. More...
 
DiskLikeGeomObjectWithBoundariesgeom_object_with_boundaries_pt ()
 
void output (std::ostream &outfile) const
 Output. More...
 
void output (const std::string &filename) const
 Output. More...
 
virtual void boundary_zeta01 (const unsigned &facet_id, const double &zeta_boundary, Vector< double > &zeta)
 
virtual void boundary_zeta12 (const unsigned &facet_id, const double &zeta_boundary, Vector< double > &zeta)
 
virtual void boundary_zeta20 (const unsigned &facet_id, const double &zeta_boundary, Vector< double > &zeta)
 
Vector< unsignedvertex_index_in_tetgen (const unsigned &f)
 

Private Member Functions

void build_it (const unsigned &one_based_region_id, const double &box_half_width, const double &box_half_length, const Vector< double > &offset, const unsigned &one_based_boundary_id_offset)
 Build the thing. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::TetMeshFacetedSurface
Vector< TetMeshVertex * > Vertex_pt
 Vector pointers to vertices. More...
 
Vector< TetMeshFacet * > Facet_pt
 Vector of pointers to facets. More...
 
bool Boundaries_can_be_split_in_tetgen
 
Vector< Vector< unsigned > > Facet_vertex_index_in_tetgen
 
DiskLikeGeomObjectWithBoundariesGeom_object_with_boundaries_pt
 GeomObject with boundaries associated with this surface. More...
 

Detailed Description

CubicTetMeshFacetedClosedSurface from (+/- half width)^2 x +/- half length.

//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ CubicTetMeshFacetedSurface() [1/4]

oomph::CubicTetMeshFacetedSurface::CubicTetMeshFacetedSurface ( const double box_half_width,
const double box_half_length,
const unsigned one_based_boundary_id_offset = 0 
)
inline

Constructor: The six faces are enumerated consecutively starting from boundary_id_offset (defaults to zero in which case the boundaries are enumerated (in one-based fashion) 1,...,6.

77  {
78  unsigned one_based_region_id=0;
79  Vector<double> offset(3,0.0);
80  build_it(one_based_region_id,
81  box_half_width,
82  box_half_length,
83  offset,
84  one_based_boundary_id_offset);
85  }
void build_it(const unsigned &one_based_region_id, const double &box_half_width, const double &box_half_length, const Vector< double > &offset, const unsigned &one_based_boundary_id_offset)
Build the thing.
Definition: tetmesh_faceted_surfaces.h:142

References build_it().

◆ CubicTetMeshFacetedSurface() [2/4]

oomph::CubicTetMeshFacetedSurface::CubicTetMeshFacetedSurface ( const double box_half_width,
const double box_half_length,
const Vector< double > &  offset,
const unsigned one_based_boundary_id_offset = 0 
)
inline

Constructor: The six faces are enumerated consecutively starting from boundary_id_offset (defaults to zero in which case the boundaries are enumerated (in one-based fashion) 1,...,6.

94  {
95  unsigned one_based_region_id=0;
96  build_it(one_based_region_id,
97  box_half_width,
98  box_half_length,
99  offset,
100  one_based_boundary_id_offset);
101  }

References build_it().

◆ CubicTetMeshFacetedSurface() [3/4]

oomph::CubicTetMeshFacetedSurface::CubicTetMeshFacetedSurface ( const unsigned one_based_region_id,
const double box_half_width,
const double box_half_length,
const unsigned one_based_boundary_id_offset = 0 
)
inline

Constructor: Faceted surface defines region with (one-based!) ID one_based_region_id. If this parameter is zero, no region ID is assigned. The six faces are enumerated consecutively starting from boundary_id_offset (defaults to zero in which case the boundaries are enumerated (in one-based fashion) 1,...,6.

111  {
112  Vector<double> offset(3,0.0);
113  build_it(one_based_region_id,
114  box_half_width,
115  box_half_length,
116  offset,
117  one_based_boundary_id_offset);
118  }

References build_it().

◆ CubicTetMeshFacetedSurface() [4/4]

oomph::CubicTetMeshFacetedSurface::CubicTetMeshFacetedSurface ( const unsigned one_based_region_id,
const double box_half_width,
const double box_half_length,
const Vector< double > &  offset,
const unsigned one_based_boundary_id_offset = 0 
)
inline

Constructor: Faceted surface defines region with (one-based!) ID one_based_region_id. If this parameter is zero, no region ID is assigned. The six faces are enumerated consecutively starting from boundary_id_offset (defaults to zero in which case the boundaries are enumerated (in one-based fashion) 1,...,6.

130  {
131  build_it(one_based_region_id,
132  box_half_width,
133  box_half_length,
134  offset,
135  one_based_boundary_id_offset);
136  }

References build_it().

Member Function Documentation

◆ build_it()

void oomph::CubicTetMeshFacetedSurface::build_it ( const unsigned one_based_region_id,
const double box_half_width,
const double box_half_length,
const Vector< double > &  offset,
const unsigned one_based_boundary_id_offset 
)
inlineprivate

Build the thing.

147  {
148  // Make vertices
149  unsigned n_vertex=8;
150  Vertex_pt.resize(n_vertex);
151  Vector<double> box_point(3);
152 
153  box_point[0] = offset[0]-box_half_width;
154  box_point[1] = offset[1]-box_half_width;
155  box_point[2] = offset[2]-box_half_length;
156  Vertex_pt[0]=new TetMeshVertex(box_point);
157 
158  box_point[0] = offset[0]-box_half_width;
159  box_point[1] = offset[1]+box_half_width;
160  box_point[2] = offset[2]-box_half_length;
161  Vertex_pt[1]=new TetMeshVertex(box_point);
162 
163  box_point[0] = offset[0]-box_half_width;
164  box_point[1] = offset[1]+box_half_width;
165  box_point[2] = offset[2]+box_half_length;
166  Vertex_pt[2]=new TetMeshVertex(box_point);
167 
168  box_point[0] = offset[0]-box_half_width;
169  box_point[1] = offset[1]-box_half_width;
170  box_point[2] = offset[2]+box_half_length;
171  Vertex_pt[3]=new TetMeshVertex(box_point);
172 
173  box_point[0] = offset[0]+box_half_width;
174  box_point[1] = offset[1]-box_half_width;
175  box_point[2] = offset[2]-box_half_length;
176  Vertex_pt[4]=new TetMeshVertex(box_point);
177 
178  box_point[0] = offset[0]+box_half_width;
179  box_point[1] = offset[1]+box_half_width;
180  box_point[2] = offset[2]-box_half_length;
181  Vertex_pt[5]=new TetMeshVertex(box_point);
182 
183  box_point[0] = offset[0]+box_half_width;
184  box_point[1] = offset[1]+box_half_width;
185  box_point[2] = offset[2]+box_half_length;
186  Vertex_pt[6]=new TetMeshVertex(box_point);
187 
188  box_point[0] = offset[0]+box_half_width;
189  box_point[1] = offset[1]-box_half_width;
190  box_point[2] = offset[2]+box_half_length;
191  Vertex_pt[7]=new TetMeshVertex(box_point);
192 
193 
194  // Make facets
195  unsigned n_facet=6;
196  Facet_pt.resize(n_facet);
197 
198  unsigned n_vertex_on_facet=4;
199  Facet_pt[0]=new TetMeshFacet(n_vertex_on_facet);
200  unsigned one_based_boundary_id=1+one_based_boundary_id_offset;
201  Facet_pt[0]->set_one_based_boundary_id(one_based_boundary_id);
202  Facet_pt[0]->set_vertex_pt(0,Vertex_pt[0]);
203  Facet_pt[0]->set_vertex_pt(1,Vertex_pt[4]);
204  Facet_pt[0]->set_vertex_pt(2,Vertex_pt[7]);
205  Facet_pt[0]->set_vertex_pt(3,Vertex_pt[3]);
206 
207  Facet_pt[1]=new TetMeshFacet(n_vertex_on_facet);
208  one_based_boundary_id=2+one_based_boundary_id_offset;
209  Facet_pt[1]->set_one_based_boundary_id(one_based_boundary_id);
210  Facet_pt[1]->set_vertex_pt(0,Vertex_pt[4]);
211  Facet_pt[1]->set_vertex_pt(1,Vertex_pt[5]);
212  Facet_pt[1]->set_vertex_pt(2,Vertex_pt[6]);
213  Facet_pt[1]->set_vertex_pt(3,Vertex_pt[7]);
214 
215  // top
216  Facet_pt[2]=new TetMeshFacet(n_vertex_on_facet);
217  one_based_boundary_id=3+one_based_boundary_id_offset;
218  Facet_pt[2]->set_one_based_boundary_id(one_based_boundary_id);
219  Facet_pt[2]->set_vertex_pt(0,Vertex_pt[3]);
220  Facet_pt[2]->set_vertex_pt(1,Vertex_pt[7]);
221  Facet_pt[2]->set_vertex_pt(2,Vertex_pt[6]);
222  Facet_pt[2]->set_vertex_pt(3,Vertex_pt[2]);
223 
224  Facet_pt[3]=new TetMeshFacet(n_vertex_on_facet);
225  one_based_boundary_id=4+one_based_boundary_id_offset;
226  Facet_pt[3]->set_one_based_boundary_id(one_based_boundary_id);
227  Facet_pt[3]->set_vertex_pt(0,Vertex_pt[6]);
228  Facet_pt[3]->set_vertex_pt(1,Vertex_pt[5]);
229  Facet_pt[3]->set_vertex_pt(2,Vertex_pt[1]);
230  Facet_pt[3]->set_vertex_pt(3,Vertex_pt[2]);
231 
232  Facet_pt[4]=new TetMeshFacet(n_vertex_on_facet);
233  one_based_boundary_id=5+one_based_boundary_id_offset;
234  Facet_pt[4]->set_one_based_boundary_id(one_based_boundary_id);
235  Facet_pt[4]->set_vertex_pt(0,Vertex_pt[3]);
236  Facet_pt[4]->set_vertex_pt(1,Vertex_pt[2]);
237  Facet_pt[4]->set_vertex_pt(2,Vertex_pt[1]);
238  Facet_pt[4]->set_vertex_pt(3,Vertex_pt[0]);
239 
240  // bottom
241  Facet_pt[5]=new TetMeshFacet(n_vertex_on_facet);
242  one_based_boundary_id=6+one_based_boundary_id_offset;
243  Facet_pt[5]->set_one_based_boundary_id(one_based_boundary_id);
244  Facet_pt[5]->set_vertex_pt(0,Vertex_pt[5]);
245  Facet_pt[5]->set_vertex_pt(1,Vertex_pt[1]);
246  Facet_pt[5]->set_vertex_pt(2,Vertex_pt[0]);
247  Facet_pt[5]->set_vertex_pt(3,Vertex_pt[4]);
248 
249 
250  // Specify the adjacent region that is bounded by these facets
251  for (unsigned f=0;f<6;f++)
252  {
253  Facet_pt[f]->set_one_based_adjacent_region_id(one_based_region_id);
254  }
255 
256  // Is it a genuine region?
257  if (one_based_region_id>0)
258  {
259  set_region_for_tetgen(one_based_region_id-1,offset);
260  }
261  // Otherwise declare it to be a hole
262  else
263  {
264  set_hole_for_tetgen(offset);
266  }
267 
268  }
void enable_faceted_volume_represents_hole_for_gmsh()
Declare closed surface to represent hole for gmsh.
Definition: tet_mesh.h:550
void set_region_for_tetgen(const unsigned &region_id, const Vector< double > &region_point)
Definition: tet_mesh.h:582
void set_hole_for_tetgen(const Vector< double > &hole_point)
Specify coordinate of hole for tetgen.
Definition: tet_mesh.h:575
Vector< TetMeshVertex * > Vertex_pt
Vector pointers to vertices.
Definition: tet_mesh.h:483
Vector< TetMeshFacet * > Facet_pt
Vector of pointers to facets.
Definition: tet_mesh.h:486
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237

References oomph::TetMeshFacetedClosedSurface::enable_faceted_volume_represents_hole_for_gmsh(), f(), oomph::TetMeshFacetedSurface::Facet_pt, oomph::TetMeshFacetedClosedSurface::set_hole_for_tetgen(), oomph::TetMeshFacetedClosedSurface::set_region_for_tetgen(), and oomph::TetMeshFacetedSurface::Vertex_pt.

Referenced by CubicTetMeshFacetedSurface().


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