26 #ifndef OOMPH_QUARTER_TUBE_MESH_HEADER
27 #define OOMPH_QUARTER_TUBE_MESH_HEADER
30 #include "../generic/refineable_brick_mesh.h"
31 #include "../generic/macro_element.h"
32 #include "../generic/domain.h"
33 #include "../generic/algebraic_elements.h"
34 #include "../generic/brick_mesh.h"
35 #include "../generic/macro_element_node_update_element.h"
63 template<
class ELEMENT>
74 const double& fract_mid,
76 const unsigned& nlayer,
158 template<
class ELEMENT>
174 const double& fract_mid,
176 const unsigned& nlayer,
179 wall_pt, xi_lo, fract_mid, xi_hi, nlayer, time_stepper_pt)
182 for (
unsigned ielem = 0; ielem < QuarterTubeMesh<ELEMENT>::nelement();
194 for (
unsigned iel = 0; iel < QuarterTubeMesh<ELEMENT>::nelement(); iel++)
197 ELEMENT* ref_el_pt =
dynamic_cast<ELEMENT*
>(el_pt);
199 trees_pt.push_back(octree_root_pt);
205 unsigned success_flag =
207 if (success_flag == 0)
209 oomph_info <<
"Successfully built octree forest " << std::endl;
231 class MacroElementNodeUpdateNode;
236 template<
class ELEMENT>
252 const double& fract_mid,
254 const unsigned& nlayer,
258 wall_pt, xi_lo, fract_mid, xi_hi, nlayer, time_stepper_pt),
260 wall_pt, xi_lo, fract_mid, xi_hi, nlayer, time_stepper_pt)
263 ELEMENT* el_pt =
new ELEMENT;
266 std::ostringstream error_message;
267 error_message <<
"Base class for ELEMENT in "
268 <<
"MacroElementNodeUpdateRefineableQuarterTubeMesh needs"
269 <<
"to be of type MacroElementNodeUpdateElement!\n";
270 error_message <<
"Whereas it is: typeid(el_pt).name()"
271 <<
typeid(el_pt).
name() << std::endl;
274 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
276 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh()";
302 if (update_all_solid_nodes)
305 "Doesn't make sense to use an MacroElementNodeUpdateMesh with\n";
307 "SolidElements so specifying update_all_solid_nodes=true\n";
308 error_message +=
"doesn't make sense either\n";
311 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
312 function_name +=
"node_update()";
327 unsigned n_element = this->
nelement();
328 for (
unsigned i = 0;
i < n_element;
i++)
331 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(this->
element_pt(
i));
339 std::ostringstream error_message;
341 <<
"Failed to upcast to MacroElementNodeUpdateElementBase\n";
342 error_message <<
"Element must be derived from "
343 "MacroElementNodeUpdateElementBase\n";
344 error_message <<
"but it is of type " <<
typeid(el_pt).
name();
347 "MacroElementNodeUpdateRefineableQuaterCircleSectorMesh::\n";
348 function_name +=
"setup_macro_element_node_update()";
357 geom_object_pt[0] = this->
Wall_pt;
361 el_pt->set_node_update_info(geom_object_pt);
366 geom_object_pt[0] = this->
Wall_pt;
435 template<
class ELEMENT>
451 const double& fract_mid,
453 const unsigned& nlayer,
454 const double centre_box_size = 1.0,
457 wall_pt, xi_lo, fract_mid, xi_hi, nlayer, time_stepper_pt),
459 wall_pt, xi_lo, fract_mid, xi_hi, nlayer, time_stepper_pt),
463 ELEMENT* el_pt =
new ELEMENT;
466 std::ostringstream error_message;
468 error_message <<
"Base class for ELEMENT in "
469 <<
"AlgebraicRefineableQuarterTubeMesh needs"
470 <<
"to be of type AlgebraicElement!\n";
471 error_message <<
"Whereas it is: typeid(el_pt).name()"
472 <<
typeid(el_pt).
name() << std::endl;
474 std::string function_name =
" AlgebraicRefineableQuarterTubeMesh::\n";
475 function_name +=
"AlgebraicRefineableQuarterTubeMesh()";
507 std::ostringstream error_message;
508 error_message <<
"AxialSpacingFctPt has not been implemented "
509 <<
"for the AlgebraicRefineableQuarterTubeMesh\n";
512 " AlgebraicRefineableQuarterTubeMesh::AxialSpacingFctPt()";
528 if (update_all_solid_nodes)
531 "Doesn't make sense to use an AlgebraicMesh with\n";
533 "SolidElements so specifying update_all_solid_nodes=true\n";
534 error_message +=
"doesn't make sense either\n";
536 std::string function_name =
" AlgebraicRefineableQuarterTubeMesh::";
537 function_name +=
"node_update()";
579 std::ostringstream error_message;
580 error_message <<
"The node update fct id is " <<
id
584 std::string function_name =
" AlgebraicRefineableQuarterTubeMesh::";
585 function_name +=
"algebraic_node_update()";
602 unsigned n_update =
id.size();
603 for (
unsigned i = 0;
i < n_update;
i++)
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: algebraic_elements.h:506
Definition: algebraic_elements.h:599
void node_update(const bool &update_all_solid_nodes=false)
Definition: algebraic_elements.h:653
unsigned self_test()
Self test: check consistentency of multiple node updates.
Definition: algebraic_elements.h:786
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Definition: algebraic_elements.h:823
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Definition: algebraic_elements.h:620
Definition: algebraic_elements.h:55
int node_update_fct_id()
Default (usually first if there are multiple ones) node update fct id.
Definition: algebraic_elements.h:146
AlgebraicMesh version of RefineableQuarterTubeMesh.
Definition: quarter_tube_mesh.template.h:439
void node_update_central_region(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_tube_mesh.template.cc:961
unsigned self_test()
Run self-test for algebraic mesh – return 0/1 for OK/failure.
Definition: quarter_tube_mesh.template.h:495
void setup_algebraic_node_update()
Setup algebraic update operation for all nodes.
Definition: quarter_tube_mesh.template.cc:660
void node_update_lower_right_region(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_tube_mesh.template.cc:1051
double Lambda_x
Fractional width of central region.
Definition: quarter_tube_mesh.template.h:622
double Centre_box_size
Size of centre box.
Definition: quarter_tube_mesh.template.h:611
void update_node_update(AlgebraicNode *&node_pt)
Definition: quarter_tube_mesh.template.h:595
double Lambda_y
Fractional height of central region.
Definition: quarter_tube_mesh.template.h:625
QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Definition: quarter_tube_mesh.template.h:505
void node_update_upper_left_region(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_tube_mesh.template.cc:1168
@ Lower_right_region
Definition: quarter_tube_mesh.template.h:617
@ Upper_left_region
Definition: quarter_tube_mesh.template.h:618
@ Central_region
Definition: quarter_tube_mesh.template.h:616
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)
Definition: quarter_tube_mesh.template.h:448
void update_node_update_in_region(AlgebraicNode *&node_pt, int ®ion_id)
Definition: quarter_tube_mesh.template.cc:1288
void node_update(const bool &update_all_solid_nodes=false)
Definition: quarter_tube_mesh.template.h:525
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Definition: quarter_tube_mesh.template.h:551
Base class for brick meshes (meshes made of 3D brick elements).
Definition: brick_mesh.h:178
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
Definition: domain.h:116
Definition: elements.h:1313
Definition: geom_objects.h:101
Base class for elements that allow MacroElement-based node update.
Definition: macro_element_node_update_element.h:197
Definition: macro_element_node_update_element.h:360
void set_geom_object_vector_pt(Vector< GeomObject * > geom_object_vector_pt)
Definition: macro_element_node_update_element.h:510
void node_update(const bool &update_all_solid_nodes=false)
Definition: macro_element_node_update_element.h:387
Domain *& macro_domain_pt()
Broken assignment operator.
Definition: macro_element_node_update_element.h:376
MacroElementNodeUpdate version of RefineableQuarterTubeMesh.
Definition: quarter_tube_mesh.template.h:240
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)
Definition: quarter_tube_mesh.template.h:249
void node_update(const bool &update_all_solid_nodes=false)
Definition: quarter_tube_mesh.template.h:299
virtual ~MacroElementNodeUpdateRefineableQuarterTubeMesh()
Destructor: empty.
Definition: quarter_tube_mesh.template.h:292
void setup_macro_element_node_update()
Definition: quarter_tube_mesh.template.h:325
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Definition: mesh.h:460
unsigned self_test()
Self-test: Check elements and nodes. Return 0 for OK.
Definition: mesh.cc:778
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: oomph_definitions.h:222
Definition: quarter_tube_domain.h:43
AxialSpacingFctPt & axial_spacing_fct_pt()
Definition: quarter_tube_domain.h:116
BLSquashFctPt & bl_squash_fct_pt()
Definition: quarter_tube_domain.h:94
double(* BLSquashFctPt)(const double &s)
Definition: quarter_tube_domain.h:87
double(* AxialSpacingFctPt)(const double &xi)
Definition: quarter_tube_domain.h:111
Definition: quarter_tube_mesh.template.h:65
QuarterTubeDomain * Domain_pt
Pointer to domain.
Definition: quarter_tube_mesh.template.h:121
Vector< double > Xi_lo
Lower limits for the coordinates along the wall.
Definition: quarter_tube_mesh.template.h:127
QuarterTubeDomain * domain_pt() const
Access function to underlying domain.
Definition: quarter_tube_mesh.template.h:114
QuarterTubeMesh(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)
Definition: quarter_tube_mesh.template.cc:44
QuarterTubeDomain * domain_pt()
Access function to domain.
Definition: quarter_tube_mesh.template.h:92
virtual QuarterTubeDomain::AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function for axial spacing.
Definition: quarter_tube_mesh.template.h:108
GeomObject * Wall_pt
Pointer to the geometric object that represents the curved wall.
Definition: quarter_tube_mesh.template.h:124
Vector< double > Xi_hi
Upper limits for the coordinates along the wall.
Definition: quarter_tube_mesh.template.h:133
double Fract_mid
Fraction along wall where outer ring is to be divided.
Definition: quarter_tube_mesh.template.h:130
virtual ~QuarterTubeMesh()
Destructor: empty.
Definition: quarter_tube_mesh.template.h:80
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
Definition: quarter_tube_mesh.template.h:86
QuarterTubeDomain::BLSquashFctPt & bl_squash_fct_pt()
Definition: quarter_tube_mesh.template.h:101
Definition: refineable_brick_mesh.h:61
Definition: refineable_brick_element.h:68
Definition: quarter_tube_mesh.template.h:162
virtual ~RefineableQuarterTubeMesh()
Destructor: empty.
Definition: quarter_tube_mesh.template.h:221
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)
Definition: quarter_tube_mesh.template.h:171
Definition: timesteppers.h:231
TreeForest * Forest_pt
Forest representation of the mesh.
Definition: refineable_mesh.h:768
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
string name
Definition: plotDoE.py:33
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86