Toggle navigation
Documentation
Big picture
The finite element method
The data structure
Not-so-quick guide
Optimisation
Order of action functions
Example codes and tutorials
List of example codes and tutorials
Meshing
Solvers
MPI parallel processing
Post-processing/visualisation
Other
Change log
Creating documentation
Coding conventions
Index
FAQ
Installation
Installation guide
Copyright
About
People
Contact/Get involved
Publications
Acknowledgements
Picture show
Go
src
meshes
simple_rectangular_quadmesh.template.h
Go to the documentation of this file.
1
// LIC// ====================================================================
2
// LIC// This file forms part of oomph-lib, the object-oriented,
3
// LIC// multi-physics finite-element library, available
4
// LIC// at http://www.oomph-lib.org.
5
// LIC//
6
// LIC// Copyright (C) 2006-2024 Matthias Heil and Andrew Hazel
7
// LIC//
8
// LIC// This library is free software; you can redistribute it and/or
9
// LIC// modify it under the terms of the GNU Lesser General Public
10
// LIC// License as published by the Free Software Foundation; either
11
// LIC// version 2.1 of the License, or (at your option) any later version.
12
// LIC//
13
// LIC// This library is distributed in the hope that it will be useful,
14
// LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
// LIC// Lesser General Public License for more details.
17
// LIC//
18
// LIC// You should have received a copy of the GNU Lesser General Public
19
// LIC// License along with this library; if not, write to the Free Software
20
// LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
// LIC// 02110-1301 USA.
22
// LIC//
23
// LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24
// LIC//
25
// LIC//====================================================================
26
#ifndef OOMPH_SIMPLE_RECTANGULAR_QUADMESH_HEADER
27
#define OOMPH_SIMPLE_RECTANGULAR_QUADMESH_HEADER
28
29
// Config header generated by autoconfig
30
#ifdef HAVE_CONFIG_H
31
#include <oomph-lib-config.h>
32
#endif
33
34
// OOMPH-LIB headers
35
#include "../generic/mesh.h"
36
#include "../generic/matrices.h"
37
#include "../generic/quadtree.h"
38
#include "../generic/quad_mesh.h"
39
40
namespace
oomph
41
{
42
//=======================================================================
43
/// Simple rectangular 2D Quad mesh class.
44
/// Nx : number of elements in the x direction
45
///
46
/// Ny : number of elements in the y direction
47
///
48
/// Lx : length in the x direction
49
///
50
/// Ly : length in the y direction
51
///
52
/// Ordering of elements: 'Lower left' to 'lower right' then 'upwards'
53
///
54
/// Timestepper defaults to Steady.
55
//=======================================================================
56
template
<
class
ELEMENT>
57
class
SimpleRectangularQuadMesh
:
public
virtual
QuadMeshBase
58
{
59
public
:
60
/// Constructor: Pass number of elements in the horizontal
61
/// and vertical directions, and the corresponding dimensions.
62
/// Timestepper defaults to Steady.
63
SimpleRectangularQuadMesh
(
64
const
unsigned
& Nx,
65
const
unsigned
& Ny,
66
const
double
& Lx,
67
const
double
& Ly,
68
TimeStepper
* time_stepper_pt = &
Mesh::Default_TimeStepper
);
69
70
/// Access function for number of elements in x directions
71
const
unsigned
&
nx
()
const
72
{
73
return
NX
;
74
}
75
76
/// Access function for number of elements in y directions
77
const
unsigned
&
ny
()
const
78
{
79
return
NY
;
80
}
81
82
private
:
83
/// Number of elements in x direction
84
unsigned
NX
;
85
86
/// Number of elements in y direction
87
unsigned
NY
;
88
};
89
90
}
// namespace oomph
91
92
#endif
oomph::Mesh::Default_TimeStepper
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
Definition:
mesh.h:75
oomph::QuadMeshBase
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
Definition:
quad_mesh.h:57
oomph::SimpleRectangularQuadMesh
Simple rectangular 2D Quad mesh class. Nx : number of elements in the x direction.
Definition:
simple_rectangular_quadmesh.template.h:58
oomph::SimpleRectangularQuadMesh::ny
const unsigned & ny() const
Access function for number of elements in y directions.
Definition:
simple_rectangular_quadmesh.template.h:77
oomph::SimpleRectangularQuadMesh::nx
const unsigned & nx() const
Access function for number of elements in x directions.
Definition:
simple_rectangular_quadmesh.template.h:71
oomph::SimpleRectangularQuadMesh::NY
unsigned NY
Number of elements in y direction.
Definition:
simple_rectangular_quadmesh.template.h:87
oomph::SimpleRectangularQuadMesh::SimpleRectangularQuadMesh
SimpleRectangularQuadMesh(const unsigned &Nx, const unsigned &Ny, const double &Lx, const double &Ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in the horizontal and vertical directions, and the corresponding...
Definition:
simple_rectangular_quadmesh.template.cc:51
oomph::SimpleRectangularQuadMesh::NX
unsigned NX
Number of elements in x direction.
Definition:
simple_rectangular_quadmesh.template.h:84
oomph::TimeStepper
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition:
timesteppers.h:231
oomph
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
Definition:
advection_diffusion_elements.cc:30