26#ifndef OOMPH_QUARTER_CIRCLE_SECTOR_MESH_TEMPLATE_HEADER
27#define OOMPH_QUARTER_CIRCLE_SECTOR_MESH_TEMPLATE_HEADER
29#ifndef OOMPH_QUARTER_CIRCLE_SECTOR_MESH_HEADER
30#error __FILE__ should only be included from quarter_circle_sector_mesh.h.
44 template<
class ELEMENT>
54 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
224 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
383 for (
unsigned l2 = 1;
l2 <
n_p - 1;
l2++)
415 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
472 for (
unsigned l1 = 1;
l1 <
n_p - 1;
l1++)
506 for (
unsigned e = 0;
e < n_element;
e++)
542 template<
class ELEMENT>
544 ELEMENT>::setup_algebraic_node_update()
553 std::ostringstream error_message;
555 <<
"Element in AlgebraicRefineableQuarterCircleSectorMesh must be\n ";
556 error_message <<
"derived from AlgebraicElementBase\n";
557 error_message <<
"but it is of type: "
560 "AlgebraicRefineableQuarterCircleSectorMesh::";
624 ref_value[0] = x /
x_box;
627 ref_value[1] = y /
y_box;
635 ref_value[2] =
s_br[0];
643 ref_value[3] =
s_tl[0];
647 ->add_node_update_info(Central_box,
686 ref_value[0] =
rho_0;
689 ref_value[1] =
rho_1;
698 ref_value[2] =
s_br[0];
707 ref_value[3] =
s_tl[0];
733 ->add_node_update_info(Lower_right_box,
771 ref_value[0] =
rho_0;
774 ref_value[1] =
rho_1;
783 ref_value[2] =
s_br[0];
792 ref_value[3] =
s_tl[0];
819 ->add_node_update_info(Upper_left_box,
832 template<
class ELEMENT>
834 ELEMENT>::node_update_in_central_box(
const unsigned&
t,
853 std::string error_message =
854 "Trying to update the nodal position at a time level\n";
855 error_message +=
"beyond the number of previous values in the nodes'\n";
856 error_message +=
"position timestepper. This seems highly suspect!\n";
857 error_message +=
"If you're sure the code behaves correctly\n";
858 error_message +=
"in your application, remove this warning \n";
859 error_message +=
"or recompile with PARNOID switched off.\n";
862 "AlgebraicRefineableQuarterCircleSectorMesh::";
877 double rho_x = ref_value[0];
880 double rho_y = ref_value[1];
892 s_br[0] = ref_value[2];
905 s_tl[0] = ref_value[3];
919 template<
class ELEMENT>
921 ELEMENT>::node_update_in_lower_right_box(
const unsigned&
t,
940 std::string error_message =
941 "Trying to update the nodal position at a time level";
942 error_message +=
"beyond the number of previous values in the nodes'";
943 error_message +=
"position timestepper. This seems highly suspect!";
944 error_message +=
"If you're sure the code behaves correctly";
945 error_message +=
"in your application, remove this warning ";
946 error_message +=
"or recompile with PARNOID switched off.";
949 "AlgebraicRefineableQuarterCircleSectorMesh::";
964 double rho_0 = ref_value[0];
967 double rho_1 = ref_value[1];
979 s_br[0] = ref_value[2];
992 s_tl[0] = ref_value[3];
1014 s_wall[0] = ref_value[4];
1027 template<
class ELEMENT>
1029 ELEMENT>::node_update_in_upper_left_box(
const unsigned&
t,
1048 std::string error_message =
1049 "Trying to update the nodal position at a time level";
1050 error_message +=
"beyond the number of previous values in the nodes'";
1051 error_message +=
"position timestepper. This seems highly suspect!";
1052 error_message +=
"If you're sure the code behaves correctly";
1053 error_message +=
"in your application, remove this warning ";
1054 error_message +=
"or recompile with PARNOID switched off.";
1057 "AlgebraicRefineableQuarterCircleSectorMesh::";
1073 double rho_0 = ref_value[0];
1076 double rho_1 = ref_value[1];
1088 s_br[0] = ref_value[2];
1136 template<
class ELEMENT>
1160 double rho_1 = ref_value[1];
1180 ref_value[2] =
s_br[0];
1199 ref_value[3] =
s_tl[0];
1220 ref_value[4] =
s_wall[0];
1232 template<
class ELEMENT>
1256 double rho_0 = ref_value[0];
1276 ref_value[2] =
s_br[0];
1295 ref_value[3] =
s_tl[0];
1315 ref_value[4] =
s_wall[0];
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.
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.
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.
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.
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.
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...
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).