26#ifndef OOMPH_QUARTER_CIRCLE_SECTOR_MESH_TEMPLATE_CC
27#define OOMPH_QUARTER_CIRCLE_SECTOR_MESH_TEMPLATE_CC
43 template<
class ELEMENT>
53 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
230 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
393 for (
unsigned l2 = 1;
l2 <
n_p - 1;
l2++)
425 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
484 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
518 for (
unsigned e = 0;
e < n_element;
e++)
555 template<
class ELEMENT>
557 ELEMENT>::setup_algebraic_node_update()
566 std::ostringstream error_message;
568 <<
"Element in AlgebraicRefineableQuarterCircleSectorMesh must be\n ";
569 error_message <<
"derived from AlgebraicElementBase\n";
570 error_message <<
"but it is of type: "
573 "AlgebraicRefineableQuarterCircleSectorMesh::";
638 ref_value[0] = x /
x_box;
641 ref_value[1] = y /
y_box;
649 ref_value[2] =
s_br[0];
658 ref_value[3] =
s_tl[0];
662 ->add_node_update_info(Central_box,
701 ref_value[0] =
rho_0;
704 ref_value[1] =
rho_1;
713 ref_value[2] =
s_br[0];
722 ref_value[3] =
s_tl[0];
748 ->add_node_update_info(Lower_right_box,
787 ref_value[0] =
rho_0;
790 ref_value[1] =
rho_1;
799 ref_value[2] =
s_br[0];
808 ref_value[3] =
s_tl[0];
835 ->add_node_update_info(Upper_left_box,
849 template<
class ELEMENT>
851 ELEMENT>::node_update_in_central_box(
const unsigned&
t,
870 std::string error_message =
871 "Trying to update the nodal position at a time level\n";
872 error_message +=
"beyond the number of previous values in the nodes'\n";
873 error_message +=
"position timestepper. This seems highly suspect!\n";
874 error_message +=
"If you're sure the code behaves correctly\n";
875 error_message +=
"in your application, remove this warning \n";
876 error_message +=
"or recompile with PARNOID switched off.\n";
879 "AlgebraicRefineableQuarterCircleSectorMesh::";
894 double rho_x = ref_value[0];
897 double rho_y = ref_value[1];
910 s_br[0] = ref_value[2];
923 s_tl[0] = ref_value[3];
938 template<
class ELEMENT>
940 ELEMENT>::node_update_in_lower_right_box(
const unsigned&
t,
959 std::string error_message =
960 "Trying to update the nodal position at a time level";
961 error_message +=
"beyond the number of previous values in the nodes'";
962 error_message +=
"position timestepper. This seems highly suspect!";
963 error_message +=
"If you're sure the code behaves correctly";
964 error_message +=
"in your application, remove this warning ";
965 error_message +=
"or recompile with PARNOID switched off.";
968 "AlgebraicRefineableQuarterCircleSectorMesh::";
983 double rho_0 = ref_value[0];
986 double rho_1 = ref_value[1];
998 s_br[0] = ref_value[2];
1011 s_tl[0] = ref_value[3];
1033 s_wall[0] = ref_value[4];
1046 template<
class ELEMENT>
1048 ELEMENT>::node_update_in_upper_left_box(
const unsigned&
t,
1067 std::string error_message =
1068 "Trying to update the nodal position at a time level";
1069 error_message +=
"beyond the number of previous values in the nodes'";
1070 error_message +=
"position timestepper. This seems highly suspect!";
1071 error_message +=
"If you're sure the code behaves correctly";
1072 error_message +=
"in your application, remove this warning ";
1073 error_message +=
"or recompile with PARNOID switched off.";
1076 "AlgebraicRefineableQuarterCircleSectorMesh::";
1092 double rho_0 = ref_value[0];
1095 double rho_1 = ref_value[1];
1107 s_br[0] = ref_value[2];
1157 template<
class ELEMENT>
1182 double rho_1 = ref_value[1];
1203 ref_value[2] =
s_br[0];
1223 ref_value[3] =
s_tl[0];
1245 ref_value[4] =
s_wall[0];
1257 template<
class ELEMENT>
1281 double rho_0 = ref_value[0];
1301 ref_value[2] =
s_br[0];
1320 ref_value[3] =
s_tl[0];
1341 ref_value[4] =
s_wall[0];
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
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.
double ref_value(const unsigned &i)
Return i-th reference value 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 ...
Algebraic version of RefineableQuarterCircleSectorMesh.
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
A general Finite Element class.
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Set pointer to macro element – can be overloaded in derived elements to perform additional tasks.
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.
virtual Node * construct_boundary_node(const unsigned &n)
Construct the local node n as a boundary node; that is a node that MAY be placed on a mesh boundary a...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
/////////////////////////////////////////////////////////////////////
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.
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.
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....
void setup_boundary_element_info()
Setup lookup schemes which establish whic elements are located next to mesh's boundaries (wrapper to ...
Circular sector as domain. Domain is bounded by curved boundary which is represented by a GeomObject....
2D quarter ring mesh class. The domain is specified by the GeomObject that identifies boundary 1.
double Fract_mid
Fraction along wall where outer ring is to be divided.
GeomObject *& wall_pt()
Access function to GeomObject representing wall.
double Xi_hi
Upper limit for the (1D) coordinates along the wall.
QuarterCircleSectorMesh(GeomObject *wall_pt, const double &xi_lo, const double &fract_mid, const double &xi_hi, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object that specifies the wall, start and end coordinates on t...
QuarterCircleSectorDomain * Domain_pt
Pointer to Domain.
double Xi_lo
Lower limit for the (1D) coordinates along the wall.
//////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////// //////////////////////////////...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...