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
single_layer_spine_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
#ifndef OOMPH_SINGLE_LAYER_SPINE_MESH_HEADER
31
#define OOMPH_SINGLE_LAYER_SPINE_MESH_HEADER
32
33
// oomph-lib includes
34
#include "../generic/spines.h"
35
#include "
rectangular_quadmesh.template.h
"
36
37
namespace
oomph
38
{
39
40
41
//======================================================================
42
/// Single-layer spine mesh class derived from standard 2D mesh.
43
/// The mesh contains a layer of spinified fluid elements (of type ELEMENT;
44
/// e.g SpineElement<QCrouzeixRaviartElement<2>).
45
/// It constructs the spines and contains the information on how to update
46
/// the nodal positions within the mesh as a function of the spine lengths.
47
/// Equations that determine the spine heights (even if they are pinned)
48
/// must be specified externally or else there will be problems.
49
//======================================================================
50
template
<
class
ELEMENT>
51
class
SingleLayerSpineMesh
:
public
RectangularQuadMesh
<ELEMENT >,
52
public
SpineMesh
53
{
54
55
public
:
56
57
/// \short Constructor: Pass number of elements in x-direction, number of
58
/// elements in y-direction, axial length, height of layer, and pointer
59
/// to timestepper (defaults to Steady timestepper)
60
SingleLayerSpineMesh
(
const
unsigned
&
nx
,
61
const
unsigned
&
ny
,
62
const
double
&lx,
63
const
double
&h,
64
TimeStepper
* time_stepper_pt=
65
&
Mesh::Default_TimeStepper
);
66
67
68
/// \short Constructor: Pass number of elements in x-direction, number of
69
/// elements in y-direction, axial length, height of layer, a boolean
70
/// flag to make the mesh periodic in the x-direction, and a pointer
71
/// to timestepper (defaults to Steady timestepper)
72
SingleLayerSpineMesh
(
const
unsigned
&nx,
73
const
unsigned
&ny,
74
const
double
&lx,
75
const
double
&h,
76
const
bool
& periodic_in_x,
77
TimeStepper
* time_stepper_pt=
78
&
Mesh::Default_TimeStepper
);
79
80
/// \short General node update function implements pure virtual function
81
/// defined in SpineMesh base class and performs specific node update
82
/// actions: along vertical spines
83
virtual
void
spine_node_update
(
SpineNode
* spine_node_pt)
84
{
85
//Get fraction along the spine
86
double
W
= spine_node_pt->
fraction
();
87
//Get spine height
88
double
H = spine_node_pt->
h
();
89
//Set the value of y
90
spine_node_pt->
x
(1) = this->
Ymin
+ W*H;
91
}
92
93
94
protected
:
95
96
97
/// \short Helper function to actually build the single-layer spine mesh
98
/// (called from various constructors)
99
virtual
void
build_single_layer_mesh
(
TimeStepper
* time_stepper_pt);
100
101
};
102
103
}
104
105
#endif
oomph::RectangularQuadMesh::nx
const unsigned & nx() const
Return number of elements in x direction.
Definition:
rectangular_quadmesh.template.h:186
oomph::SingleLayerSpineMesh::SingleLayerSpineMesh
SingleLayerSpineMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, axial length, height of layer, and pointer to timestepper (defaults to Steady timestepper)
Definition:
single_layer_spine_mesh.template.cc:55
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::SingleLayerSpineMesh::build_single_layer_mesh
virtual void build_single_layer_mesh(TimeStepper *time_stepper_pt)
Helper function to actually build the single-layer spine mesh (called from various constructors) ...
Definition:
single_layer_spine_mesh.template.cc:119
oomph::SpineNode::fraction
double & fraction()
Set reference to fraction along spine.
Definition:
spines.h:350
oomph::RectangularQuadMesh
Definition:
rectangular_quadmesh.template.h:63
oomph::Node::x
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition:
nodes.h:995
oomph
Definition:
advection_diffusion_elements.cc:33
oomph::RectangularQuadMesh::ny
const unsigned & ny() const
Return number of elements in y direction.
Definition:
rectangular_quadmesh.template.h:193
oomph::SingleLayerSpineMesh::spine_node_update
virtual void spine_node_update(SpineNode *spine_node_pt)
General node update function implements pure virtual function defined in SpineMesh base class and per...
Definition:
single_layer_spine_mesh.template.h:83
oomph::SpineNode::h
double & h()
Access function to spine height.
Definition:
spines.h:363
oomph::SpineMesh
Definition:
spines.h:565
oomph::SingleLayerSpineMesh
Definition:
single_layer_spine_mesh.template.h:51
oomph::QuadTreeNames::W
Definition:
quadtree.h:60
rectangular_quadmesh.template.h
oomph::TimeStepper
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition:
timesteppers.h:219
oomph::SpineNode
Definition:
spines.h:309
oomph::RectangularQuadMesh::Ymin
double Ymin
Minimum value of y coordinate.
Definition:
rectangular_quadmesh.template.h:80