Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oomph::TetgenMesh< ELEMENT > Class Template Reference

Unstructured tet mesh based on output from Tetgen: http://wias-berlin.de/software/tetgen/. More...

#include <tetgen_mesh.h>

Inheritance diagram for oomph::TetgenMesh< ELEMENT >:
oomph::RefineableTetgenMesh< ELEMENT > oomph::SolidTetgenMesh< ELEMENT > oomph::RefineableSolidTetgenMesh< ELEMENT >

Public Member Functions

 TetgenMesh ()
 Empty constructor.
 
 TetgenMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &face_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Constructor with the input files.
 
 TetgenMesh (tetgenio &tetgen_data, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Constructor with tetgenio data structure.
 
 TetgenMesh (const std::string &node_file_name, const std::string &element_file_name, const std::string &face_file_name, const bool &split_corner_elements, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Constructor with the input files. Setting the boolean flag to true splits "corner" elements, i.e. elements that that have at least three faces on a domain boundary. The relevant elements are split without introducing hanging nodes so the sons have a "worse" shape than their fathers. However, this step avoids otherwise-hard-to-diagnose problems in fluids problems where the application of boundary conditions at such "corner" elements can overconstrain the solution.
 
 TetgenMesh (tetgenio &tetgen_data, const bool &split_corner_elements, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Constructor with tetgen data structure Setting the boolean flag to true splits "corner" elements, i.e. elements that that have at least three faces on a domain boundary. The relevant elements are split without introducing hanging nodes so the sons have a "worse" shape than their fathers. However, this step avoids otherwise-hard-to-diagnose problems in fluids problems where the application of boundary conditions at such "corner" elements can overconstrain the solution.
 
 TetgenMesh (TetMeshFacetedClosedSurface *const &outer_boundary_pt, Vector< TetMeshFacetedSurface * > &internal_surface_pt, const double &element_volume, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false, const bool &split_corner_elements=false, Vector< double > *const &target_element_volume_in_region_pt=nullptr)
 Build mesh, based on a TetgenMeshFactedClosedSurface that specifies the outer boundary of the domain and any number of internal boundaries, specified by TetMeshFacetedSurfaces. Also specify target size for uniform element size. Optionally specify the target element volume in each region.
 
void build_tetgenio (TetMeshFacetedSurface *const &outer_boundary_pt, Vector< TetMeshFacetedSurface * > &internal_surface_pt, Vector< double > *const &target_element_volume_in_region_pt, tetgenio &tetgen_io)
 Build tetgenio object from the TetMeshFacetedSurfaces.
 
 ~TetgenMesh ()
 Empty destructor.
 
void set_mesh_level_time_stepper (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper.
 
bool tetgenio_exists () const
 Boolen defining whether tetgenio object has been built or not.
 
tetgenio *& tetgenio_pt ()
 Access to the triangulateio representation of the mesh.
 
void set_deep_copy_tetgenio_pt (tetgenio *const &tetgenio_pt)
 Set the tetgen pointer by a deep copy.
 
void deep_copy_of_tetgenio (tetgenio *const &input_pt, tetgenio *&output_pt)
 Transfer tetgenio data from the input to the output The output is assumed to have been constructed and "empty".
 

Protected Member Functions

void build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes)
 Build mesh from scaffold.
 
void setup_reverse_lookup_schemes_for_faceted_surface (TetMeshFacetedSurface *const &faceted_surface_pt)
 Function to setup the reverse look-up schemes.
 

Protected Attributes

TetgenScaffoldMeshTmp_mesh_pt
 Temporary scaffold mesh.
 
bool Tetgenio_exists
 Boolean to indicate whether a tetgenio representation of the mesh exists.
 
tetgenioTetgenio_pt
 Tetgen representation of mesh.
 
bool Use_attributes
 Boolean flag to indicate whether to use attributes or not (required for multidomain meshes)
 

Detailed Description

template<class ELEMENT>
class oomph::TetgenMesh< ELEMENT >

Unstructured tet mesh based on output from Tetgen: http://wias-berlin.de/software/tetgen/.

Definition at line 50 of file tetgen_mesh.h.

Constructor & Destructor Documentation

◆ TetgenMesh() [1/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( )
inline

Empty constructor.

Definition at line 54 of file tetgen_mesh.h.

◆ TetgenMesh() [2/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( const std::string &  node_file_name,
const std::string &  element_file_name,
const std::string &  face_file_name,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool use_attributes = false 
)
inline

◆ TetgenMesh() [3/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( tetgenio tetgen_data,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool use_attributes = false 
)
inline

◆ TetgenMesh() [4/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( const std::string &  node_file_name,
const std::string &  element_file_name,
const std::string &  face_file_name,
const bool split_corner_elements,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool use_attributes = false 
)
inline

Constructor with the input files. Setting the boolean flag to true splits "corner" elements, i.e. elements that that have at least three faces on a domain boundary. The relevant elements are split without introducing hanging nodes so the sons have a "worse" shape than their fathers. However, this step avoids otherwise-hard-to-diagnose problems in fluids problems where the application of boundary conditions at such "corner" elements can overconstrain the solution.

Definition at line 146 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::build_from_scaffold(), oomph::TetgenMesh< ELEMENT >::Tetgenio_exists, oomph::TetgenMesh< ELEMENT >::Tetgenio_pt, oomph::TetgenMesh< ELEMENT >::Tmp_mesh_pt, and oomph::TetgenMesh< ELEMENT >::Use_attributes.

◆ TetgenMesh() [5/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( tetgenio tetgen_data,
const bool split_corner_elements,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool use_attributes = false 
)
inline

Constructor with tetgen data structure Setting the boolean flag to true splits "corner" elements, i.e. elements that that have at least three faces on a domain boundary. The relevant elements are split without introducing hanging nodes so the sons have a "worse" shape than their fathers. However, this step avoids otherwise-hard-to-diagnose problems in fluids problems where the application of boundary conditions at such "corner" elements can overconstrain the solution.

Definition at line 202 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::build_from_scaffold(), oomph::TetgenMesh< ELEMENT >::Tetgenio_exists, oomph::TetgenMesh< ELEMENT >::Tetgenio_pt, oomph::TetgenMesh< ELEMENT >::Tmp_mesh_pt, and oomph::TetgenMesh< ELEMENT >::Use_attributes.

◆ TetgenMesh() [6/6]

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::TetgenMesh ( TetMeshFacetedClosedSurface *const outer_boundary_pt,
Vector< TetMeshFacetedSurface * > &  internal_surface_pt,
const double element_volume,
TimeStepper time_stepper_pt = &Mesh::Default_TimeStepper,
const bool use_attributes = false,
const bool split_corner_elements = false,
Vector< double > *const target_element_volume_in_region_pt = nullptr 
)
inline

Build mesh, based on a TetgenMeshFactedClosedSurface that specifies the outer boundary of the domain and any number of internal boundaries, specified by TetMeshFacetedSurfaces. Also specify target size for uniform element size. Optionally specify the target element volume in each region.

Definition at line 252 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::build_from_scaffold(), oomph::TetgenMesh< ELEMENT >::build_tetgenio(), oomph::TetgenMesh< ELEMENT >::Tetgenio_exists, oomph::TetgenMesh< ELEMENT >::Tetgenio_pt, oomph::TetgenMesh< ELEMENT >::Tmp_mesh_pt, and oomph::TetgenMesh< ELEMENT >::Use_attributes.

◆ ~TetgenMesh()

template<class ELEMENT >
oomph::TetgenMesh< ELEMENT >::~TetgenMesh ( )
inline

Empty destructor.

Definition at line 688 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::Tetgenio_exists, and oomph::TetgenMesh< ELEMENT >::Tetgenio_pt.

Member Function Documentation

◆ build_from_scaffold()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::build_from_scaffold ( TimeStepper time_stepper_pt,
const bool use_attributes 
)
protected

◆ build_tetgenio()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::build_tetgenio ( TetMeshFacetedSurface *const outer_boundary_pt,
Vector< TetMeshFacetedSurface * > &  internal_surface_pt,
Vector< double > *const target_element_volume_in_region_pt,
tetgenio tetgen_io 
)
inline

Build tetgenio object from the TetMeshFacetedSurfaces.

ALH: This may not be needed

Definition at line 436 of file tetgen_mesh.h.

Referenced by oomph::TetgenMesh< ELEMENT >::TetgenMesh().

◆ deep_copy_of_tetgenio()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::deep_copy_of_tetgenio ( tetgenio *const input_pt,
tetgenio *&  output_pt 
)

Transfer tetgenio data from the input to the output The output is assumed to have been constructed and "empty".

Definition at line 854 of file tetgen_mesh.template.cc.

Referenced by oomph::RefineableTetgenMesh< ELEMENT >::RefineableTetgenMesh(), and oomph::TetgenMesh< ELEMENT >::set_deep_copy_tetgenio_pt().

◆ set_deep_copy_tetgenio_pt()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::set_deep_copy_tetgenio_pt ( tetgenio *const tetgenio_pt)
inline

◆ set_mesh_level_time_stepper()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::set_mesh_level_time_stepper ( TimeStepper *const time_stepper_pt,
const bool preserve_existing_data 
)
inline

Overload set_mesh_level_time_stepper so that the stored time stepper now corresponds to the new timestepper.

Definition at line 699 of file tetgen_mesh.h.

◆ setup_reverse_lookup_schemes_for_faceted_surface()

template<class ELEMENT >
void oomph::TetgenMesh< ELEMENT >::setup_reverse_lookup_schemes_for_faceted_surface ( TetMeshFacetedSurface *const faceted_surface_pt)
protected

Function to setup the reverse look-up schemes.

Helper function to set up the reverse look up scheme for facets. This is used to set up boundary coordinates.

Definition at line 818 of file tetgen_mesh.template.cc.

◆ tetgenio_exists()

template<class ELEMENT >
bool oomph::TetgenMesh< ELEMENT >::tetgenio_exists ( ) const
inline

Boolen defining whether tetgenio object has been built or not.

Definition at line 706 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::Tetgenio_exists.

◆ tetgenio_pt()

template<class ELEMENT >
tetgenio *& oomph::TetgenMesh< ELEMENT >::tetgenio_pt ( )
inline

Access to the triangulateio representation of the mesh.

Definition at line 712 of file tetgen_mesh.h.

References oomph::TetgenMesh< ELEMENT >::Tetgenio_pt.

Member Data Documentation

◆ Tetgenio_exists

template<class ELEMENT >
bool oomph::TetgenMesh< ELEMENT >::Tetgenio_exists
protected

◆ Tetgenio_pt

template<class ELEMENT >
tetgenio* oomph::TetgenMesh< ELEMENT >::Tetgenio_pt
protected

◆ Tmp_mesh_pt

template<class ELEMENT >
TetgenScaffoldMesh* oomph::TetgenMesh< ELEMENT >::Tmp_mesh_pt
protected

◆ Use_attributes

template<class ELEMENT >
bool oomph::TetgenMesh< ELEMENT >::Use_attributes
protected

Boolean flag to indicate whether to use attributes or not (required for multidomain meshes)

Definition at line 756 of file tetgen_mesh.h.

Referenced by oomph::TetgenMesh< ELEMENT >::TetgenMesh(), oomph::TetgenMesh< ELEMENT >::TetgenMesh(), oomph::TetgenMesh< ELEMENT >::TetgenMesh(), oomph::TetgenMesh< ELEMENT >::TetgenMesh(), and oomph::TetgenMesh< ELEMENT >::TetgenMesh().


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