Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oomph::RectangularQuadMesh< ELEMENT > Class Template Reference

RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal) direction and Ny elements in the "y" (vertical) direction. Two Constructors are provided. The basic constructor assumes that the lower-left-hand corner of the mesh is (0,0) and takes only the arguments, Nx, Ny, Xmax and Ymax. The more complex constructor takes the additional arguments Xmin and Ymin. More...

#include <rectangular_quadmesh.template.h>

Inheritance diagram for oomph::RectangularQuadMesh< ELEMENT >:
oomph::BackwardStepQuadMesh< ELEMENT > oomph::ChannelSpineMesh< ELEMENT > oomph::CircularCylindricalShellMesh< ELEMENT > oomph::ElasticRectangularQuadMesh< ELEMENT > oomph::HorizontalSingleLayerSpineMesh< ELEMENT > oomph::RefineableRectangularQuadMesh< ELEMENT > oomph::SingleLayerSpineMesh< ELEMENT > oomph::TwoDAnnularMesh< ELEMENT > oomph::TwoLayerSpineMesh< ELEMENT >

Public Member Functions

 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, length of domain in x direction (0,lx); ly, length of domain in y direction (0,ly) Also pass pointer to timestepper (defaults to Steady) More...
 
 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. More...
 
 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, length of domain in x direction (0,lx); ly, length of domain in y direction (0,ly) Boolean flag specifies if the mesh is periodic in the x-direction. Also pass pointer to timestepper (defaults to Steady) More...
 
 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. Boolean flag specifies if the mesh is periodic in the x-direction. More...
 
const unsigned & nx () const
 Return number of elements in x direction. More...
 
const unsigned & ny () const
 Return number of elements in y direction. More...
 
const double x_min () const
 Return the minimum value of x coordinate. More...
 
const double x_max () const
 Return the maximum value of x coordinate. More...
 
const double y_min () const
 Return the minimum value of y coordinate. More...
 
const double y_max () const
 Return the maximum value of y coordinate. More...
 
virtual void element_reorder ()
 Reorder the elements: By default they are ordered in "horizontal" layers (increasing in x, then in y). This function changes this to an ordering in the vertical direction (y first, then x). This is more efficient if a frontal solver is used and the mesh has more elements in the x than the y direction. Can be overloaded in specific derived meshes. More...
 
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, ynode) in the element (xelement,yelement). The description is in a "psudeo" two-dimensional coordinate system, so the range of xelement is [0,Nx-1], yelement is [0,Ny-1], and that of xnode and ynode is [0,Np-1]. The default is to return nodes that are equally spaced in the x coodinate. More...
 
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, ynode) in the element (xelement,yelement). The description is in a "psudeo" two-dimensional coordinate system, so the range of xelement is [0,Nx-1], yelement is [0,Ny-1], and that of xnode and ynode is [0,Np-1]. The default it to return nodes that are equally spaced in the y coordinate. More...
 

Protected Member Functions

void build_mesh (TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
 Generic mesh construction function: contains all the hard work. More...
 
 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 does not build the mesh This is intend to be used in derived classes that overload the spacing functions. THis is scheduled to be changed, however. The reason why this MUST be done is because the virtual spacing functions cannot be called in the base constructur, because they will not have been overloaded yet!! More...
 

Protected Attributes

unsigned Nx
 Nx: number of elements in x-direction. More...
 
unsigned Ny
 Ny: number of elements in y-direction. More...
 
unsigned Np
 Np: number of (linear) points in the element. More...
 
double Xmin
 Minimum value of x coordinate. More...
 
double Xmax
 Maximum value of x coordinate. More...
 
double Ymin
 Minimum value of y coordinate. More...
 
double Ymax
 Maximum value of y coordinate. More...
 
bool Xperiodic
 Boolean variable used to determine whether the mesh is periodic in the x-direction. More...
 

Detailed Description

template<class ELEMENT>
class oomph::RectangularQuadMesh< ELEMENT >

RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal) direction and Ny elements in the "y" (vertical) direction. Two Constructors are provided. The basic constructor assumes that the lower-left-hand corner of the mesh is (0,0) and takes only the arguments, Nx, Ny, Xmax and Ymax. The more complex constructor takes the additional arguments Xmin and Ymin.

This class is designed to be used as a Base class for more complex two dimensional meshes. The virtual functions x_spacing_function() and y_spacing_function() may be overloaded to provide arbitrary node spacing. The default is uniformly spaced nodes in each direction.

It is also possible to make the solution periodic in the x direction.

Definition at line 58 of file rectangular_quadmesh.template.h.

Constructor & Destructor Documentation

◆ RectangularQuadMesh() [1/5]

template<class ELEMENT >
oomph::RectangularQuadMesh< ELEMENT >::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 
)
inlineprotected

Constructor that allows the specification of minimum and maximum values of x and y coordinates and does not build the mesh This is intend to be used in derived classes that overload the spacing functions. THis is scheduled to be changed, however. The reason why this MUST be done is because the virtual spacing functions cannot be called in the base constructur, because they will not have been overloaded yet!!

Definition at line 93 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::build_mesh().

◆ RectangularQuadMesh() [2/5]

template<class ELEMENT >
oomph::RectangularQuadMesh< ELEMENT >::RectangularQuadMesh ( const unsigned &  nx,
const unsigned &  ny,
const double &  lx,
const double &  ly,
TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper 
)
inline

Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx, length of domain in x direction (0,lx); ly, length of domain in y direction (0,ly) Also pass pointer to timestepper (defaults to Steady)

Definition at line 123 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::build_mesh().

◆ RectangularQuadMesh() [3/5]

template<class ELEMENT >
oomph::RectangularQuadMesh< ELEMENT >::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 
)
inline

Constructor that allows the specification of minimum and maximum values of x and y coordinates.

Definition at line 146 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::build_mesh().

◆ RectangularQuadMesh() [4/5]

template<class ELEMENT >
oomph::RectangularQuadMesh< ELEMENT >::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 
)
inline

Simple constructor: nx: number of elements in x direction; ny: number of elements in y direction; lx, length of domain in x direction (0,lx); ly, length of domain in y direction (0,ly) Boolean flag specifies if the mesh is periodic in the x-direction. Also pass pointer to timestepper (defaults to Steady)

Definition at line 174 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::build_mesh().

◆ RectangularQuadMesh() [5/5]

template<class ELEMENT >
oomph::RectangularQuadMesh< ELEMENT >::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 
)
inline

Constructor that allows the specification of minimum and maximum values of x and y coordinates. Boolean flag specifies if the mesh is periodic in the x-direction.

Definition at line 199 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::build_mesh().

Member Function Documentation

◆ build_mesh()

template<class ELEMENT >
void oomph::RectangularQuadMesh< ELEMENT >::build_mesh ( TimeStepper *  time_stepper_pt = &Mesh::Default_TimeStepper)
protected

Generic mesh construction function: contains all the hard work.

Generic mesh construction. This function contains the "guts" of the mesh generation process, including all the tedious loops, counting and spacing functions. The function should be called in all constuctors of any derived classes.

Definition at line 43 of file rectangular_quadmesh.template.cc.

Referenced by oomph::ChannelSpineMesh< ELEMENT >::build_channel_spine_mesh(), oomph::HorizontalSingleLayerSpineMesh< ELEMENT >::build_horizontal_single_layer_mesh(), oomph::SingleLayerSpineMesh< ELEMENT >::build_single_layer_mesh(), oomph::TwoLayerSpineMesh< ELEMENT >::build_two_layer_mesh(), oomph::RectangularQuadMesh< ELEMENT >::RectangularQuadMesh(), and oomph::TwoLayerSpineMesh< ELEMENT >::TwoLayerSpineMesh().

◆ element_reorder()

template<class ELEMENT >
void oomph::RectangularQuadMesh< ELEMENT >::element_reorder
virtual

Reorder the elements: By default they are ordered in "horizontal" layers (increasing in x, then in y). This function changes this to an ordering in the vertical direction (y first, then x). This is more efficient if a frontal solver is used and the mesh has more elements in the x than the y direction. Can be overloaded in specific derived meshes.

Reorder the elements so they are listed in vertical slices (more efficient during the frontal solution if the domain is long in the x-direction.

Reimplemented in oomph::ChannelSpineMesh< ELEMENT >.

Definition at line 834 of file rectangular_quadmesh.template.cc.

◆ nx()

template<class ELEMENT >
const unsigned& oomph::RectangularQuadMesh< ELEMENT >::nx ( ) const
inline

◆ ny()

template<class ELEMENT >
const unsigned& oomph::RectangularQuadMesh< ELEMENT >::ny ( ) const
inline

◆ x_max()

template<class ELEMENT >
const double oomph::RectangularQuadMesh< ELEMENT >::x_max ( ) const
inline

Return the maximum value of x coordinate.

Definition at line 245 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Xmax.

◆ x_min()

template<class ELEMENT >
const double oomph::RectangularQuadMesh< ELEMENT >::x_min ( ) const
inline

Return the minimum value of x coordinate.

Definition at line 238 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Xmin.

◆ x_spacing_function()

template<class ELEMENT >
virtual double oomph::RectangularQuadMesh< ELEMENT >::x_spacing_function ( unsigned  xelement,
unsigned  xnode,
unsigned  yelement,
unsigned  ynode 
)
inlinevirtual

Return the value of the x-coordinate at the node given by the local node number (xnode, ynode) in the element (xelement,yelement). The description is in a "psudeo" two-dimensional coordinate system, so the range of xelement is [0,Nx-1], yelement is [0,Ny-1], and that of xnode and ynode is [0,Np-1]. The default is to return nodes that are equally spaced in the x coodinate.

Reimplemented in oomph::TwoLayerSpineMesh< ELEMENT >, and oomph::ChannelSpineMesh< ELEMENT >.

Definition at line 279 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Np, oomph::RectangularQuadMesh< ELEMENT >::Nx, oomph::RectangularQuadMesh< ELEMENT >::Xmax, and oomph::RectangularQuadMesh< ELEMENT >::Xmin.

◆ y_max()

template<class ELEMENT >
const double oomph::RectangularQuadMesh< ELEMENT >::y_max ( ) const
inline

Return the maximum value of y coordinate.

Definition at line 259 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Ymax.

◆ y_min()

template<class ELEMENT >
const double oomph::RectangularQuadMesh< ELEMENT >::y_min ( ) const
inline

Return the minimum value of y coordinate.

Definition at line 252 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Ymin.

◆ y_spacing_function()

template<class ELEMENT >
virtual double oomph::RectangularQuadMesh< ELEMENT >::y_spacing_function ( unsigned  xelement,
unsigned  xnode,
unsigned  yelement,
unsigned  ynode 
)
inlinevirtual

Return the value of the y-coordinate at the node given by the local node number (xnode, ynode) in the element (xelement,yelement). The description is in a "psudeo" two-dimensional coordinate system, so the range of xelement is [0,Nx-1], yelement is [0,Ny-1], and that of xnode and ynode is [0,Np-1]. The default it to return nodes that are equally spaced in the y coordinate.

Reimplemented in oomph::TwoLayerSpineMesh< ELEMENT >.

Definition at line 296 of file rectangular_quadmesh.template.h.

References oomph::RectangularQuadMesh< ELEMENT >::Np, oomph::RectangularQuadMesh< ELEMENT >::Ny, oomph::RectangularQuadMesh< ELEMENT >::Ymax, and oomph::RectangularQuadMesh< ELEMENT >::Ymin.

Member Data Documentation

◆ Np

template<class ELEMENT >
unsigned oomph::RectangularQuadMesh< ELEMENT >::Np
protected

◆ Nx

template<class ELEMENT >
unsigned oomph::RectangularQuadMesh< ELEMENT >::Nx
protected

◆ Ny

template<class ELEMENT >
unsigned oomph::RectangularQuadMesh< ELEMENT >::Ny
protected

Ny: number of elements in y-direction.

Definition at line 65 of file rectangular_quadmesh.template.h.

Referenced by oomph::RectangularQuadMesh< ELEMENT >::ny(), and oomph::RectangularQuadMesh< ELEMENT >::y_spacing_function().

◆ Xmax

template<class ELEMENT >
double oomph::RectangularQuadMesh< ELEMENT >::Xmax
protected

◆ Xmin

template<class ELEMENT >
double oomph::RectangularQuadMesh< ELEMENT >::Xmin
protected

◆ Xperiodic

template<class ELEMENT >
bool oomph::RectangularQuadMesh< ELEMENT >::Xperiodic
protected

Boolean variable used to determine whether the mesh is periodic in the x-direction.

Definition at line 81 of file rectangular_quadmesh.template.h.

◆ Ymax

template<class ELEMENT >
double oomph::RectangularQuadMesh< ELEMENT >::Ymax
protected

◆ Ymin

template<class ELEMENT >
double oomph::RectangularQuadMesh< ELEMENT >::Ymin
protected

The documentation for this class was generated from the following files: