Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | 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 >

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)
 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)
 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. More...
 
void build_tetgenio (TetMeshFacetedSurface *const &outer_boundary_pt, Vector< TetMeshFacetedSurface *> &internal_surface_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)
 

Protected Member Functions

void initialise_adaptation_data ()
 Helper function to initialise data associated with adaptation. 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...
 

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...
 

Private 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...
 

Detailed Description

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

Definition at line 54 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 
)
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 64 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 
)
inlineprivate

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 89 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 >::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 235 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 52 of file refineable_tetgen_mesh.template.cc.

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

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

◆ disable_projection()

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

Disable projection of old solution onto new mesh.

Definition at line 270 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 276 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 285 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 264 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 238 of file refineable_tetgen_mesh.template.h.

◆ 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 249 of file refineable_tetgen_mesh.template.h.

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

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 302 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: