30 #ifndef OOMPH_RECTANGLE_WITH_HOLE_MESH_HEADER 31 #define OOMPH_RECTANGLE_WITH_HOLE_MESH_HEADER 35 #include <oomph-lib-config.h> 39 #include "../generic/mesh.h" 40 #include "../generic/quadtree.h" 41 #include "../generic/quad_mesh.h" 42 #include "../generic/refineable_quad_mesh.h" 53 template<
class ELEMENT>
76 unsigned long node_count=0;
87 for(
unsigned e=0;
e<nmacro_element;
e++)
97 for(
unsigned l1=0;l1<np;l1++)
100 for(
unsigned l2=0;l2<np;l2++)
104 construct_node(l1*np+l2,time_stepper_pt));
107 s[0] = -1.0 + 2.0*(double)l2/(
double)(np-1);
108 s[1] = -1.0 + 2.0*(double)l1/(
double)(np-1);
112 Tmp_node_pt[node_count]->x(0) = r[0];
113 Tmp_node_pt[node_count]->x(1) = r[1];
131 for(
unsigned n=0;n<np;n++)
138 delete Tmp_node_pt[np*np + n*np];
139 Tmp_node_pt[np*np + n*np] = 0;
143 for(
unsigned n=0;n<np;n++)
150 delete Tmp_node_pt[3*np*np + n*np];
151 Tmp_node_pt[3*np*np + n*np] = 0;
155 for(
unsigned n=0;n<np;n++)
162 delete Tmp_node_pt[2*np*np + np*(np-1)+n];
163 Tmp_node_pt[2*np*np + np*(np-1)+n] = 0;
168 for(
unsigned n=0;n<np;n++)
175 delete Tmp_node_pt[2*np*np + n];
176 Tmp_node_pt[2*np*np + n] = 0;
181 for(
unsigned long n=0;n<node_count;n++)
183 if(Tmp_node_pt[n]!=0) {
Node_pt.push_back(Tmp_node_pt[n]);}
189 for(
unsigned n=0;n<np;n++)
217 for(
unsigned n=1;n<np;n++)
225 for(
unsigned n=1;n<np;n++)
233 for(
unsigned n=1;n<np-1;n++)
262 template<
class ELEMENT>
276 const double &length,
286 for (
unsigned e=0;
e<4;
e++)
297 this->setup_quadtree_forest();
unsigned nmacro_element()
Number of macro elements in domain.
Rectangular domain with circular whole.
Vector< Node * > Node_pt
Vector of pointers to nodes.
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...
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
virtual ~RefineableRectangleWithHoleMesh()
Destructor: Empty.
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 ...
RectangleWithHoleDomain * Domain_pt
Pointer to the domain.
MacroElement * macro_element_pt(const unsigned &i)
Access to i-th macro element.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
RectangleWithHoleDomain * domain_pt()
Access function to the domain.
Domain-based mesh for rectangular mesh with circular hole.
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
virtual void setup_boundary_element_info()
Interface for function that is used to setup the boundary information (Empty virtual function – impl...
const Vector< GeneralisedElement * > & element_pt() const
Return reference to the Vector of elements.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
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 ...