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_cubic_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_CUBIC_SPINE_MESH_HEADER
31
#define OOMPH_SINGLE_LAYER_CUBIC_SPINE_MESH_HEADER
32
33
// oomph-lib includes
34
#include "../generic/spines.h"
35
#include "
simple_cubic_mesh.template.h
"
36
37
namespace
oomph
38
{
39
40
//======================================================================
41
/// Spine mesh class derived from standard cubic 3D mesh.
42
/// The mesh contains a layer of spinified fluid elements (of type ELEMENT;
43
/// e.g SpineElement<QCrouzeixRaviartElement<3>)
44
/// for 3D problems, in which the interface's vertical position can vary
45
///
46
/// This mesh has been carefully designed so that the
47
/// numeration of the nodes on the boundaries 0 and 5 (bottom and top)
48
/// coincides with the numeration of the spines
49
//======================================================================
50
template
<
class
ELEMENT>
51
class
SingleLayerCubicSpineMesh
:
public
SimpleCubicMesh
<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, number of elements in z-direction,
59
/// lengths in x- and y- directions, height of layer, and pointer
60
/// to timestepper (defaults to Steady timestepper)
61
SingleLayerCubicSpineMesh
(
const
unsigned
&
nx
,
62
const
unsigned
&
ny
,
63
const
unsigned
&
nz
,
64
const
double
&lx,
65
const
double
&ly,
66
const
double
&h,
67
TimeStepper
* time_stepper_pt=
68
&
Mesh::Default_TimeStepper
);
69
70
/// \short General node update function implements pure virtual function
71
/// defined in SpineMesh base class and performs specific node update
72
/// actions: along vertical spines
73
virtual
void
spine_node_update
(
SpineNode
* spine_node_pt)
74
{
75
//Get fraction along the spine
76
double
W
= spine_node_pt->
fraction
();
77
//Get spine height
78
double
H = spine_node_pt->
h
();
79
//Set the value of z
80
spine_node_pt->
x
(2) = this->
Zmin
+ W*H;
81
}
82
83
protected
:
84
85
/// \short Helper function to actually build the single-layer spine mesh
86
/// (called from various constructors)
87
virtual
void
build_single_layer_mesh
(
TimeStepper
* time_stepper_pt);
88
89
};
90
91
}
92
93
#endif
94
95
oomph::SimpleCubicMesh::ny
const unsigned & ny() const
Access function for number of elements in y directions.
Definition:
simple_cubic_mesh.template.h:96
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
simple_cubic_mesh.template.h
oomph::SimpleCubicMesh::nz
const unsigned & nz() const
Access function for number of elements in y directions.
Definition:
simple_cubic_mesh.template.h:99
oomph::SimpleCubicMesh
Simple cubic 3D Brick mesh class.
Definition:
simple_cubic_mesh.template.h:52
oomph::SpineNode::fraction
double & fraction()
Set reference to fraction along spine.
Definition:
spines.h:350
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::SingleLayerCubicSpineMesh::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_cubic_spine_mesh.template.h:73
oomph::SpineNode::h
double & h()
Access function to spine height.
Definition:
spines.h:363
oomph::SpineMesh
Definition:
spines.h:565
oomph::SingleLayerCubicSpineMesh::SingleLayerCubicSpineMesh
SingleLayerCubicSpineMesh(const unsigned &nx, const unsigned &ny, const unsigned &nz, const double &lx, const double &ly, const double &h, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction, number of elements in z-direction, lengths in x- and y- directions, height of layer, and pointer to timestepper (defaults to Steady timestepper)
Definition:
single_layer_cubic_spine_mesh.template.cc:47
oomph::SingleLayerCubicSpineMesh::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_cubic_spine_mesh.template.cc:69
oomph::SingleLayerCubicSpineMesh
Definition:
single_layer_cubic_spine_mesh.template.h:51
oomph::QuadTreeNames::W
Definition:
quadtree.h:60
oomph::SimpleCubicMesh::Zmin
double Zmin
Minimum value of z coordinate.
Definition:
simple_cubic_mesh.template.h:125
oomph::SimpleCubicMesh::nx
const unsigned & nx() const
Access function for number of elements in x directions.
Definition:
simple_cubic_mesh.template.h:93
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