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
backward_step_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
// Header file for a relatively simple Quad Meshe
27
#ifndef OOMPH_BACKWARD_STEP_MESH_HEADER
28
#define OOMPH_BACKWARD_STEP_MESH_HEADER
29
30
// Config header
31
#ifdef HAVE_CONFIG_H
32
#include <oomph-lib-config.h>
33
#endif
34
35
// OOMPH-LIB headers
36
#include "
rectangular_quadmesh.h
"
37
#include "generic/refineable_quad_mesh.h"
38
39
namespace
oomph
40
{
41
//=================================================================
42
/// Backward step mesh
43
//=================================================================
44
template
<
class
ELEMENT>
45
class
BackwardStepQuadMesh
:
public
virtual
RectangularQuadMesh
<ELEMENT>
46
{
47
public
:
48
/// Pass overall number of elements in the horizontal
49
/// and vertical directions, nx and ny, and the corresponding
50
/// dimensions, lx and ly. nx_cut_out and ny_cut_out elements
51
/// are cut out from the lower right corner to create the
52
/// (reversed) backward step geometry. Timestepper defaults
53
/// to Steady.
54
BackwardStepQuadMesh
(
55
const
unsigned
&
nx
,
56
const
unsigned
&
ny
,
57
const
unsigned
&
nx_cut_out
,
58
const
unsigned
&
ny_cut_out
,
59
const
double
&
lx
,
60
const
double
&
ly
,
61
TimeStepper
*
time_stepper_pt
= &Mesh::Default_TimeStepper)
62
:
RectangularQuadMesh
<
ELEMENT
>(
nx
,
ny
,
lx
,
ly
,
time_stepper_pt
)
63
{
64
// Do the actual build
65
build_mesh
(
nx
,
ny
,
nx_cut_out
,
ny_cut_out
,
lx
,
ly
);
66
}
67
68
/// Destructor: Empty
69
virtual
~BackwardStepQuadMesh
() {}
70
71
private
:
72
/// Actual build function
73
void
build_mesh
(
const
unsigned
&
nx
,
74
const
unsigned
&
ny
,
75
const
unsigned
&
nx_cut_out
,
76
const
unsigned
&
ny_cut_out
,
77
const
double
&
lx
,
78
const
double
&
ly
);
79
80
};
// end of mesh
81
82
83
////////////////////////////////////////////////////////////////////
84
////////////////////////////////////////////////////////////////////
85
////////////////////////////////////////////////////////////////////
86
87
//=================================================================
88
/// Refineable backward step mesh
89
//=================================================================
90
template
<
class
ELEMENT>
91
class
RefineableBackwardStepQuadMesh
92
:
public
virtual
BackwardStepQuadMesh
<ELEMENT>,
93
public
RefineableQuadMesh<ELEMENT>
94
{
95
public
:
96
/// Pass overall number of elements in the horizontal
97
/// and vertical directions, nx and ny, and the corresponding
98
/// dimensions, lx and ly. nx_cut_out and ny_cut_out elements
99
/// are cut out from the lower right corner to create the
100
/// (reversed) backward step geometry. Timestepper defaults
101
/// to Steady.
102
RefineableBackwardStepQuadMesh
(
103
const
unsigned
&
nx
,
104
const
unsigned
&
ny
,
105
const
unsigned
&
nx_cut_out
,
106
const
unsigned
&
ny_cut_out
,
107
const
double
&
lx
,
108
const
double
&
ly
,
109
TimeStepper
*
time_stepper_pt
= &Mesh::Default_TimeStepper)
110
:
RectangularQuadMesh
<
ELEMENT
>(
nx
,
ny
,
lx
,
ly
,
time_stepper_pt
),
111
BackwardStepQuadMesh
<
ELEMENT
>(
112
nx
,
ny
,
nx_cut_out
,
ny_cut_out
,
lx
,
ly
,
time_stepper_pt
)
113
{
114
// Nodal positions etc. were created in constructor for
115
// SimpleRectangularQuadMesh<...> --> We only need to set up
116
// adaptivity information: Associate finite elements with their
117
// QuadTrees and plant them in a QuadTreeForest:
118
this->
setup_quadtree_forest
();
119
120
}
// end of constructor
121
122
/// Destructor: Empty
123
virtual
~RefineableBackwardStepQuadMesh
() {}
124
125
};
// end of mesh
126
127
}
// namespace oomph
128
#include "
backward_step_mesh.template.cc
"
129
#endif
backward_step_mesh.template.cc
oomph::BackwardStepQuadMesh
Backward step mesh.
Definition
backward_step_mesh.h:46
oomph::BackwardStepQuadMesh::build_mesh
void build_mesh(const unsigned &nx, const unsigned &ny, const unsigned &nx_cut_out, const unsigned &ny_cut_out, const double &lx, const double &ly)
Actual build function.
Definition
backward_step_mesh.template.cc:47
oomph::BackwardStepQuadMesh::BackwardStepQuadMesh
BackwardStepQuadMesh(const unsigned &nx, const unsigned &ny, const unsigned &nx_cut_out, const unsigned &ny_cut_out, const double &lx, const double &ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Pass overall number of elements in the horizontal and vertical directions, nx and ny,...
Definition
backward_step_mesh.h:54
oomph::BackwardStepQuadMesh::~BackwardStepQuadMesh
virtual ~BackwardStepQuadMesh()
Destructor: Empty.
Definition
backward_step_mesh.h:69
oomph::MacroElementNodeUpdateCollapsibleChannelMesh
Collapsible channel mesh with MacroElement-based node update. The collapsible segment is represented ...
Definition
collapsible_channel_mesh.h:236
oomph::RectangularQuadMesh
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
Definition
rectangular_quadmesh.h:59
oomph::RectangularQuadMesh::ny
const unsigned & ny() const
Return number of elements in y direction.
Definition
rectangular_quadmesh.h:231
oomph::RectangularQuadMesh::nx
const unsigned & nx() const
Return number of elements in x direction.
Definition
rectangular_quadmesh.h:224
oomph::RefineableBackwardStepQuadMesh
Refineable backward step mesh.
Definition
backward_step_mesh.h:94
oomph::RefineableBackwardStepQuadMesh::RefineableBackwardStepQuadMesh
RefineableBackwardStepQuadMesh(const unsigned &nx, const unsigned &ny, const unsigned &nx_cut_out, const unsigned &ny_cut_out, const double &lx, const double &ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Pass overall number of elements in the horizontal and vertical directions, nx and ny,...
Definition
backward_step_mesh.h:102
oomph::RefineableBackwardStepQuadMesh::~RefineableBackwardStepQuadMesh
virtual ~RefineableBackwardStepQuadMesh()
Destructor: Empty.
Definition
backward_step_mesh.h:123
oomph
Definition
annular_domain.h:35
rectangular_quadmesh.h