30#include "../generic/pml_meshes.h"
65 for (
unsigned i = 0;
i < 2;
i++)
110 for (
unsigned i = 0;
i < 2;
i++)
134#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
137 "Order of function arguments has changed ";
157 using namespace QuadTreeNames;
170 xi[0] = 3.0 *
atan(1.0);
177 xi[0] = -3.0 *
atan(1.0);
188 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
215 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
220 xi[0] = 3.0 *
atan(1.0);
227 xi[0] = 1.0 *
atan(1.0);
252 xi[0] = 1.0 *
atan(1.0);
259 xi[0] = -1.0 *
atan(1.0);
266 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
293 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
302 xi[0] = -3.0 *
atan(1.0);
309 xi[0] = -1.0 *
atan(1.0);
335 xi[0] = 3.0 *
atan(1.0);
343 xi[0] = -3.0 *
atan(1.0);
351 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
356 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
379 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
384 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
389 xi[0] = 3.0 *
atan(1.0);
397 xi[0] = 1.0 *
atan(1.0);
423 xi[0] = 1.0 *
atan(1.0);
431 xi[0] = -1.0 *
atan(1.0);
439 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
444 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
467 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
472 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
477 xi[0] = -3.0 *
atan(1.0);
485 xi[0] = -1.0 *
atan(1.0);
507 error_stream <<
"Wrong macro element number" <<
m << std::endl;
518 const unsigned& time,
524#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
527 "Order of function arguments has changed between versions 0.8 and 0.85",
528 "RectangleWithHoleAndAnnularRegionDomain::macro_element_boundary(...)",
542 using namespace QuadTreeNames;
555 xi[0] = 3.0 *
atan(1.0);
562 xi[0] = -3.0 *
atan(1.0);
573 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
600 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
605 xi[0] = 3.0 *
atan(1.0);
612 xi[0] = 1.0 *
atan(1.0);
637 xi[0] = 1.0 *
atan(1.0);
644 xi[0] = -1.0 *
atan(1.0);
651 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
678 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
687 xi[0] = -3.0 *
atan(1.0);
694 xi[0] = -1.0 *
atan(1.0);
720 xi[0] = 3.0 *
atan(1.0);
728 xi[0] = -3.0 *
atan(1.0);
736 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
741 xi[0] = 5.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
764 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
769 xi[0] = 3.0 *
atan(1.0) - 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
774 xi[0] = 3.0 *
atan(1.0);
782 xi[0] = 1.0 *
atan(1.0);
808 xi[0] = 1.0 *
atan(1.0);
816 xi[0] = -1.0 *
atan(1.0);
824 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
829 xi[0] = -
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
852 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
857 xi[0] = -3.0 *
atan(1.0) + 2.0 *
atan(1.0) * 0.5 * (1.0 +
s[0]);
862 xi[0] = -3.0 *
atan(1.0);
870 xi[0] = -1.0 *
atan(1.0);
892 error_stream <<
"Wrong macro element number" <<
m << std::endl;
911 template<
class ELEMENT>
932 unsigned nmacro_element = Domain_pt->nmacro_element();
936 for (
unsigned e = 0;
e < nmacro_element;
e++)
939 Element_pt.push_back(
new ELEMENT);
942 unsigned np =
dynamic_cast<ELEMENT*
>(finite_element_pt(
e))->
nnode_1d();
945 for (
unsigned l1 = 0;
l1 <
np;
l1++)
948 for (
unsigned l2 = 0;
l2 <
np;
l2++)
951 tmp_node_pt.push_back(finite_element_pt(
e)->construct_node(
960 Domain_pt->macro_element_pt(
e)->macro_map(
s,
r);
978 unsigned np =
dynamic_cast<ELEMENT*
>(finite_element_pt(0))->
nnode_1d();
982 for (
unsigned n = 1;
n <
np;
n++)
986 finite_element_pt(0)->node_pt((
np *
np - 1) -
n);
997 for (
unsigned n = 0;
n <
np - 1;
n++)
1000 finite_element_pt(3)->
node_pt(
n *
np) = finite_element_pt(0)->node_pt(
n);
1011 for (
unsigned n = 1;
n <
np;
n++)
1015 finite_element_pt(1)->node_pt((
np - 1) +
n *
np);
1026 for (
unsigned n = 1;
n <
np;
n++)
1030 finite_element_pt(3)->node_pt((
np *
np - 1) -
n *
np);
1041 for (
unsigned n = 0;
n <
np - 1;
n++)
1045 finite_element_pt(4)->node_pt((
np *
np - 1) -
n);
1056 for (
unsigned n = 1;
n <
np;
n++)
1059 finite_element_pt(7)->
node_pt(
n *
np) = finite_element_pt(4)->node_pt(
n);
1070 for (
unsigned n = 0;
n <
np - 1;
n++)
1074 finite_element_pt(5)->node_pt((
n + 1) *
np - 1);
1085 for (
unsigned n = 0;
n <
np - 1;
n++)
1089 finite_element_pt(7)->node_pt((
np *
np - 1) -
n *
np);
1100 for (
unsigned n = 1;
n <
np - 1;
n++)
1104 finite_element_pt(4)->node_pt(
n *
np);
1115 for (
unsigned n = 1;
n <
np - 1;
n++)
1119 finite_element_pt(5)->node_pt(
np * (
np - 1) +
n);
1130 for (
unsigned n = 1;
n <
np - 1;
n++)
1134 finite_element_pt(6)->node_pt((
np *
np - 1) -
n *
np);
1145 for (
unsigned n = 1;
n <
np - 1;
n++)
1149 finite_element_pt(7)->node_pt((
np - 1) -
n);
1172 finite_element_pt(0)->node_pt(
np - 1);
1175 finite_element_pt(4)->node_pt(0) = finite_element_pt(0)->node_pt(
np - 1);
1178 finite_element_pt(7)->node_pt(0) = finite_element_pt(0)->node_pt(
np - 1);
1202 finite_element_pt(1)->
node_pt(0) =
1203 finite_element_pt(0)->node_pt(
np *
np - 1);
1206 finite_element_pt(4)->node_pt(
np * (
np - 1)) =
1207 finite_element_pt(0)->node_pt(
np *
np - 1);
1210 finite_element_pt(5)->node_pt(
np * (
np - 1)) =
1211 finite_element_pt(0)->node_pt(
np *
np - 1);
1236 finite_element_pt(1)->node_pt(
np - 1);
1239 finite_element_pt(5)->node_pt(
np *
np - 1) =
1240 finite_element_pt(1)->node_pt(
np - 1);
1243 finite_element_pt(6)->node_pt(
np *
np - 1) =
1244 finite_element_pt(1)->node_pt(
np - 1);
1269 finite_element_pt(2)->node_pt(0);
1272 finite_element_pt(6)->node_pt(
np - 1) = finite_element_pt(2)->node_pt(0);
1275 finite_element_pt(7)->node_pt(
np - 1) = finite_element_pt(2)->node_pt(0);
1322 for (
unsigned n = 0;
n <
np;
n++)
1326 convert_to_boundary_node(
nod_pt);
1327 add_boundary_node(3,
nod_pt);
1331 convert_to_boundary_node(
nod_pt);
1332 add_boundary_node(2,
nod_pt);
1336 convert_to_boundary_node(
nod_pt);
1337 add_boundary_node(1,
nod_pt);
1341 convert_to_boundary_node(
nod_pt);
1342 add_boundary_node(0,
nod_pt);
1346 for (
unsigned n = 0;
n <
np - 1;
n++)
1350 convert_to_boundary_node(
nod_pt);
1351 add_boundary_node(4,
nod_pt);
1355 convert_to_boundary_node(
nod_pt);
1356 add_boundary_node(4,
nod_pt);
1360 convert_to_boundary_node(
nod_pt);
1361 add_boundary_node(4,
nod_pt);
1365 convert_to_boundary_node(
nod_pt);
1366 add_boundary_node(4,
nod_pt);
1372 if (check_for_repeated_nodes())
1394 template<
class ELEMENT>
1401 const double& height,
1405 Coarse_problem =
false;
1445 TwoDimensionalPMLHelper::create_right_pml_mesh<PMLLayerElement<ELEMENT>>(
1474 TwoDimensionalPMLHelper::create_top_pml_mesh<PMLLayerElement<ELEMENT>>(
1503 TwoDimensionalPMLHelper::create_left_pml_mesh<PMLLayerElement<ELEMENT>>(
1531 TwoDimensionalPMLHelper::create_bottom_pml_mesh<PMLLayerElement<ELEMENT>>(
1602 this->Element_pt.resize(
nel);
1610 for (
unsigned e = 0;
e <
nel;
e++)
1616 for (
unsigned j = 0;
j <
nnod;
j++)
1626 for (
unsigned b = 0; b < 4; b++)
1628 unsigned nnod = Central_mesh_pt->nboundary_node(b);
1629 for (
unsigned j = 0;
j <
nnod;
j++)
1631 Node*
nod_pt = Central_mesh_pt->boundary_node_pt(b,
j);
1632 nod_pt->remove_from_boundary(b);
1638 this->set_nboundary(5);
1757 this->setup_quadtree_forest();
1760 this->setup_boundary_element_info();
1771 Central_mesh_pt->flush_element_and_node_storage();
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
unsigned nnode() const
Return the number of nodes.
Node ** Node_pt
Storage for pointers to the nodes in the element.
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...
/////////////////////////////////////////////////////////////////////
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void resize(const unsigned &n_value)
Resize the number of equations.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
Rectangular domain with circular whole DRAIG: This looks like a redefinition of the RectangleWithHole...
Vector< double > Upper_mid_left
Where the "radial" line from circle meets upper boundary on left.
void linear_interpolate(const Vector< double > &left, const Vector< double > &right, const double &s, Vector< double > &f)
Helper function to interpolate linearly between the "right" and "left" points; .
void macro_element_boundary(const double &time, const unsigned &m, const unsigned &direction, const Vector< double > &s, Vector< double > &f)
Parametrisation of macro element boundaries: f(s) is the position vector to macro-element m's boundar...
GeomObject * Cylinder_pt
Pointer to geometric object that represents the central cylinder.
void project_point_on_cylinder_to_annular_boundary(const unsigned &time, const Vector< double > &xi, Vector< double > &r)
Helper function that, given the Lagrangian coordinate, xi, (associated with a point on the cylinder),...
Vector< double > Lower_mid_left
Where the "radial" line from circle meets lower boundary on left.
Vector< double > Lower_mid_right
Where the "radial" line from circle meets lower boundary on right.
double Annular_region_radius
The radius of the outer boundary of the annular region whose inner boundary is described by Cylinder_...
Vector< double > Upper_mid_right
Where the "radial" line from circle meets upper boundary on right.
RectangleWithHoleAndAnnularRegionMesh(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass pointer to geometric object that represents the cylinder, the length and height of ...
RefineableQuadMeshWithMovingCylinder(GeomObject *cylinder_pt, const double &annular_region_radius, const double &length_of_central_box, const double &x_left, const double &x_right, const double &height, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor. Pass pointer to geometric object that represents the cylinder; hierher the length and he...
//////////////////////////////////////////////////////////////////////
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Mesh * create_bottom_left_pml_mesh(Mesh *pml_left_mesh_pt, Mesh *pml_bottom_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &left_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
"Constructor" for PML bottom left corner mesh, aligned with the existing PML meshes
Mesh * create_top_left_pml_mesh(Mesh *pml_left_mesh_pt, Mesh *pml_top_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &left_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
"Constructor" for PML top left corner mesh, aligned with the existing PML meshes
Mesh * create_top_right_pml_mesh(Mesh *pml_right_mesh_pt, Mesh *pml_top_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &right_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
"Constructor" for PML top right corner mesh, aligned with the existing PML meshes
Mesh * create_bottom_right_pml_mesh(Mesh *pml_right_mesh_pt, Mesh *pml_bottom_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &right_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
"Constructor" for PML bottom right corner mesh, aligned with the existing PML meshes
//////////////////////////////////////////////////////////////////// ////////////////////////////////...