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>
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
unsigned Nx
Number of elements in x direction.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
Definition: mesh.h:85
double Ly
Length of mesh in y-direction.
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;...
Simple 2D triangular mesh for TElements.
const unsigned & nx() const
Access function for number of elements in x directions.
double Lx
Length of mesh in x-direction.
const unsigned & ny() const
Access function for number of elements in y directions.
unsigned Ny
Number of elements in y directions.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition: timesteppers.h:219