26#ifndef OOMPH_QUARTER_TUBE_MESH_TEMPLATE_CC
27#define OOMPH_QUARTER_TUBE_MESH_TEMPLATE_CC
43 template<
class ELEMENT>
53 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3);
179 for (
unsigned i = 0;
i < 3;
i++)
181 double error = std::fabs(
188 oomph_info <<
"Error in node killing for i " <<
i <<
" "
189 <<
error << std::endl;
285 for (
unsigned i = 0;
i < 3;
i++)
287 double error = std::fabs(
294 oomph_info <<
"Error in node killing for i " <<
i <<
" "
295 <<
error << std::endl;
326 for (
unsigned i = 0;
i < 3;
i++)
328 double error = std::fabs(
335 oomph_info <<
"Error in node killing for i " <<
i <<
" "
336 <<
error << std::endl;
443 for (
unsigned i = 0;
i < 3;
i++)
445 double error = std::fabs(
452 oomph_info <<
"Error in node killing for i " <<
i <<
" "
453 <<
error << std::endl;
484 for (
unsigned i = 0;
i < 3;
i++)
486 double error = std::fabs(
493 oomph_info <<
"Error in node killing for i " <<
i <<
" "
494 <<
error << std::endl;
510 if ((
i1 == 0) && (
i0 !=
n_p - 1))
523 for (
unsigned i = 0;
i < 3;
i++)
525 double error = std::fabs(
532 oomph_info <<
"Error in node killing for i " <<
i <<
" "
533 <<
error << std::endl;
614 <<
"The most probable cause is that the domain is not\n"
615 <<
"compatible with the mesh.\n"
616 <<
"For the QuarterTubeMesh, the domain must be\n"
617 <<
"topologically consistent with a quarter tube with a\n"
618 <<
"non-curved centreline.\n";
658 template<
class ELEMENT>
660 ELEMENT>::setup_algebraic_node_update()
669 std::ostringstream error_message;
671 <<
"Element in AlgebraicRefineableQuarterTubeMesh must be\n ";
672 error_message <<
"derived from AlgebraicElementBase\n";
673 error_message <<
"but it is of type: "
675 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
793 ref_value[3] =
s_br[0];
794 ref_value[4] =
s_br[1];
798 ref_value[5] =
s_tl[0];
799 ref_value[6] =
s_tl[1];
803 ->add_node_update_info(Central_region,
850 ref_value[0] =
rho_0;
853 ref_value[1] =
rho_1;
860 ref_value[3] =
s_br[0];
861 ref_value[4] =
s_br[1];
865 ref_value[5] =
s_tl[0];
866 ref_value[6] =
s_tl[1];
875 ->add_node_update_info(Lower_right_region,
922 ref_value[0] =
rho_0;
925 ref_value[1] =
rho_1;
932 ref_value[3] =
s_br[0];
933 ref_value[4] =
s_br[1];
937 ref_value[5] =
s_tl[0];
938 ref_value[6] =
s_tl[1];
947 ->add_node_update_info(Upper_left_region,
960 template<
class ELEMENT>
980 std::string error_message =
981 "Trying to update the nodal position at a time level\n";
982 error_message +=
"beyond the number of previous values in the nodes'\n";
983 error_message +=
"position timestepper. This seems highly suspect!\n";
984 error_message +=
"If you're sure the code behaves correctly\n";
985 error_message +=
"in your application, remove this warning \n";
986 error_message +=
"or recompile with PARNOID switched off.\n";
988 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
1001 node_pt->vector_geom_object_pt(Central_region));
1004 double rho_x = ref_value[0];
1007 double rho_y = ref_value[1];
1016 s_br[0] = ref_value[3];
1017 s_br[1] = ref_value[4];
1031 s_tl[0] = ref_value[5];
1032 s_tl[1] = ref_value[6];
1049 template<
class ELEMENT>
1051 ELEMENT>::node_update_lower_right_region(
const unsigned&
t,
1070 std::string error_message =
1071 "Trying to update the nodal position at a time level";
1072 error_message +=
"beyond the number of previous values in the nodes'";
1073 error_message +=
"position timestepper. This seems highly suspect!";
1074 error_message +=
"If you're sure the code behaves correctly";
1075 error_message +=
"in your application, remove this warning ";
1076 error_message +=
"or recompile with PARNOID switched off.";
1078 std::string
function_name =
"AlgebraicRefineableQuarterTubeSectorMesh::";
1094 double rho_0 = ref_value[0];
1100 double rho_1 = ref_value[1];
1109 s_br[0] = ref_value[3];
1110 s_br[1] = ref_value[4];
1126 s_tl[0] = ref_value[5];
1127 s_tl[1] = ref_value[6];
1139 s_wall[0] = ref_value[7];
1140 s_wall[1] = ref_value[8];
1166 template<
class ELEMENT>
1168 ELEMENT>::node_update_upper_left_region(
const unsigned&
t,
1187 std::string error_message =
1188 "Trying to update the nodal position at a time level";
1189 error_message +=
"beyond the number of previous values in the nodes'";
1190 error_message +=
"position timestepper. This seems highly suspect!";
1191 error_message +=
"If you're sure the code behaves correctly";
1192 error_message +=
"in your application, remove this warning ";
1193 error_message +=
"or recompile with PARNOID switched off.";
1195 std::string
function_name =
"AlgebraicRefineableQuarterTubeMesh::";
1212 double rho_0 = ref_value[0];
1215 double rho_1 = ref_value[1];
1230 s_br[0] = ref_value[3];
1231 s_br[1] = ref_value[4];
1244 s_tl[0] = ref_value[5];
1245 s_tl[1] = ref_value[6];
1257 s_wall[0] = ref_value[7];
1258 s_wall[1] = ref_value[8];
1286 template<
class ELEMENT>
1313 double z = ref_value[2];
1332 ref_value[3] =
s_br[0];
1333 ref_value[4] =
s_br[1];
1351 ref_value[5] =
s_tl[0];
1352 ref_value[6] =
s_tl[1];
1363 double rho_1 = ref_value[1];
1371 double rho_0 = ref_value[0];
1387 ref_value[7] =
s_wall[0];
1388 ref_value[8] =
s_wall[1];
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
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...
/////////////////////////////////////////////////////////////////////
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.
std::vector< bool > Boundary_coordinate_exists
Vector of boolean data that indicates whether the boundary coordinates have been set for the boundary...
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.
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()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...