thin_layer_brick_on_tet_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-2022 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_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
27#define OOMPH_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
28
29
30#include "../generic/brick_mesh.h"
31#include "../generic/refineable_brick_mesh.h"
32
33namespace oomph
34{
35 //========================================================================
36 /// Brick mesh layer built on top of a given tet mesh. Typically
37 /// used in FSI problems where the tet mesh is the fluid mesh and this
38 /// mesh acts as the solid mesh that surrounds the FSI interface.
39 //========================================================================
40 template<class ELEMENT>
42 {
43 public:
44 /// Function pointer to function that specifies the wall thickness
45 /// as a fct of the coordinates of the inner surface
46 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
47
48 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
49 /// boundary on which the current mesh is to be erected (in an FSI context
50 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
51 /// specify the uniform thickness of layer, and the number of element
52 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
53 /// IDs of the other boundaries in the tet mesh. In an FSI context
54 /// these typically identify the in/outflow boundaries in the fluid
55 /// mesh. The boundary enumeration of the current mesh follows the
56 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
57 /// matches (to enable the setup of the FSI matching); the "in/outflow"
58 /// faces in this mesh inherit the same enumeration as the in/outflow
59 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
60 /// gets its own boundary ID.
61 /// Timestepper defaults to steady pseudo-timestepper.
63 Mesh* tet_mesh_pt,
64 const Vector<unsigned>& boundary_ids,
65 ThicknessFctPt thickness_fct_pt,
66 const unsigned& nlayer,
68 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
69
70
71 /// Access functions to the Vector of oomph-lib boundary ids
72 /// that make up boundary on which the mesh was erected (typically
73 /// the FSI interface in an FSI problem)
75 {
76 return FSI_boundary_id;
77 }
78
79 /// Boundary ID of the "outer" surface -- in an FSI context
80 /// this is the non-wetted tube surface at a distance h_thick from
81 /// the FSI surface
83 {
84 return Outer_boundary_id;
85 }
86
87 /// Access function to the vector containing the ids of the oomph-lib
88 /// mesh boundaries that make up the specified in/outflow boundaries
89 /// as specified in constructor.
90 Vector<unsigned> in_out_boundary_id(const unsigned& boundary_id)
91 {
92 return In_out_boundary_id[boundary_id];
93 }
94
95
96 private:
97 /// Vector of oomph-lib boundary ids
98 /// that make up boundary on which the mesh was erected (typically
99 /// the FSI interface in an FSI problem)
101
102 /// Boundary ID of the "outer" surface -- the non-wetted
103 /// tube surface at a distance h_thick from the FSI surface
105
106 /// Vector of vectors containing the ids of the oomph-lib
107 /// mesh boundaries that make up the specified in/outflow boundaries
109
110 /// Function pointer to function that specifies the wall thickness
111 /// as a fct of the coordinates of the inner surface
113 };
114
115
116 /// ////////////////////////////////////////////////////////////////////
117 /// ////////////////////////////////////////////////////////////////////
118 /// ////////////////////////////////////////////////////////////////////
119
120
121 //========================================================================
122 /// Refineable brick mesh layer built on top of a given tet mesh. Typically
123 /// used in FSI problems where the tet mesh is the fluid mesh and this
124 /// mesh acts as the solid mesh that surrounds the FSI interface.
125 //========================================================================
126 template<class ELEMENT>
128 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
129 public virtual RefineableBrickMesh<ELEMENT>
130 {
131 public:
132 /// Function pointer to function that specifies the wall thickness
133 /// as a fct of the coordinates of the inner surface
134 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
135
136 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
137 /// boundary on which the current mesh is to be erected (in an FSI context
138 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
139 /// specify the uniform thickness of layer, and the number of element
140 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
141 /// IDs of the other boundaries in the tet mesh. In an FSI context
142 /// these typically identify the in/outflow boundaries in the fluid
143 /// mesh. The boundary enumeration of the current mesh follows the
144 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
145 /// matches (to enable the setup of the FSI matching); the "in/outflow"
146 /// faces in this mesh inherit the same enumeration as the in/outflow
147 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
148 /// gets its own boundary ID.
149 /// Timestepper defaults to steady pseudo-timestepper.
151 Mesh* tet_mesh_pt,
152 const Vector<unsigned>& boundary_ids,
153 ThicknessFctPt thickness_fct_pt,
154 const unsigned& nlayer,
156 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
157 : ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
158 boundary_ids,
159 thickness_fct_pt,
160 nlayer,
162 time_stepper_pt)
163 {
164 // Nodal positions etc. were created in constructor for
165 // nonrefineable mesh. Only need to setup quadtree forest
166 this->setup_octree_forest();
167 }
168 };
169
170
171 /// ////////////////////////////////////////////////////////////////////
172 /// ////////////////////////////////////////////////////////////////////
173 /// ////////////////////////////////////////////////////////////////////
174
175
176 //========================================================================
177 /// Solid brick mesh layer built on top of a given tet mesh. Typically
178 /// used in FSI problems where the tet mesh is the fluid mesh and this
179 /// mesh acts as the solid mesh that surrounds the FSI interface.
180 //========================================================================
181 template<class ELEMENT>
183 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
184 public virtual SolidMesh
185 {
186 public:
187 /// Function pointer to function that specifies the wall thickness
188 /// as a fct of the coordinates of the inner surface
189 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
190
191 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
192 /// boundary on which the current mesh is to be erected (in an FSI context
193 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
194 /// specify the uniform thickness of layer, and the number of element
195 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
196 /// IDs of the other boundaries in the tet mesh. In an FSI context
197 /// these typically identify the in/outflow boundaries in the fluid
198 /// mesh. The boundary enumeration of the current mesh follows the
199 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
200 /// matches (to enable the setup of the FSI matching); the "in/outflow"
201 /// faces in this mesh inherit the same enumeration as the in/outflow
202 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
203 /// gets its own boundary ID.
204 /// Timestepper defaults to steady pseudo-timestepper.
206 Mesh* tet_mesh_pt,
207 const Vector<unsigned>& boundary_ids,
208 ThicknessFctPt thickness_fct_pt,
209 const unsigned& nlayer,
211 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
212 : ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
213 boundary_ids,
214 thickness_fct_pt,
215 nlayer,
217 time_stepper_pt)
218 {
219 // Make the current configuration the undeformed one by
220 // setting the nodal Lagrangian coordinates to their current
221 // Eulerian ones
223 }
224 };
225
226
227 /// ////////////////////////////////////////////////////////////////////
228 /// ////////////////////////////////////////////////////////////////////
229 /// ////////////////////////////////////////////////////////////////////
230
231
232 //========================================================================
233 /// Refineable solid brick mesh layer built on top of a given tet mesh.
234 /// Typically used in FSI problems where the tet mesh is the fluid mesh and
235 /// this mesh acts as the solid mesh that surrounds the FSI interface.
236 //========================================================================
237 template<class ELEMENT>
239 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
240 public virtual RefineableBrickMesh<ELEMENT>,
241 public virtual SolidMesh
242 {
243 public:
244 /// Function pointer to function that specifies the wall thickness
245 /// as a fct of the coordinates of the inner surface
246 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
247
248 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
249 /// boundary on which the current mesh is to be erected (in an FSI context
250 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
251 /// specify the uniform thickness of layer, and the number of element
252 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
253 /// IDs of the other boundaries in the tet mesh. In an FSI context
254 /// these typically identify the in/outflow boundaries in the fluid
255 /// mesh. The boundary enumeration of the current mesh follows the
256 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
257 /// matches (to enable the setup of the FSI matching); the "in/outflow"
258 /// faces in this mesh inherit the same enumeration as the in/outflow
259 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
260 /// gets its own boundary ID.
261 /// Timestepper defaults to steady pseudo-timestepper.
263 Mesh* tet_mesh_pt,
264 const Vector<unsigned>& boundary_ids,
265 ThicknessFctPt thickness_fct_pt,
266 const unsigned& nlayer,
268 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
269 : ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
270 boundary_ids,
271 thickness_fct_pt,
272 nlayer,
274 time_stepper_pt)
275 {
276 // Make the current configuration the undeformed one by
277 // setting the nodal Lagrangian coordinates to their current
278 // Eulerian ones
280
281 // Nodal positions etc. were created in constructor for
282 // nonrefineable mesh. Only need to setup quadtree forest
283 this->setup_octree_forest();
284 }
285 };
286
287
288} // namespace oomph
289
290#endif
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
Definition: brick_mesh.h:178
A general mesh class.
Definition: mesh.h:67
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors.
Definition: mesh.h:75
Intermediate mesh class that implements the mesh adaptation functions specified in the TreeBasedRefin...
void setup_octree_forest()
Do what it says...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void(* ThicknessFctPt)(const Vector< double > &x, double &h_thick)
Function pointer to function that specifies the wall thickness as a fct of the coordinates of the inn...
RefineableSolidThinLayerBrickOnTetMesh(Mesh *tet_mesh_pt, const Vector< unsigned > &boundary_ids, ThicknessFctPt thickness_fct_pt, const unsigned &nlayer, const Vector< Vector< unsigned > > &in_out_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Specify (quadratic) tet mesh, boundary IDs of boundary on which the current mesh is to b...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
RefineableThinLayerBrickOnTetMesh(Mesh *tet_mesh_pt, const Vector< unsigned > &boundary_ids, ThicknessFctPt thickness_fct_pt, const unsigned &nlayer, const Vector< Vector< unsigned > > &in_out_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Specify (quadratic) tet mesh, boundary IDs of boundary on which the current mesh is to b...
void(* ThicknessFctPt)(const Vector< double > &x, double &h_thick)
Function pointer to function that specifies the wall thickness as a fct of the coordinates of the inn...
General SolidMesh class.
Definition: mesh.h:2562
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
Definition: mesh.cc:9564
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
SolidThinLayerBrickOnTetMesh(Mesh *tet_mesh_pt, const Vector< unsigned > &boundary_ids, ThicknessFctPt thickness_fct_pt, const unsigned &nlayer, const Vector< Vector< unsigned > > &in_out_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Specify (quadratic) tet mesh, boundary IDs of boundary on which the current mesh is to b...
void(* ThicknessFctPt)(const Vector< double > &x, double &h_thick)
Function pointer to function that specifies the wall thickness as a fct of the coordinates of the inn...
Brick mesh layer built on top of a given tet mesh. Typically used in FSI problems where the tet mesh ...
ThicknessFctPt Thickness_fct_pt
Function pointer to function that specifies the wall thickness as a fct of the coordinates of the inn...
unsigned Outer_boundary_id
Boundary ID of the "outer" surface – the non-wetted tube surface at a distance h_thick from the FSI s...
unsigned outer_boundary_id()
Boundary ID of the "outer" surface – in an FSI context this is the non-wetted tube surface at a dista...
Vector< Vector< unsigned > > In_out_boundary_id
Vector of vectors containing the ids of the oomph-lib mesh boundaries that make up the specified in/o...
Vector< unsigned > in_out_boundary_id(const unsigned &boundary_id)
Access function to the vector containing the ids of the oomph-lib mesh boundaries that make up the sp...
Vector< unsigned > fsi_boundary_id()
Access functions to the Vector of oomph-lib boundary ids that make up boundary on which the mesh was ...
Vector< unsigned > FSI_boundary_id
Vector of oomph-lib boundary ids that make up boundary on which the mesh was erected (typically the F...
ThinLayerBrickOnTetMesh(Mesh *tet_mesh_pt, const Vector< unsigned > &boundary_ids, ThicknessFctPt thickness_fct_pt, const unsigned &nlayer, const Vector< Vector< unsigned > > &in_out_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Specify (quadratic) tet mesh, boundary IDs of boundary on which the current mesh is to b...
void(* ThicknessFctPt)(const Vector< double > &x, double &h_thick)
Function pointer to function that specifies the wall thickness as a fct of the coordinates of the inn...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition: timesteppers.h:231
//////////////////////////////////////////////////////////////////// ////////////////////////////////...