thin_layer_brick_on_tet_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_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
27#define OOMPH_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
28
29#include "generic/brick_mesh.h"
31
32namespace oomph
33{
34 //========================================================================
35 /// Brick mesh layer built on top of a given tet mesh. Typically
36 /// used in FSI problems where the tet mesh is the fluid mesh and this
37 /// mesh acts as the solid mesh that surrounds the FSI interface.
38 //========================================================================
39 template<class ELEMENT>
41 {
42 public:
43 /// Function pointer to function that specifies the wall thickness
44 /// as a fct of the coordinates of the inner surface
45 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
46
47 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
48 /// boundary on which the current mesh is to be erected (in an FSI context
49 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
50 /// specify the uniform thickness of layer, and the number of element
51 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
52 /// IDs of the other boundaries in the tet mesh. In an FSI context
53 /// these typically identify the in/outflow boundaries in the fluid
54 /// mesh. The boundary enumeration of the current mesh follows the
55 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
56 /// matches (to enable the setup of the FSI matching); the "in/outflow"
57 /// faces in this mesh inherit the same enumeration as the in/outflow
58 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
59 /// gets its own boundary ID.
60 /// Timestepper defaults to steady pseudo-timestepper.
65 const unsigned& nlayer,
67 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
68
69
70 /// Access functions to the Vector of oomph-lib boundary ids
71 /// that make up boundary on which the mesh was erected (typically
72 /// the FSI interface in an FSI problem)
77
78 /// Boundary ID of the "outer" surface -- in an FSI context
79 /// this is the non-wetted tube surface at a distance h_thick from
80 /// the FSI surface
82 {
83 return Outer_boundary_id;
84 }
85
86 /// Access function to the vector containing the ids of the oomph-lib
87 /// mesh boundaries that make up the specified in/outflow boundaries
88 /// as specified in constructor.
89 Vector<unsigned> in_out_boundary_id(const unsigned& boundary_id)
90 {
91 return In_out_boundary_id[boundary_id];
92 }
93
94 private:
95 /// Vector of oomph-lib boundary ids
96 /// that make up boundary on which the mesh was erected (typically
97 /// the FSI interface in an FSI problem)
99
100 /// Boundary ID of the "outer" surface -- the non-wetted
101 /// tube surface at a distance h_thick from the FSI surface
103
104 /// Vector of vectors containing the ids of the oomph-lib
105 /// mesh boundaries that make up the specified in/outflow boundaries
107
108 /// Function pointer to function that specifies the wall thickness
109 /// as a fct of the coordinates of the inner surface
111 };
112
113
114 ///////////////////////////////////////////////////////////////////////
115 ///////////////////////////////////////////////////////////////////////
116 ///////////////////////////////////////////////////////////////////////
117
118 //========================================================================
119 /// Refineable brick mesh layer built on top of a given tet mesh. Typically
120 /// used in FSI problems where the tet mesh is the fluid mesh and this
121 /// mesh acts as the solid mesh that surrounds the FSI interface.
122 //========================================================================
123 template<class ELEMENT>
125 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
126 public virtual RefineableBrickMesh<ELEMENT>
127 {
128 public:
129 /// Function pointer to function that specifies the wall thickness
130 /// as a fct of the coordinates of the inner surface
131 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
132
133 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
134 /// boundary on which the current mesh is to be erected (in an FSI context
135 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
136 /// specify the uniform thickness of layer, and the number of element
137 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
138 /// IDs of the other boundaries in the tet mesh. In an FSI context
139 /// these typically identify the in/outflow boundaries in the fluid
140 /// mesh. The boundary enumeration of the current mesh follows the
141 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
142 /// matches (to enable the setup of the FSI matching); the "in/outflow"
143 /// faces in this mesh inherit the same enumeration as the in/outflow
144 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
145 /// gets its own boundary ID.
146 /// Timestepper defaults to steady pseudo-timestepper.
151 const unsigned& nlayer,
153 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
157 nlayer,
159 time_stepper_pt)
160 {
161 // Nodal positions etc. were created in constructor for
162 // nonrefineable mesh. Only need to setup quadtree forest
163 this->setup_octree_forest();
164 }
165 };
166
167
168 ///////////////////////////////////////////////////////////////////////
169 ///////////////////////////////////////////////////////////////////////
170 ///////////////////////////////////////////////////////////////////////
171
172 //========================================================================
173 /// Solid brick mesh layer built on top of a given tet mesh. Typically
174 /// used in FSI problems where the tet mesh is the fluid mesh and this
175 /// mesh acts as the solid mesh that surrounds the FSI interface.
176 //========================================================================
177 template<class ELEMENT>
179 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
180 public virtual SolidMesh
181 {
182 public:
183 /// Function pointer to function that specifies the wall thickness
184 /// as a fct of the coordinates of the inner surface
185 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
186
187 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
188 /// boundary on which the current mesh is to be erected (in an FSI context
189 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
190 /// specify the uniform thickness of layer, and the number of element
191 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
192 /// IDs of the other boundaries in the tet mesh. In an FSI context
193 /// these typically identify the in/outflow boundaries in the fluid
194 /// mesh. The boundary enumeration of the current mesh follows the
195 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
196 /// matches (to enable the setup of the FSI matching); the "in/outflow"
197 /// faces in this mesh inherit the same enumeration as the in/outflow
198 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
199 /// gets its own boundary ID.
200 /// Timestepper defaults to steady pseudo-timestepper.
205 const unsigned& nlayer,
207 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
211 nlayer,
213 time_stepper_pt)
214 {
215 // Make the current configuration the undeformed one by
216 // setting the nodal Lagrangian coordinates to their current
217 // Eulerian ones
219 }
220 };
221
222
223 ///////////////////////////////////////////////////////////////////////
224 ///////////////////////////////////////////////////////////////////////
225 ///////////////////////////////////////////////////////////////////////
226
227 //========================================================================
228 /// Refineable solid brick mesh layer built on top of a given tet mesh.
229 /// Typically used in FSI problems where the tet mesh is the fluid mesh and
230 /// this mesh acts as the solid mesh that surrounds the FSI interface.
231 //========================================================================
232 template<class ELEMENT>
234 : public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
235 public virtual RefineableBrickMesh<ELEMENT>,
236 public virtual SolidMesh
237 {
238 public:
239 /// Function pointer to function that specifies the wall thickness
240 /// as a fct of the coordinates of the inner surface
241 typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
242
243 /// Constructor: Specify (quadratic) tet mesh, boundary IDs of
244 /// boundary on which the current mesh is to be erected (in an FSI context
245 /// this boundary tends to be the FSI boundary of the fluid mesh. Also
246 /// specify the uniform thickness of layer, and the number of element
247 /// layers. The vectors stored in in_out_boundary_ids contain the boundary
248 /// IDs of the other boundaries in the tet mesh. In an FSI context
249 /// these typically identify the in/outflow boundaries in the fluid
250 /// mesh. The boundary enumeration of the current mesh follows the
251 /// one of the underlying fluid mesh: The enumeration of the FSI boundary
252 /// matches (to enable the setup of the FSI matching); the "in/outflow"
253 /// faces in this mesh inherit the same enumeration as the in/outflow
254 /// faces in the underlying fluid mesh. Finally, the "outer" boundary
255 /// gets its own boundary ID.
256 /// Timestepper defaults to steady pseudo-timestepper.
261 const unsigned& nlayer,
263 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
267 nlayer,
269 time_stepper_pt)
270 {
271 // Make the current configuration the undeformed one by
272 // setting the nodal Lagrangian coordinates to their current
273 // Eulerian ones
275
276 // Nodal positions etc. were created in constructor for
277 // nonrefineable mesh. Only need to setup quadtree forest
278 this->setup_octree_forest();
279 }
280 };
281
282} // namespace oomph
283
285#endif
Base class for brick meshes (meshes made of 3D brick elements).
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...
Refineable solid brick mesh layer built on top of a given tet mesh. Typically used in FSI problems wh...
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...
Refineable brick mesh layer built on top of a given tet mesh. Typically used in FSI problems where th...
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:2570
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
Definition mesh.cc:9564
Solid brick mesh layer built on top of a given tet mesh. Typically used in FSI problems where the tet...
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...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
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...
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...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
Definition Vector.h:58
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).