27 #ifndef OOMPH_RECTANGULAR_QUADMESH_HEADER
28 #define OOMPH_RECTANGULAR_QUADMESH_HEADER
32 #include <oomph-lib-config.h>
36 #include "../generic/mesh.h"
37 #include "../generic/quad_mesh.h"
38 #include "../generic/refineable_quad_mesh.h"
57 template<
class ELEMENT>
100 const bool& periodic_in_x,
138 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
163 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
179 const bool& periodic_in_x,
190 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
206 const bool& periodic_in_x,
217 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
224 const unsigned&
nx()
const
231 const unsigned&
ny()
const
287 return (
Xmin + xstep * ((
Np - 1) * xelement + xnode));
303 return (
Ymin + ystep * ((
Np - 1) * yelement + ynode));
322 template<
class ELEMENT>
355 const bool& periodic_in_x,
358 nx,
ny, lx, ly, periodic_in_x, time_stepper_pt)
377 nx,
ny, xmin, xmax, ymin, ymax, time_stepper_pt)
394 const bool& periodic_in_x,
397 nx,
ny, xmin, xmax, ymin, ymax, periodic_in_x, time_stepper_pt)
419 template<
class ELEMENT>
439 unsigned nnod =
nnode();
440 for (
unsigned j = 0; j < nnod; j++)
489 const bool& periodic_in_x,
492 nx,
ny, lx, ly, periodic_in_x, time_stepper_pt)
517 for (
unsigned b = 0; b < 3; b += 2)
523 for (
unsigned i = 0;
i < n_nod;
i++)
535 for (
unsigned b = 1; b < 4; b += 2)
541 for (
unsigned i = 0;
i < n_nod;
i++)
569 template<
class ELEMENT>
604 const bool& periodic_in_x,
607 nx,
ny, lx, ly, periodic_in_x, time_stepper_pt),
609 nx,
ny, lx, ly, periodic_in_x, time_stepper_pt)
631 nx,
ny, lx, ly, origin, time_stepper_pt)
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
void set_boundary_coordinates(const Vector< double > &origin)
Setup the boundary coordinates. Vector origin specifies the coordinates of the lower left corner of t...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
std::vector< bool > Boundary_coordinate_exists
Vector of boolean data that indicates whether the boundary coordinates have been set for the boundary...
unsigned long nnode() const
Return number of nodes in the mesh.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
virtual void set_coordinates_on_boundary(const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta)
Set the vector of the k-th generalised boundary coordinates on mesh boundary b. Broken virtual interf...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
unsigned Nx
Nx: number of elements in x-direction.
const double y_min() const
Return the minimum value of y coordinate.
RectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx,...
const double x_max() const
Return the maximum value of x coordinate.
RectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const bool &periodic_in_x, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx,...
unsigned Ny
Ny: number of elements in y-direction.
const double y_max() const
Return the maximum value of y coordinate.
bool Xperiodic
Boolean variable used to determine whether the mesh is periodic in the x-direction.
const unsigned & ny() const
Return number of elements in y direction.
unsigned Np
Np: number of (linear) points in the element.
double Ymax
Maximum value of y coordinate.
const double x_min() const
Return the minimum value of x coordinate.
double Xmax
Maximum value of x coordinate.
const unsigned & nx() const
Return number of elements in x direction.
RectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &xmin, const double &xmax, const double &ymin, const double &ymax, const bool &periodic_in_x, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor that allows the specification of minimum and maximum values of x and y coordinates....
virtual double x_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
Return the value of the x-coordinate at the node given by the local node number (xnode,...
double Ymin
Minimum value of y coordinate.
virtual void element_reorder()
Reorder the elements: By default they are ordered in "horizontal" layers (increasing in x,...
virtual double y_spacing_function(unsigned xelement, unsigned xnode, unsigned yelement, unsigned ynode)
Return the value of the y-coordinate at the node given by the local node number (xnode,...
RectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &xmin, const double &xmax, const double &ymin, const double &ymax, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor that allows the specification of minimum and maximum values of x and y coordinates.
RectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &xmin, const double &xmax, const double &ymin, const double &ymax, const bool &periodic_in_x, const bool &build, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor that allows the specification of minimum and maximum values of x and y coordinates and do...
double Xmin
Minimum value of x coordinate.
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh construction function: contains all the hard work.
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...
Refineable version of the RectangularQuadMesh: A two-dimensional mesh of Quad elements with Nx elemen...
RefineableRectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const bool &periodic_in_x, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx,...
RefineableRectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx,...
RefineableRectangularQuadMesh(const unsigned &nx, const unsigned &ny, const double &xmin, const double &xmax, const double &ymin, const double &ymax, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor that allows the specification of minimum and maximum values of x and y coordinates Also p...
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
SolidNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SolidNode.
SolidNode * boundary_node_pt(const unsigned &b, const unsigned &n)
Return n-th SolidNodes on b-th boundary.
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...