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
Installation
Installation guide
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// Copyright (C) 2006-2023 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_SPINE_MESH_HEADER
27
#define OOMPH_SINGLE_LAYER_SPINE_MESH_HEADER
28
29
// oomph-lib includes
30
#include "../generic/spines.h"
31
#include "
rectangular_quadmesh.template.h
"
32
33
namespace
oomph
34
{
35
//======================================================================
36
/// Single-layer spine mesh class derived from standard 2D mesh.
37
/// The mesh contains a layer of spinified fluid elements (of type ELEMENT;
38
/// e.g SpineElement<QCrouzeixRaviartElement<2>).
39
/// It constructs the spines and contains the information on how to update
40
/// the nodal positions within the mesh as a function of the spine lengths.
41
/// Equations that determine the spine heights (even if they are pinned)
42
/// must be specified externally or else there will be problems.
43
//======================================================================
44
template
<
class
ELEMENT>
45
class
SingleLayerSpineMesh
:
public
RectangularQuadMesh
<ELEMENT>,
46
public
SpineMesh
47
{
48
public
:
49
/// Constructor: Pass number of elements in x-direction, number of
50
/// elements in y-direction, axial length, height of layer, and pointer
51
/// to timestepper (defaults to Steady timestepper)
52
SingleLayerSpineMesh
(
53
const
unsigned
&
nx
,
54
const
unsigned
&
ny
,
55
const
double
& lx,
56
const
double
& h,
57
TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
58
59
60
/// Constructor: Pass number of elements in x-direction, number of
61
/// elements in y-direction, axial length, height of layer, a boolean
62
/// flag to make the mesh periodic in the x-direction, and a pointer
63
/// to timestepper (defaults to Steady timestepper)
64
SingleLayerSpineMesh
(
65
const
unsigned
&
nx
,
66
const
unsigned
&
ny
,
67
const
double
& lx,
68
const
double
& h,
69
const
bool
& periodic_in_x,
70
TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
71
72
/// General node update function implements pure virtual function
73
/// defined in SpineMesh base class and performs specific node update
74
/// actions: along vertical spines
75
virtual
void
spine_node_update
(SpineNode* spine_node_pt)
76
{
77
// Get fraction along the spine
78
double
W = spine_node_pt->fraction();
79
// Get spine height
80
double
H = spine_node_pt->h();
81
// Set the value of y
82
spine_node_pt->x(1) = this->
Ymin
+ W * H;
83
}
84
85
86
protected
:
87
/// Helper function to actually build the single-layer spine mesh
88
/// (called from various constructors)
89
virtual
void
build_single_layer_mesh
(TimeStepper* time_stepper_pt);
90
};
91
92
}
// namespace oomph
93
94
#endif
oomph::RectangularQuadMesh
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
Definition:
rectangular_quadmesh.template.h:59
oomph::RectangularQuadMesh::ny
const unsigned & ny() const
Return number of elements in y direction.
Definition:
rectangular_quadmesh.template.h:231
oomph::RectangularQuadMesh::nx
const unsigned & nx() const
Return number of elements in x direction.
Definition:
rectangular_quadmesh.template.h:224
oomph::RectangularQuadMesh::Ymin
double Ymin
Minimum value of y coordinate.
Definition:
rectangular_quadmesh.template.h:75
oomph::SingleLayerSpineMesh
Single-layer spine mesh class derived from standard 2D mesh. The mesh contains a layer of spinified f...
Definition:
single_layer_spine_mesh.template.h:47
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,...
Definition:
single_layer_spine_mesh.template.cc:48
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:75
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:114
oomph
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition:
annular_domain.h:35
rectangular_quadmesh.template.h