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
Get it
Installation guide
Get code from subversion repository
Get code as tar file
Copyright
About
People
Contact/Get involved
Publications
Acknowledgements
Picture show
Go
src
meshes
simple_rectangular_tri_mesh.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// Version 1.0; svn revision $LastChangedRevision$
7
//LIC//
8
//LIC// $LastChangedDate$
9
//LIC//
10
//LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11
//LIC//
12
//LIC// This library is free software; you can redistribute it and/or
13
//LIC// modify it under the terms of the GNU Lesser General Public
14
//LIC// License as published by the Free Software Foundation; either
15
//LIC// version 2.1 of the License, or (at your option) any later version.
16
//LIC//
17
//LIC// This library is distributed in the hope that it will be useful,
18
//LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
//LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
//LIC// Lesser General Public License for more details.
21
//LIC//
22
//LIC// You should have received a copy of the GNU Lesser General Public
23
//LIC// License along with this library; if not, write to the Free Software
24
//LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25
//LIC// 02110-1301 USA.
26
//LIC//
27
//LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28
//LIC//
29
//LIC//====================================================================
30
//Header file for simple 2D triangle mesh class
31
32
//Include guards to prevent multiple inclusion of the header
33
#ifndef OOMPH_SIMPLE_RECTANGULAR_TRIMESH_HEADER
34
#define OOMPH_SIMPLE_RECTANGULAR_TRIMESH_HEADER
35
36
// Config header generated by autoconfig
37
#ifdef HAVE_CONFIG_H
38
#include <oomph-lib-config.h>
39
#endif
40
41
42
// Oomph-lib includes
43
#include "../generic/mesh.h"
44
#include "../generic/triangle_mesh.h"
45
46
namespace
oomph
47
{
48
49
//===================================================================
50
/// Simple 2D triangular mesh for TElements
51
//===================================================================
52
template
<
class
ELEMENT>
53
class
SimpleRectangularTriMesh
:
public
virtual
TriangleMeshBase
54
{
55
56
public
:
57
58
/// \short Constructor
59
/// n_x : number of elements in the x direction;
60
/// n_y : number of elements in the y direction;
61
/// l_x : length in the x direction
62
/// l_y : length in the y direction
63
/// Ordering of elements: 'lower left' to 'lower right' then 'upwards'
64
SimpleRectangularTriMesh
(
const
unsigned
&n_x,
const
unsigned
&n_y,
65
const
double
&l_x,
const
double
&l_y,
66
TimeStepper
* time_stepper_pt=&
Mesh::Default_TimeStepper
);
67
68
/// Access function for number of elements in x directions
69
const
unsigned
&
nx
()
const
{
return
Nx
;}
70
71
/// Access function for number of elements in y directions
72
const
unsigned
&
ny
()
const
{
return
Ny
;}
73
74
private
:
75
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
90
}
91
92
#endif
oomph::SimpleRectangularTriMesh::Nx
unsigned Nx
Number of elements in x direction.
Definition:
simple_rectangular_tri_mesh.template.h:77
oomph::Mesh::Default_TimeStepper
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
Definition:
mesh.h:85
oomph::SimpleRectangularTriMesh::Ly
double Ly
Length of mesh in y-direction.
Definition:
simple_rectangular_tri_mesh.template.h:86
oomph::SimpleRectangularTriMesh::SimpleRectangularTriMesh
SimpleRectangularTriMesh(const unsigned &n_x, const unsigned &n_y, const double &l_x, const double &l_y, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor n_x : number of elements in the x direction; n_y : number of elements in the y direction;...
Definition:
simple_rectangular_tri_mesh.template.cc:61
oomph::SimpleRectangularTriMesh
Simple 2D triangular mesh for TElements.
Definition:
simple_rectangular_tri_mesh.template.h:53
oomph::TriangleMeshBase
Definition:
triangle_mesh.h:55
oomph
Definition:
advection_diffusion_elements.cc:33
oomph::SimpleRectangularTriMesh::nx
const unsigned & nx() const
Access function for number of elements in x directions.
Definition:
simple_rectangular_tri_mesh.template.h:69
oomph::SimpleRectangularTriMesh::Lx
double Lx
Length of mesh in x-direction.
Definition:
simple_rectangular_tri_mesh.template.h:83
oomph::SimpleRectangularTriMesh::ny
const unsigned & ny() const
Access function for number of elements in y directions.
Definition:
simple_rectangular_tri_mesh.template.h:72
oomph::SimpleRectangularTriMesh::Ny
unsigned Ny
Number of elements in y directions.
Definition:
simple_rectangular_tri_mesh.template.h:80
oomph::TimeStepper
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition:
timesteppers.h:219