26#ifndef OOMPH_QUARTER_TUBE_MESH_HEADER
27#define OOMPH_QUARTER_TUBE_MESH_HEADER
62 template<
class ELEMENT>
156 template<
class ELEMENT>
204 if (success_flag == 0)
206 oomph_info <<
"Successfully built octree forest " << std::endl;
228 class MacroElementNodeUpdateNode;
233 template<
class ELEMENT>
260 ELEMENT*
el_pt =
new ELEMENT;
263 std::ostringstream error_message;
264 error_message <<
"Base class for ELEMENT in "
265 <<
"MacroElementNodeUpdateRefineableQuarterTubeMesh needs"
266 <<
"to be of type MacroElementNodeUpdateElement!\n";
267 error_message <<
"Whereas it is: typeid(el_pt).name()"
271 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
273 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh()";
301 std::string error_message =
302 "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
304 "SolidElements so specifying update_all_solid_nodes=true\n";
305 error_message +=
"doesn't make sense either\n";
308 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
325 for (
unsigned i = 0;
i < n_element;
i++)
336 std::ostringstream error_message;
338 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
339 error_message <<
"Element must be derived from "
340 "MacroElementNodeUpdateElementBase\n";
341 error_message <<
"but it is of type " <<
typeid(
el_pt).
name();
344 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
354 geom_object_pt[0] = this->
Wall_pt;
358 el_pt->set_node_update_info(geom_object_pt);
363 geom_object_pt[0] = this->
Wall_pt;
429 template<
class ELEMENT>
457 ELEMENT*
el_pt =
new ELEMENT;
460 std::ostringstream error_message;
462 error_message <<
"Base class for ELEMENT in "
463 <<
"AlgebraicRefineableQuarterTubeMesh needs"
464 <<
"to be of type AlgebraicElement!\n";
465 error_message <<
"Whereas it is: typeid(el_pt).name()"
468 std::string
function_name =
" AlgebraicRefineableQuarterTubeMesh::\n";
501 std::ostringstream error_message;
502 error_message <<
"AxialSpacingFctPt has not been implemented "
503 <<
"for the AlgebraicRefineableQuarterTubeMesh\n";
506 " AlgebraicRefineableQuarterTubeMesh::AxialSpacingFctPt()";
524 std::string error_message =
525 "Doesn't make sense to use an AlgebraicMesh with\n";
527 "SolidElements so specifying update_all_solid_nodes=true\n";
528 error_message +=
"doesn't make sense either\n";
530 std::string
function_name =
" AlgebraicRefineableQuarterTubeMesh::";
573 std::ostringstream error_message;
574 error_message <<
"The node update fct id is " <<
id
578 std::string
function_name =
" AlgebraicRefineableQuarterTubeMesh::";
Base class for algebraic elements.
Algebraic meshes contain AlgebraicElements and AlgebraicNodes. They implement the node update functio...
void node_update(const bool &update_all_solid_nodes=false)
Update all nodal positions via algebraic node update functions [Doesn't make sense to use this mesh w...
unsigned self_test()
Self test: check consistentency of multiple node updates.
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Add the specified GeomObject to the list of geometric objects associated with this AlgebraicMesh; rem...
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Algebraic nodes are nodes with an algebraic positional update function.
int node_update_fct_id()
Default (usually first if there are multiple ones) node update fct id.
AlgebraicMesh version of RefineableQuarterTubeMesh.
void node_update_central_region(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for a node that is located in the central region.
unsigned self_test()
Run self-test for algebraic mesh – return 0/1 for OK/failure.
void setup_algebraic_node_update()
Setup algebraic update operation for all nodes.
void node_update_lower_right_region(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for a node that is located in the lower-right region.
double Lambda_x
Fractional width of central region.
double Centre_box_size
Size of centre box.
QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Broken version of the QuarterTubeDomain function Function is broken because axial spacing isn't imple...
void update_node_update(AlgebraicNode *&node_pt)
Update the node update info for specified algebraic node following any spatial mesh adaptation.
double Lambda_y
Fractional height of central region.
void node_update_upper_left_region(const unsigned &t, AlgebraicNode *&node_pt)
Algebraic update function for a node that is located in the upper-left region.
AlgebraicRefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, const double centre_box_size=1.0, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object, start and end coordinates of the geometric object and ...
void update_node_update_in_region(AlgebraicNode *&node_pt, int ®ion_id)
Update algebraic node update function for nodes in the region defined by region_id.
void node_update(const bool &update_all_solid_nodes=false)
Resolve mesh update: Update current nodal positions via algebraic node update. [Doesn't make sense to...
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Implement the algebraic node update function for a node at time level t (t=0: present; t>0: previous)...
Base class for brick meshes (meshes made of 3D brick elements).
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
A general Finite Element class.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
A geometric object is an object that provides a parametrised description of its shape via the functio...
Base class for elements that allow MacroElement-based node update.
MacroElementNodeUpdateMeshes contain MacroElementNodeUpdateNodes which have their own node update fun...
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Set geometric objects associated with MacroElementNodeUpdateMesh; this must also be called from the c...
Domain *& macro_domain_pt()
Broken assignment operator.
void node_update(const bool &update_all_solid_nodes=false)
Update all nodal positions via sparse MacroElement-based update functions. If a Node is hanging its p...
MacroElementNodeUpdate version of RefineableQuarterTubeMesh.
MacroElementNodeUpdateRefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object, start and end coordinates on the geometric object and ...
void node_update(const bool &update_all_solid_nodes=false)
Resolve mesh update: Update current nodal positions via sparse MacroElement-based update....
virtual ~MacroElementNodeUpdateRefineableQuarterTubeMesh()
Destructor: empty.
void setup_macro_element_node_update()
Setup all the information that's required for MacroElement-based node update: Tell the elements that ...
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
unsigned self_test()
Self-test: Check elements and nodes. Return 0 for OK.
unsigned long nelement() const
Return number of elements in the mesh.
An OcTreeForest consists of a collection of OcTreeRoots. Each member tree can have neighbours to its ...
OcTreeRoot is a OcTree that forms the root of a (recursive) octree. The "root node" is special as it ...
An OomphLibError object which should be thrown when an run-time error is encountered....
Quarter tube as domain. Domain is bounded by curved boundary which is represented by a GeomObject....
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the outer two macro elements towards the wall by mapping ...
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the outer two macro elements towards the wall...
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
3D quarter tube mesh class. The domain is specified by the GeomObject that identifies boundary 3....
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
QuarterTubeDomain * Domain_pt
Pointer to domain.
Vector< double > Xi_lo
Lower limits for the coordinates along the wall.
QuarterTubeDomain * domain_pt() const
Access function to underlying domain.
GeomObject * Wall_pt
Pointer to the geometric object that represents the curved wall.
Vector< double > Xi_hi
Upper limits for the coordinates along the wall.
virtual QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function for axial spacing.
QuarterTubeDomain * domain_pt()
Access function to domain.
QuarterTubeDomain::BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the outer macro elements towards the wall by mapping the ...
double Fract_mid
Fraction along wall where outer ring is to be divided.
virtual ~QuarterTubeMesh()
Destructor: empty.
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
Adaptative version of the QuarterTubeMesh base mesh. The domain is specified by the GeomObject that i...
virtual ~RefineableQuarterTubeMesh()
Destructor: empty.
RefineableQuarterTubeMesh(GeomObject *wall_pt, const Vector< double > &xi_lo, const double &fract_mid, const Vector< double > &xi_hi, const unsigned &nlayer, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor for adaptive deformable quarter tube mesh class. The domain is specified by the GeomObjec...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
TreeForest * Forest_pt
Forest representation of the mesh.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...