26#ifndef OOMPH_QUARTER_TUBE_MESH_TEMPLATE_HEADER
27#define OOMPH_QUARTER_TUBE_MESH_TEMPLATE_HEADER
29#ifndef OOMPH_QUARTER_TUBE_MESH_HEADER
30#error __FILE__ should only be included from quarter_tube_mesh.h.
44 template<
class ELEMENT>
54 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3);
178 for (
unsigned i = 0;
i < 3;
i++)
180 double error = std::fabs(
187 oomph_info <<
"Error in node killing for i " <<
i <<
" "
188 <<
error << std::endl;
281 for (
unsigned i = 0;
i < 3;
i++)
283 double error = std::fabs(
290 oomph_info <<
"Error in node killing for i " <<
i <<
" "
291 <<
error << std::endl;
321 for (
unsigned i = 0;
i < 3;
i++)
323 double error = std::fabs(
330 oomph_info <<
"Error in node killing for i " <<
i <<
" "
331 <<
error << std::endl;
436 for (
unsigned i = 0;
i < 3;
i++)
438 double error = std::fabs(
445 oomph_info <<
"Error in node killing for i " <<
i <<
" "
446 <<
error << std::endl;
477 for (
unsigned i = 0;
i < 3;
i++)
479 double error = std::fabs(
486 oomph_info <<
"Error in node killing for i " <<
i <<
" "
487 <<
error << std::endl;
502 if ((
i1 == 0) && (
i0 !=
n_p - 1))
515 for (
unsigned i = 0;
i < 3;
i++)
517 double error = std::fabs(
524 oomph_info <<
"Error in node killing for i " <<
i <<
" "
525 <<
error << std::endl;
604 <<
"The most probable cause is that the domain is not\n"
605 <<
"compatible with the mesh.\n"
606 <<
"For the QuarterTubeMesh, the domain must be\n"
607 <<
"topologically consistent with a quarter tube with a\n"
608 <<
"non-curved centreline.\n";
647 template<
class ELEMENT>
649 ELEMENT>::setup_algebraic_node_update()
658 std::ostringstream error_message;
660 <<
"Element in AlgebraicRefineableQuarterTubeMesh must be\n ";
661 error_message <<
"derived from AlgebraicElementBase\n";
662 error_message <<
"but it is of type: "
664 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
782 ref_value[3] =
s_br[0];
783 ref_value[4] =
s_br[1];
787 ref_value[5] =
s_tl[0];
788 ref_value[6] =
s_tl[1];
792 ->add_node_update_info(Central_region,
839 ref_value[0] =
rho_0;
842 ref_value[1] =
rho_1;
849 ref_value[3] =
s_br[0];
850 ref_value[4] =
s_br[1];
854 ref_value[5] =
s_tl[0];
855 ref_value[6] =
s_tl[1];
864 ->add_node_update_info(Lower_right_region,
911 ref_value[0] =
rho_0;
914 ref_value[1] =
rho_1;
921 ref_value[3] =
s_br[0];
922 ref_value[4] =
s_br[1];
926 ref_value[5] =
s_tl[0];
927 ref_value[6] =
s_tl[1];
936 ->add_node_update_info(Upper_left_region,
949 template<
class ELEMENT>
969 std::string error_message =
970 "Trying to update the nodal position at a time level\n";
971 error_message +=
"beyond the number of previous values in the nodes'\n";
972 error_message +=
"position timestepper. This seems highly suspect!\n";
973 error_message +=
"If you're sure the code behaves correctly\n";
974 error_message +=
"in your application, remove this warning \n";
975 error_message +=
"or recompile with PARNOID switched off.\n";
977 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
990 node_pt->vector_geom_object_pt(Central_region));
993 double rho_x = ref_value[0];
996 double rho_y = ref_value[1];
1005 s_br[0] = ref_value[3];
1006 s_br[1] = ref_value[4];
1020 s_tl[0] = ref_value[5];
1021 s_tl[1] = ref_value[6];
1037 template<
class ELEMENT>
1039 ELEMENT>::node_update_lower_right_region(
const unsigned&
t,
1058 std::string error_message =
1059 "Trying to update the nodal position at a time level";
1060 error_message +=
"beyond the number of previous values in the nodes'";
1061 error_message +=
"position timestepper. This seems highly suspect!";
1062 error_message +=
"If you're sure the code behaves correctly";
1063 error_message +=
"in your application, remove this warning ";
1064 error_message +=
"or recompile with PARNOID switched off.";
1066 std::string
function_name =
"AlgebraicRefineableQuarterTubeSectorMesh::";
1082 double rho_0 = ref_value[0];
1088 double rho_1 = ref_value[1];
1097 s_br[0] = ref_value[3];
1098 s_br[1] = ref_value[4];
1114 s_tl[0] = ref_value[5];
1115 s_tl[1] = ref_value[6];
1127 s_wall[0] = ref_value[7];
1128 s_wall[1] = ref_value[8];
1154 template<
class ELEMENT>
1156 ELEMENT>::node_update_upper_left_region(
const unsigned&
t,
1175 std::string error_message =
1176 "Trying to update the nodal position at a time level";
1177 error_message +=
"beyond the number of previous values in the nodes'";
1178 error_message +=
"position timestepper. This seems highly suspect!";
1179 error_message +=
"If you're sure the code behaves correctly";
1180 error_message +=
"in your application, remove this warning ";
1181 error_message +=
"or recompile with PARNOID switched off.";
1183 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
1200 double rho_0 = ref_value[0];
1203 double rho_1 = ref_value[1];
1218 s_br[0] = ref_value[3];
1219 s_br[1] = ref_value[4];
1232 s_tl[0] = ref_value[5];
1233 s_tl[1] = ref_value[6];
1245 s_wall[0] = ref_value[7];
1246 s_wall[1] = ref_value[8];
1273 template<
class ELEMENT>
1300 double z = ref_value[2];
1319 ref_value[3] =
s_br[0];
1320 ref_value[4] =
s_br[1];
1337 ref_value[5] =
s_tl[0];
1338 ref_value[6] =
s_tl[1];
1349 double rho_1 = ref_value[1];
1357 double rho_0 = ref_value[0];
1373 ref_value[7] =
s_wall[0];
1374 ref_value[8] =
s_wall[1];
Base class for algebraic elements.
Algebraic nodes are nodes with an algebraic positional update function.
Vector< GeomObject * > & vector_geom_object_pt(const int &id)
Return vector of geometric objects involved in id-th update function.
GeomObject * geom_object_pt(const unsigned &i)
Return pointer to i-th geometric object involved in default (usually first) update function.
void kill_node_update_info(const int &id=0)
Erase algebraic node update information for id-th node update function. Id defaults to 0.
Vector< double > & vector_ref_value()
Return vector of reference values involved in default (usually first) update function.
void add_node_update_info(const int &id, AlgebraicMesh *mesh_pt, const Vector< GeomObject * > &geom_object_pt, const Vector< double > &ref_value, const bool &called_from_constructor=false)
Add algebraic update information for node: What's the ID of the mesh update function (typically used ...
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.
void setup_boundary_element_info()
Setup lookup schemes which establish whic elements are located next to mesh's boundaries (wrapper to ...
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
A general Finite Element class.
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject,...
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object.
unsigned nnode() const
Return the number of nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
A geometric object is an object that provides a parametrised description of its shape via the functio...
unsigned ndim() const
Access function to # of Eulerian coordinates.
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
Vector< Node * > Node_pt
Vector of pointers to nodes.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
void convert_to_boundary_node(Node *&node_pt, const Vector< FiniteElement * > &finite_element_pt)
A function that upgrades an ordinary node to a boundary node We shouldn't ever really use this,...
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
void set_boundary_coordinate_exists(const unsigned &i)
Set boundary coordinate on the i-th boundary to be existing.
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
unsigned long nelement() const
Return number of elements in the mesh.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
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....
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.
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)
Constructor: Pass pointer to geometric object that specifies the wall, start and end coordinates on t...
Vector< double > Xi_hi
Upper limits for the coordinates along the wall.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
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...