27#ifndef OOMPH_REFINEABLE_TETGEN_MESH_HEADER
28#define OOMPH_REFINEABLE_TETGEN_MESH_HEADER
32#include <oomph-lib-config.h>
45 template<
class ELEMENT>
57 const double& element_volume,
95 MeshChecker::assert_geometric_element<TElementGeometricBase, ELEMENT>(3);
152 delete tetgen_input_pt;
160 for (
unsigned f = 0; f <
n_facet; f++)
171 std::ostringstream error_message;
172 error_message <<
"Boundary IDs have to be one-based. Yours is " << b
187 for (
unsigned i = 0;
i < n;
i++)
190 for (
unsigned f = 0; f <
n_facet; f++)
203 std::ostringstream error_message;
204 error_message <<
"Boundary IDs have to be one-based. Yours is "
216 for (
unsigned b = 0; b <
nb; b++)
234 throw OomphLibError(
"refine_uniformly() not implemented yet",
245 throw OomphLibError(
"unrefine_uniformly() not implemented yet",
314 template<
class ELEMENT>
326 const double& element_volume,
345 set_lagrangian_nodal_coordinates();
367 set_lagrangian_nodal_coordinates();
Information for documentation of results: Directory and file number to enable output in the form RESL...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
unsigned nboundary() const
Return number of boundaries.
An OomphLibError object which should be thrown when an run-time error is encountered....
DocInfo doc_info()
Access fct for DocInfo.
RefineableSolidTetgenMesh(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)
Build mesh from specified triangulation and associated target areas for elements in it.
RefineableSolidTetgenMesh(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 closed curve that specifies the outer boundary of the domain and any number of i...
virtual ~RefineableSolidTetgenMesh()
Empty Destructor.
Base class for refineable tet meshes.
double Max_element_size
Max permitted element size.
double Min_element_size
Min permitted element size.
double Max_permitted_edge_ratio
Max edge ratio before remesh gets triggered.
void surface_remesh_for_inner_hole_boundaries()
Generate a new faceted representation of the inner hole boundaries.
bool Projection_is_disabled
Disable projection of solution onto new mesh during adaptation.
bool projection_is_disabled()
Is projection of old solution onto new mesh disabled?
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(...
void refine_uniformly(DocInfo &doc_info)
Refine mesh uniformly and doc process.
bool Corner_elements_must_be_split
Corner elements which have all of their nodes on the outer boundary are to be split into elements whi...
void initialise_adaptation_data()
Helper function to initialise data associated with adaptation.
void enable_projection()
Disable projection of old solution onto new mesh.
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 an...
virtual ~RefineableTetgenMesh()
Empty Destructor.
void snap_nodes_onto_boundary(RefineableTetgenMesh< ELEMENT > *&new_mesh_pt, const unsigned &b)
Snap the boundary nodes onto any curvilinear boundaries.
void adapt(const Vector< double > &elem_error)
Adapt mesh, based on elemental error provided.
unsigned unrefine_uniformly()
Unrefine mesh uniformly: Return 0 for success, 1 for failure (if unrefinement has reached the coarses...
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 ...
void disable_projection()
Disable projection of old solution onto new mesh.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
void snap_nodes_onto_geometric_objects()
Move the nodes on boundaries with associated GeomObjects so that they exactly coincide with the geome...
TimeStepper * Time_stepper_pt
Timestepper used to build nodes.
std::map< unsigned, TetMeshFacetedSurface * > Tet_mesh_faceted_surface_pt
Reverse lookup scheme: Pointer to faceted surface (if any!) associated with boundary b.
Vector< TetMeshFacetedSurface * > Internal_surface_pt
Vector to faceted surfaces that define internal boundaries.
std::map< unsigned, TetMeshFacet * > Tet_mesh_facet_pt
Reverse lookup scheme: Pointer to facet (if any!) associated with boundary b.
TetMeshFacetedClosedSurface * Outer_boundary_pt
Faceted surface that defines outer boundaries.
Base class for closed tet mesh boundary bounded by polygonal planar facets.
Base class for tet mesh boundary defined by polygonal planar facets.
TetMeshFacet * facet_pt(const unsigned &j) const
Pointer to j-th facet.
unsigned nfacet() const
Number of facets.
unsigned one_based_facet_boundary_id(const unsigned &j) const
One-based boundary id of j-th facet.
Unstructured tet mesh based on output from Tetgen: http://wias-berlin.de/software/tetgen/.
void build_from_scaffold(TimeStepper *time_stepper_pt, const bool &use_attributes)
Build mesh from scaffold.
tetgenio * Tetgenio_pt
Tetgen representation of mesh.
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 an...
bool Tetgenio_exists
Boolean to indicate whether a tetgenio representation of the mesh exists.
TetgenScaffoldMesh * Tmp_mesh_pt
Temporary scaffold mesh.
Mesh that is based on input files generated by the tetrahedra mesh generator tetgen.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).