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