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

#include <refineable_tetgen_mesh.template.h>

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

Public Member Functions

 RefineableTetgenMesh (TetMeshFacetedClosedSurface *const &outer_boundary_pt, Vector< TetMeshFacetedSurface * > &internal_closed_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 TetMeshFacetedClosedSurface that specifies the outer boundary of the domain and any number of internal closed curves, specified by TetMeshFacetedSurfaces. Also specify target volume for uniform element size. More...
 
virtual ~RefineableTetgenMesh ()
 Empty Destructor. More...
 
void refine_uniformly (DocInfo &doc_info)
 Refine mesh uniformly and doc process. More...
 
unsigned unrefine_uniformly ()
 Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level) More...
 
void adapt (const Vector< double > &elem_error)
 Adapt mesh, based on elemental error provided. More...
 
bool projection_is_disabled ()
 Is projection of old solution onto new mesh disabled? More...
 
void disable_projection ()
 Disable projection of old solution onto new mesh. More...
 
void enable_projection ()
 Disable projection of old solution onto new mesh. More...
 
- Public Member Functions inherited from oomph::TetgenMesh< ELEMENT >
 TetgenMesh ()
 Empty constructor. More...
 
 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. More...
 
 TetgenMesh (tetgenio &tetgen_data, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Constructor with tetgenio data structure. More...
 
 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. More...
 
 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. More...
 
 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. More...
 
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. More...
 
 ~TetgenMesh ()
 Empty destructor. More...
 
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. More...
 
bool tetgenio_exists () const
 Boolen defining whether tetgenio object has been built or not. More...
 
tetgenio *& tetgenio_pt ()
 Access to the triangulateio representation of the mesh. More...
 
void set_deep_copy_tetgenio_pt (tetgenio *const &tetgenio_pt)
 Set the tetgen pointer by a deep copy. More...
 
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". More...
 

Protected Member Functions

 RefineableTetgenMesh (const Vector< double > &target_volume, tetgenio *const &tetgen_io_pt, TetMeshFacetedClosedSurface *const &outer_boundary_pt, Vector< TetMeshFacetedSurface * > &internal_surface_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper, const bool &use_attributes=false)
 Specialised constructor used during adaptation only. Element sizes are specified by vector tetgen_io is passed in from previous mesh (is then modified to build new mesh) Ditto with use_attributes, which comes from the previous mesh. More...
 
void initialise_adaptation_data ()
 Helper function to initialise data associated with adaptation. More...
 
void update_faceted_surface_using_face_mesh (TetMeshFacetedSurface *&faceted_surface_pt)
 Helper function that updates the input faceted surface by using the flattened elements from FaceMesh(es) that are constructed for the boundaries associated with the segments of the polygon. More...
 
void surface_remesh_for_inner_hole_boundaries ()
 Generate a new faceted representation of the inner hole boundaries. More...
 
void snap_nodes_onto_boundary (RefineableTetgenMesh< ELEMENT > *&new_mesh_pt, const unsigned &b)
 Snap the boundary nodes onto any curvilinear boundaries. More...
 
- Protected Member Functions inherited from oomph::TetgenMesh< ELEMENT >
void build_from_scaffold (TimeStepper *time_stepper_pt, const bool &use_attributes)
 Build mesh from scaffold. More...
 
void setup_reverse_lookup_schemes_for_faceted_surface (TetMeshFacetedSurface *const &faceted_surface_pt)
 Function to setup the reverse look-up schemes. More...
 

Protected Attributes

bool Projection_is_disabled
 Disable projection of solution onto new mesh during adaptation. More...
 
bool Corner_elements_must_be_split
 Corner elements which have all of their nodes on the outer boundary are to be split into elements which have some non-boundary nodes. More...
 
- Protected Attributes inherited from oomph::TetgenMesh< ELEMENT >
TetgenScaffoldMesh * Tmp_mesh_pt
 Temporary scaffold mesh. More...
 
bool Tetgenio_exists
 Boolean to indicate whether a tetgenio representation of the mesh exists. More...
 
tetgenio * Tetgenio_pt
 Tetgen representation of mesh. More...
 
bool Use_attributes
 Boolean flag to indicate whether to use attributes or not (required for multidomain meshes) More...
 

Detailed Description

template<class ELEMENT>
class oomph::RefineableTetgenMesh< ELEMENT >

Definition at line 47 of file refineable_tetgen_mesh.template.h.

Constructor & Destructor Documentation

◆ RefineableTetgenMesh() [1/2]

template<class ELEMENT >
oomph::RefineableTetgenMesh< ELEMENT >::RefineableTetgenMesh ( TetMeshFacetedClosedSurface *const &  outer_boundary_pt,
Vector< TetMeshFacetedSurface * > &  internal_closed_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 TetMeshFacetedClosedSurface that specifies the outer boundary of the domain and any number of internal closed curves, specified by TetMeshFacetedSurfaces. Also specify target volume for uniform element size.

Definition at line 55 of file refineable_tetgen_mesh.template.h.

References oomph::RefineableTetgenMesh< ELEMENT >::initialise_adaptation_data().

◆ RefineableTetgenMesh() [2/2]

template<class ELEMENT >
oomph::RefineableTetgenMesh< ELEMENT >::RefineableTetgenMesh ( const Vector< double > &  target_volume,
tetgenio *const &  tetgen_io_pt,
TetMeshFacetedClosedSurface *const &  outer_boundary_pt,
Vector< TetMeshFacetedSurface * > &  internal_surface_pt,
TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper,
const bool &  use_attributes = false 
)
inlineprotected

Specialised constructor used during adaptation only. Element sizes are specified by vector tetgen_io is passed in from previous mesh (is then modified to build new mesh) Ditto with use_attributes, which comes from the previous mesh.

Definition at line 82 of file refineable_tetgen_mesh.template.h.

References oomph::TetgenMesh< ELEMENT >::build_from_scaffold(), oomph::TetgenMesh< ELEMENT >::deep_copy_of_tetgenio(), oomph::RefineableTetgenMesh< ELEMENT >::initialise_adaptation_data(), oomph::TetgenMesh< ELEMENT >::setup_reverse_lookup_schemes_for_faceted_surface(), oomph::TetgenMesh< ELEMENT >::Tetgenio_exists, oomph::TetgenMesh< ELEMENT >::Tetgenio_pt, and oomph::TetgenMesh< ELEMENT >::Tmp_mesh_pt.

◆ ~RefineableTetgenMesh()

template<class ELEMENT >
virtual oomph::RefineableTetgenMesh< ELEMENT >::~RefineableTetgenMesh ( )
inlinevirtual

Empty Destructor.

Definition at line 183 of file refineable_tetgen_mesh.template.h.

Member Function Documentation

◆ adapt()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::adapt ( const Vector< double > &  elem_error)

Adapt mesh, based on elemental error provided.

Adapt problem based on specified elemental error estimates.

Definition at line 450 of file refineable_tetgen_mesh.template.cc.

References oomph::TetgenMesh< ELEMENT >::tetgenio_pt().

◆ disable_projection()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::disable_projection ( )
inline

Disable projection of old solution onto new mesh.

Definition at line 218 of file refineable_tetgen_mesh.template.h.

References oomph::RefineableTetgenMesh< ELEMENT >::Projection_is_disabled.

◆ enable_projection()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::enable_projection ( )
inline

Disable projection of old solution onto new mesh.

Definition at line 224 of file refineable_tetgen_mesh.template.h.

References oomph::RefineableTetgenMesh< ELEMENT >::Projection_is_disabled.

◆ initialise_adaptation_data()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::initialise_adaptation_data ( )
inlineprotected

Helper function to initialise data associated with adaptation.

By default we project solution onto new mesh during adaptation

Definition at line 232 of file refineable_tetgen_mesh.template.h.

References oomph::RefineableTetgenMesh< ELEMENT >::Projection_is_disabled.

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

◆ projection_is_disabled()

template<class ELEMENT >
bool oomph::RefineableTetgenMesh< ELEMENT >::projection_is_disabled ( )
inline

Is projection of old solution onto new mesh disabled?

Definition at line 212 of file refineable_tetgen_mesh.template.h.

References oomph::RefineableTetgenMesh< ELEMENT >::Projection_is_disabled.

◆ refine_uniformly()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::refine_uniformly ( DocInfo &  doc_info)
inline

Refine mesh uniformly and doc process.

Definition at line 186 of file refineable_tetgen_mesh.template.h.

◆ snap_nodes_onto_boundary()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::snap_nodes_onto_boundary ( RefineableTetgenMesh< ELEMENT > *&  new_mesh_pt,
const unsigned &  b 
)
protected

Snap the boundary nodes onto any curvilinear boundaries.

Definition at line 246 of file refineable_tetgen_mesh.template.cc.

◆ surface_remesh_for_inner_hole_boundaries()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::surface_remesh_for_inner_hole_boundaries
protected

Generate a new faceted representation of the inner hole boundaries.

Definition at line 227 of file refineable_tetgen_mesh.template.cc.

◆ unrefine_uniformly()

template<class ELEMENT >
unsigned oomph::RefineableTetgenMesh< ELEMENT >::unrefine_uniformly ( )
inline

Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarsest permitted level)

Definition at line 197 of file refineable_tetgen_mesh.template.h.

◆ update_faceted_surface_using_face_mesh()

template<class ELEMENT >
void oomph::RefineableTetgenMesh< ELEMENT >::update_faceted_surface_using_face_mesh ( TetMeshFacetedSurface *&  faceted_surface_pt)
protected

Helper function that updates the input faceted surface by using the flattened elements from FaceMesh(es) that are constructed for the boundaries associated with the segments of the polygon.

List of vertex nodes

Definition at line 49 of file refineable_tetgen_mesh.template.cc.

Member Data Documentation

◆ Corner_elements_must_be_split

template<class ELEMENT >
bool oomph::RefineableTetgenMesh< ELEMENT >::Corner_elements_must_be_split
protected

Corner elements which have all of their nodes on the outer boundary are to be split into elements which have some non-boundary nodes.

Definition at line 260 of file refineable_tetgen_mesh.template.h.

◆ Projection_is_disabled

template<class ELEMENT >
bool oomph::RefineableTetgenMesh< ELEMENT >::Projection_is_disabled
protected

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