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
About
People
Contact/Get involved
Publications
Acknowledgements
Copyright
Picture show
Go
src
meshes
simple_rectangular_tri_mesh.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-2025 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
// Header file for simple 2D triangle mesh class
27
28
// Include guards to prevent multiple inclusion of the header
29
#ifndef OOMPH_SIMPLE_RECTANGULAR_TRI_MESH_HEADER
30
#define OOMPH_SIMPLE_RECTANGULAR_TRI_MESH_HEADER
31
32
// Config header
33
#ifdef HAVE_CONFIG_H
34
#include <oomph-lib-config.h>
35
#endif
36
37
// Oomph-lib includes
38
#include "
generic/mesh.h
"
39
#include "
generic/triangle_mesh.h
"
40
41
namespace
oomph
42
{
43
//===================================================================
44
/// Simple 2D triangular mesh for TElements
45
//===================================================================
46
template
<
class
ELEMENT>
47
class
SimpleRectangularTriMesh
:
public
virtual
TriangleMeshBase
48
{
49
public
:
50
/// Constructor
51
/// n_x : number of elements in the x direction;
52
/// n_y : number of elements in the y direction;
53
/// l_x : length in the x direction
54
/// l_y : length in the y direction
55
/// Ordering of elements: 'lower left' to 'lower right' then 'upwards'
56
SimpleRectangularTriMesh
(
57
const
unsigned
&
n_x
,
58
const
unsigned
&
n_y
,
59
const
double
&
l_x
,
60
const
double
& l_y,
61
TimeStepper
* time_stepper_pt = &
Mesh::Default_TimeStepper
);
62
63
/// Access function for number of elements in x directions
64
const
unsigned
&
nx
()
const
65
{
66
return
Nx
;
67
}
68
69
/// Access function for number of elements in y directions
70
const
unsigned
&
ny
()
const
71
{
72
return
Ny
;
73
}
74
75
private
:
76
/// Number of elements in x direction
77
unsigned
Nx
;
78
79
/// Number of elements in y directions
80
unsigned
Ny
;
81
82
/// Length of mesh in x-direction
83
double
Lx
;
84
85
/// Length of mesh in y-direction
86
double
Ly
;
87
};
88
89
}
// namespace oomph
90
91
#include "
simple_rectangular_tri_mesh.template.cc
"
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::SimpleRectangularTriMesh
Simple 2D triangular mesh for TElements.
Definition
simple_rectangular_tri_mesh.h:48
oomph::SimpleRectangularTriMesh::Lx
double Lx
Length of mesh in x-direction.
Definition
simple_rectangular_tri_mesh.h:83
oomph::SimpleRectangularTriMesh::Ny
unsigned Ny
Number of elements in y directions.
Definition
simple_rectangular_tri_mesh.h:80
oomph::SimpleRectangularTriMesh::Nx
unsigned Nx
Number of elements in x direction.
Definition
simple_rectangular_tri_mesh.h:77
oomph::SimpleRectangularTriMesh::ny
const unsigned & ny() const
Access function for number of elements in y directions.
Definition
simple_rectangular_tri_mesh.h:70
oomph::SimpleRectangularTriMesh::Ly
double Ly
Length of mesh in y-direction.
Definition
simple_rectangular_tri_mesh.h:86
oomph::SimpleRectangularTriMesh::nx
const unsigned & nx() const
Access function for number of elements in x directions.
Definition
simple_rectangular_tri_mesh.h:64
oomph::TAdvectionDiffusionReactionElement
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
Definition
Tadvection_diffusion_reaction_elements.h:66
oomph::TimeStepper
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition
timesteppers.h:231
oomph::TriangleMeshBase
Base class for triangle meshes (meshes made of 2D triangle elements). Note: we choose to template Tri...
Definition
generic/triangle_mesh.h:52
triangle_mesh.h
mesh.h
oomph
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition
advection_diffusion_elements.cc:30
simple_rectangular_tri_mesh.template.cc