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// Version 1.0; svn revision $LastChangedRevision: 1097 $
7 //LIC//
8 //LIC// $LastChangedDate: 2015-12-17 11:53:17 +0000 (Thu, 17 Dec 2015) $
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 #ifndef OOMPH_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
31 #define OOMPH_THIN_LAYER_BRICK_ON_TET_MESH_HEADER
32 
33 
34 #include "../generic/brick_mesh.h"
35 #include "../generic/refineable_brick_mesh.h"
36 
37 namespace oomph
38 {
39 
40 //========================================================================
41 /// Brick mesh layer built on top of a given tet mesh. Typically
42 /// used in FSI problems where the tet mesh is the fluid mesh and this
43 /// mesh acts as the solid mesh that surrounds the FSI interface.
44 //========================================================================
45  template<class ELEMENT>
46  class ThinLayerBrickOnTetMesh : public virtual BrickMeshBase
47  {
48 
49  public:
50 
51  /// \short Function pointer to function that specifies the wall thickness
52  /// as a fct of the coordinates of the inner surface
53  typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
54 
55  /// \short Constructor: Specify (quadratic) tet mesh, boundary IDs of
56  /// boundary on which the current mesh is to be erected (in an FSI context
57  /// this boundary tends to be the FSI boundary of the fluid mesh. Also
58  /// specify the uniform thickness of layer, and the number of element layers.
59  /// The vectors stored in in_out_boundary_ids contain the boundary
60  /// IDs of the other boundaries in the tet mesh. In an FSI context
61  /// these typically identify the in/outflow boundaries in the fluid
62  /// mesh. The boundary enumeration of the current mesh follows the
63  /// one of the underlying fluid mesh: The enumeration of the FSI boundary
64  /// matches (to enable the setup of the FSI matching); the "in/outflow"
65  /// faces in this mesh inherit the same enumeration as the in/outflow
66  /// faces in the underlying fluid mesh. Finally, the "outer" boundary
67  /// gets its own boundary ID.
68  /// Timestepper defaults to steady pseudo-timestepper.
69  ThinLayerBrickOnTetMesh(Mesh* tet_mesh_pt,
70  const Vector<unsigned>& boundary_ids,
71  ThicknessFctPt thickness_fct_pt,
72  const unsigned& nlayer,
74  TimeStepper* time_stepper_pt=
76 
77 
78  /// \short Access functions to the Vector of oomph-lib boundary ids
79  /// that make up boundary on which the mesh was erected (typically
80  /// the FSI interface in an FSI problem)
82  {
83  return FSI_boundary_id;
84  }
85 
86  /// \short Boundary ID of the "outer" surface -- in an FSI context
87  /// this is the non-wetted tube surface at a distance h_thick from
88  /// the FSI surface
89  unsigned outer_boundary_id()
90  {
91  return Outer_boundary_id;
92  }
93 
94  /// \short Access function to the vector containing the ids of the oomph-lib
95  /// mesh boundaries that make up the specified in/outflow boundaries
96  /// as specified in constructor.
97  Vector<unsigned> in_out_boundary_id(const unsigned& boundary_id)
98  {
99  return In_out_boundary_id[boundary_id];
100  }
101 
102 
103  private:
104 
105  /// \short Vector of oomph-lib boundary ids
106  /// that make up boundary on which the mesh was erected (typically
107  /// the FSI interface in an FSI problem)
109 
110  /// \short Boundary ID of the "outer" surface -- the non-wetted
111  /// tube surface at a distance h_thick from the FSI surface
113 
114  /// \short Vector of vectors containing the ids of the oomph-lib
115  /// mesh boundaries that make up the specified in/outflow boundaries
117 
118  /// \short Function pointer to function that specifies the wall thickness
119  /// as a fct of the coordinates of the inner surface
121 
122  };
123 
124 
125 
126 ///////////////////////////////////////////////////////////////////////
127 ///////////////////////////////////////////////////////////////////////
128 ///////////////////////////////////////////////////////////////////////
129 
130 
131 
132 //========================================================================
133 /// Refineable brick mesh layer built on top of a given tet mesh. Typically
134 /// used in FSI problems where the tet mesh is the fluid mesh and this
135 /// mesh acts as the solid mesh that surrounds the FSI interface.
136 //========================================================================
137  template<class ELEMENT>
139  public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
140  public virtual RefineableBrickMesh<ELEMENT>
141  {
142 
143  public:
144 
145  /// \short Function pointer to function that specifies the wall thickness
146  /// as a fct of the coordinates of the inner surface
147  typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
148 
149  /// \short Constructor: Specify (quadratic) tet mesh, boundary IDs of
150  /// boundary on which the current mesh is to be erected (in an FSI context
151  /// this boundary tends to be the FSI boundary of the fluid mesh. Also
152  /// specify the uniform thickness of layer, and the number of element layers.
153  /// The vectors stored in in_out_boundary_ids contain the boundary
154  /// IDs of the other boundaries in the tet mesh. In an FSI context
155  /// these typically identify the in/outflow boundaries in the fluid
156  /// mesh. The boundary enumeration of the current mesh follows the
157  /// one of the underlying fluid mesh: The enumeration of the FSI boundary
158  /// matches (to enable the setup of the FSI matching); the "in/outflow"
159  /// faces in this mesh inherit the same enumeration as the in/outflow
160  /// faces in the underlying fluid mesh. Finally, the "outer" boundary
161  /// gets its own boundary ID.
162  /// Timestepper defaults to steady pseudo-timestepper.
164  Mesh* tet_mesh_pt,
165  const Vector<unsigned>& boundary_ids,
166  ThicknessFctPt thickness_fct_pt,
167  const unsigned& nlayer,
168  const Vector<Vector<unsigned> >&
170  TimeStepper* time_stepper_pt=
172  ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
173  boundary_ids,
174  thickness_fct_pt,
175  nlayer,
177  time_stepper_pt)
178  {
179  // Nodal positions etc. were created in constructor for
180  // nonrefineable mesh. Only need to setup quadtree forest
181  this->setup_octree_forest();
182  }
183 
184  };
185 
186 
187 
188 ///////////////////////////////////////////////////////////////////////
189 ///////////////////////////////////////////////////////////////////////
190 ///////////////////////////////////////////////////////////////////////
191 
192 
193 
194 //========================================================================
195 /// Solid brick mesh layer built on top of a given tet mesh. Typically
196 /// used in FSI problems where the tet mesh is the fluid mesh and this
197 /// mesh acts as the solid mesh that surrounds the FSI interface.
198 //========================================================================
199  template<class ELEMENT>
201  public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
202  public virtual SolidMesh
203  {
204 
205  public:
206 
207  /// \short Function pointer to function that specifies the wall thickness
208  /// as a fct of the coordinates of the inner surface
209  typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
210 
211  /// \short Constructor: Specify (quadratic) tet mesh, boundary IDs of
212  /// boundary on which the current mesh is to be erected (in an FSI context
213  /// this boundary tends to be the FSI boundary of the fluid mesh. Also
214  /// specify the uniform thickness of layer, and the number of element layers.
215  /// The vectors stored in in_out_boundary_ids contain the boundary
216  /// IDs of the other boundaries in the tet mesh. In an FSI context
217  /// these typically identify the in/outflow boundaries in the fluid
218  /// mesh. The boundary enumeration of the current mesh follows the
219  /// one of the underlying fluid mesh: The enumeration of the FSI boundary
220  /// matches (to enable the setup of the FSI matching); the "in/outflow"
221  /// faces in this mesh inherit the same enumeration as the in/outflow
222  /// faces in the underlying fluid mesh. Finally, the "outer" boundary
223  /// gets its own boundary ID.
224  /// Timestepper defaults to steady pseudo-timestepper.
226  const Vector<unsigned>& boundary_ids,
227  ThicknessFctPt thickness_fct_pt,
228  const unsigned& nlayer,
229  const Vector<Vector<unsigned> >&
231  TimeStepper* time_stepper_pt=
233  ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
234  boundary_ids,
235  thickness_fct_pt,
236  nlayer,
238  time_stepper_pt)
239  {
240  // Make the current configuration the undeformed one by
241  // setting the nodal Lagrangian coordinates to their current
242  // Eulerian ones
244  }
245 
246  };
247 
248 
249 
250 
251 ///////////////////////////////////////////////////////////////////////
252 ///////////////////////////////////////////////////////////////////////
253 ///////////////////////////////////////////////////////////////////////
254 
255 
256 
257 //========================================================================
258 /// Refineable solid brick mesh layer built on top of a given tet mesh.
259 /// Typically used in FSI problems where the tet mesh is the fluid mesh and this
260 /// mesh acts as the solid mesh that surrounds the FSI interface.
261 //========================================================================
262  template<class ELEMENT>
264  public virtual ThinLayerBrickOnTetMesh<ELEMENT>,
265  public virtual RefineableBrickMesh<ELEMENT>,
266  public virtual SolidMesh
267  {
268 
269  public:
270 
271  /// \short Function pointer to function that specifies the wall thickness
272  /// as a fct of the coordinates of the inner surface
273  typedef void (*ThicknessFctPt)(const Vector<double>& x, double& h_thick);
274 
275  /// \short Constructor: Specify (quadratic) tet mesh, boundary IDs of
276  /// boundary on which the current mesh is to be erected (in an FSI context
277  /// this boundary tends to be the FSI boundary of the fluid mesh. Also
278  /// specify the uniform thickness of layer, and the number of element layers.
279  /// The vectors stored in in_out_boundary_ids contain the boundary
280  /// IDs of the other boundaries in the tet mesh. In an FSI context
281  /// these typically identify the in/outflow boundaries in the fluid
282  /// mesh. The boundary enumeration of the current mesh follows the
283  /// one of the underlying fluid mesh: The enumeration of the FSI boundary
284  /// matches (to enable the setup of the FSI matching); the "in/outflow"
285  /// faces in this mesh inherit the same enumeration as the in/outflow
286  /// faces in the underlying fluid mesh. Finally, the "outer" boundary
287  /// gets its own boundary ID.
288  /// Timestepper defaults to steady pseudo-timestepper.
290  const Vector<unsigned>& boundary_ids,
291  ThicknessFctPt thickness_fct_pt,
292  const unsigned& nlayer,
293  const Vector<Vector<unsigned> >&
295  TimeStepper* time_stepper_pt=
297  ThinLayerBrickOnTetMesh<ELEMENT>(tet_mesh_pt,
298  boundary_ids,
299  thickness_fct_pt,
300  nlayer,
302  time_stepper_pt)
303  {
304  // Make the current configuration the undeformed one by
305  // setting the nodal Lagrangian coordinates to their current
306  // Eulerian ones
308 
309  // Nodal positions etc. were created in constructor for
310  // nonrefineable mesh. Only need to setup quadtree forest
311  this->setup_octree_forest();
312  }
313 
314  };
315 
316 
317 
318 
319 }
320 
321 #endif
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
Definition: mesh.h:85
Base class for brick meshes (meshes made of 3D brick elements).
Definition: brick_mesh.h:197
unsigned outer_boundary_id()
Boundary ID of the "outer" surface – in an FSI context this is the non-wetted tube surface at a dista...
unsigned Outer_boundary_id
Boundary ID of the "outer" surface – the non-wetted tube surface at a distance h_thick from the FSI s...
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...
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...
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...
ThicknessFctPt Thickness_fct_pt
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...
General SolidMesh class.
Definition: mesh.h:2252
Vector< unsigned > fsi_boundary_id()
Access functions to the Vector of oomph-lib boundary ids that make up boundary on which the mesh was ...
void setup_octree_forest()
Do what it says...
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...
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...
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...
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition: timesteppers.h:219
void set_lagrangian_nodal_coordinates()
Make the current configuration the undeformed one by setting the nodal Lagrangian coordinates to thei...
Definition: mesh.cc:9196
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...
A general mesh class.
Definition: mesh.h:74