27 #ifndef OOMPH_REFINEABLE_TETGEN_MESH_HEADER
28 #define OOMPH_REFINEABLE_TETGEN_MESH_HEADER
32 #include <oomph-lib-config.h>
36 #include "../generic/tetgen_scaffold_mesh.h"
37 #include "../generic/tet_mesh.h"
38 #include "../generic/refineable_mesh.h"
46 template<
class ELEMENT>
47 class RefineableTetgenMesh :
public virtual TetgenMesh<ELEMENT>,
48 public virtual RefineableTetMeshBase
58 const double& element_volume,
60 const bool& use_attributes =
false,
61 const bool& split_corner_elements =
false,
62 Vector<double>*
const& target_element_volume_in_region_pt =
nullptr)
64 internal_closed_surface_pt,
68 split_corner_elements,
69 target_element_volume_in_region_pt),
88 const bool& use_attributes =
false)
96 MeshChecker::assert_geometric_element<TElementGeometricBase, ELEMENT>(3);
129 std::stringstream input_string_stream;
130 input_string_stream <<
"Vqra";
133 char tetswitches[100];
134 sprintf(tetswitches,
"%s", input_string_stream.str().c_str());
149 delete tetgen_input_pt;
161 for (
unsigned i = 0;
i <
n;
i++)
170 for (
unsigned b = 0;
b <
nb;
b++)
172 this->
template setup_boundary_coordinates<ELEMENT>(
b);
189 throw OomphLibError(
"refine_uniformly() not implemented yet",
200 throw OomphLibError(
"unrefine_uniformly() not implemented yet",
271 template<
class ELEMENT>
283 const double& element_volume,
285 const bool& use_attributes =
false,
286 const bool& split_corner_elements =
false)
288 internal_closed_surface_pt,
292 split_corner_elements),
294 internal_closed_surface_pt,
298 split_corner_elements)
302 set_lagrangian_nodal_coordinates();
314 const bool& use_attributes =
false)
324 set_lagrangian_nodal_coordinates();
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: oomph_utilities.h:499
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
Definition: oomph_definitions.h:222
DocInfo doc_info()
Access fct for DocInfo.
Definition: refineable_mesh.h:243
Definition: uns_adapt_3d_fs.cc:1258
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)
Definition: refineable_tetgen_mesh.template.h:308
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)
Definition: refineable_tetgen_mesh.template.h:280
virtual ~RefineableSolidTetgenMesh()
Empty Destructor.
Definition: refineable_tetgen_mesh.template.h:328
Definition: uns_adapt_3d_fs.cc:86
void surface_remesh_for_inner_hole_boundaries()
bool Projection_is_disabled
Disable projection of solution onto new mesh during adaptation.
Definition: refineable_tetgen_mesh.template.h:255
bool projection_is_disabled()
Is projection of old solution onto new mesh disabled?
Definition: refineable_tetgen_mesh.template.h:212
void refine_uniformly(DocInfo &doc_info)
Refine mesh uniformly and doc process.
Definition: refineable_tetgen_mesh.template.h:186
bool Corner_elements_must_be_split
Definition: refineable_tetgen_mesh.template.h:260
void initialise_adaptation_data()
Helper function to initialise data associated with adaptation.
Definition: uns_adapt_3d_fs.cc:589
void enable_projection()
Disable projection of old solution onto new mesh.
Definition: refineable_tetgen_mesh.template.h:224
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)
Definition: refineable_tetgen_mesh.template.h:55
virtual ~RefineableTetgenMesh()
Empty Destructor.
Definition: refineable_tetgen_mesh.template.h:183
void update_faceted_surface_using_face_mesh(TetMeshFacetedClosedSurface *faceted_surface_pt)
Definition: uns_adapt_3d_fs.cc:250
void snap_nodes_onto_boundary(RefineableTetgenMesh< ELEMENT > *&new_mesh_pt, const unsigned &b)
Snap the boundary nodes onto any curvilinear boundaries.
double Max_element_size
Max permitted element size.
Definition: uns_adapt_3d_fs.cc:734
double Min_element_size
Min permitted element size.
Definition: uns_adapt_3d_fs.cc:737
double Max_permitted_edge_ratio
Max edge ratio before remesh gets triggered.
Definition: uns_adapt_3d_fs.cc:740
void adapt(const Vector< double > &elem_error)
Adapt mesh, based on elemental error provided.
unsigned unrefine_uniformly()
Definition: refineable_tetgen_mesh.template.h:197
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)
Definition: refineable_tetgen_mesh.template.h:82
void disable_projection()
Disable projection of old solution onto new mesh.
Definition: refineable_tetgen_mesh.template.h:218
void snap_nodes_onto_geometric_objects()
Definition: tet_mesh.cc:483
TimeStepper * Time_stepper_pt
Timestepper used to build nodes.
Definition: tet_mesh.h:1057
Vector< TetMeshFacetedSurface * > Internal_surface_pt
Vector to faceted surfaces that define internal boundaries.
Definition: tet_mesh.h:1041
TetMeshFacetedClosedSurface * Outer_boundary_pt
Faceted surface that defines outer boundaries.
Definition: tet_mesh.h:1038
Definition: tet_mesh.h:538
Definition: tet_mesh.h:306
Definition: tetgen_mesh.template.h:52
tetgenio * Tetgenio_pt
Tetgen representation of mesh.
Definition: tetgen_mesh.template.h:720
void setup_reverse_lookup_schemes_for_faceted_surface(TetMeshFacetedSurface *const &faceted_surface_pt)
Function to setup the reverse look-up schemes.
Definition: tetgen_mesh.template.cc:828
void deep_copy_of_tetgenio(tetgenio *const &input_pt, tetgenio *&output_pt)
Definition: tetgen_mesh.template.cc:865
bool Tetgenio_exists
Definition: tetgen_mesh.template.h:717
TetgenScaffoldMesh * Tmp_mesh_pt
Temporary scaffold mesh.
Definition: tetgen_mesh.template.h:713
void build_from_scaffold(TimeStepper *time_stepper_pt, const bool &use_attributes)
Build mesh from scaffold.
Definition: tetgen_mesh.template.cc:48
Definition: tetgen_scaffold_mesh.h:43
Definition: timesteppers.h:231
REAL * tetrahedronvolumelist
Definition: tetgen.h:323
int numberoftetrahedra
Definition: tetgen.h:325
int nb
Definition: level2_impl.h:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
void tetrahedralize(tetgenbehavior *b, tetgenio *in, tetgenio *out, tetgenio *addin=NULL, tetgenio *bgmin=NULL)