26 #ifndef OOMPH_RECTANGLE_WITH_HOLE_MESH_HEADER
27 #define OOMPH_RECTANGLE_WITH_HOLE_MESH_HEADER
31 #include <oomph-lib-config.h>
35 #include "../generic/mesh.h"
36 #include "../generic/quadtree.h"
37 #include "../generic/quad_mesh.h"
38 #include "../generic/refineable_quad_mesh.h"
46 template<
class ELEMENT>
65 unsigned long node_count = 0;
76 for (
unsigned e = 0;
e < nmacro_element;
e++)
85 for (
unsigned l1 = 0; l1 < np; l1++)
88 for (
unsigned l2 = 0; l2 < np; l2++)
92 l1 * np + l2, time_stepper_pt));
95 s[0] = -1.0 + 2.0 * (double)l2 / (
double)(np - 1);
96 s[1] = -1.0 + 2.0 * (double)l1 / (
double)(np - 1);
100 Tmp_node_pt[node_count]->x(0) = r[0];
101 Tmp_node_pt[node_count]->x(1) = r[1];
118 for (
unsigned n = 0; n < np; n++)
125 delete Tmp_node_pt[np * np + n * np];
126 Tmp_node_pt[np * np + n * np] = 0;
130 for (
unsigned n = 0; n < np; n++)
137 delete Tmp_node_pt[3 * np * np + n * np];
138 Tmp_node_pt[3 * np * np + n * np] = 0;
142 for (
unsigned n = 0; n < np; n++)
149 delete Tmp_node_pt[2 * np * np + np * (np - 1) + n];
150 Tmp_node_pt[2 * np * np + np * (np - 1) + n] = 0;
155 for (
unsigned n = 0; n < np; n++)
162 delete Tmp_node_pt[2 * np * np + n];
163 Tmp_node_pt[2 * np * np + n] = 0;
168 for (
unsigned long n = 0; n < node_count; n++)
170 if (Tmp_node_pt[n] != 0)
172 Node_pt.push_back(Tmp_node_pt[n]);
179 for (
unsigned n = 0; n < np; n++)
207 for (
unsigned n = 1; n < np; n++)
215 for (
unsigned n = 1; n < np; n++)
223 for (
unsigned n = 1; n < np - 1; n++)
254 template<
class ELEMENT>
267 const double& length,
275 for (
unsigned e = 0;
e < 4;
e++)
unsigned nmacro_element()
Number of macro elements in domain.
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
/////////////////////////////////////////////////////////////////////
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.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
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.
virtual void setup_boundary_element_info()
Interface for function that is used to setup the boundary information (Empty virtual function – imple...
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.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Rectangular domain with circular whole.
Domain-based mesh for rectangular mesh with circular hole.
RectangleWithHoleDomain * Domain_pt
Pointer to the domain.
RectangleWithHoleDomain * domain_pt()
Access function to the domain.
RectangleWithHoleMesh(GeomObject *cylinder_pt, 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 ...
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
void setup_quadtree_forest()
Set up QuadTreeForest. Wipes any existing tree structure below the minimum refinement level and regar...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
virtual ~RefineableRectangleWithHoleMesh()
Destructor: Empty.
RefineableRectangleWithHoleMesh(GeomObject *cylinder_pt, 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 ...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...