fsi_driven_cavity_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 
27 // Include guards
28 #ifndef OOMPH_FSI_DRIVEN_CAVITY_MESH_HEADER
29 #define OOMPH_FSI_DRIVEN_CAVITY_MESH_HEADER
30 
31 // Generic includes
32 #include "../generic/refineable_quad_mesh.h"
33 #include "../generic/macro_element.h"
34 #include "../generic/domain.h"
35 #include "../generic/quad_mesh.h"
36 
37 // Mesh is based on simple_rectangular_quadmesh
40 
41 // Include algebraic elements
42 #include "../generic/algebraic_elements.h"
43 
44 
45 namespace oomph
46 {
47  //========================================================================
63  //========================================================================
64  template<class ELEMENT>
66  {
67  public:
73  const unsigned& nx,
74  const unsigned& ny,
75  const double& lx,
76  const double& ly,
77  const double& gap_fraction,
78  GeomObject* wall_pt,
79  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
80 
81  protected:
83  unsigned Nx;
84 
86  unsigned Ny;
87 
90  double Gap_fraction;
91 
94  };
95 
96 
100 
101 
102  //===================================================================
118  //====================================================================
119  template<class ELEMENT>
121  : public virtual FSIDrivenCavityMesh<ELEMENT>,
122  public RefineableQuadMesh<ELEMENT>
123  {
124  public:
128  const unsigned& nx,
129  const unsigned& ny,
130  const double& lx,
131  const double& ly,
132  const double& gap_fraction,
133  GeomObject* wall_pt,
134  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
135  : FSIDrivenCavityMesh<ELEMENT>(
136  nx, ny, lx, ly, gap_fraction, wall_pt, time_stepper_pt)
137  {
138  // Build quadtree forest
139  this->setup_quadtree_forest();
140  }
141 
142 
145  };
146 
147 
148  //=================================================================
156  //=================================================================
157  template<class ELEMENT>
159  : public virtual FSIDrivenCavityMesh<ELEMENT>,
160  public AlgebraicMesh
161  {
162  public:
167  const unsigned& nx,
168  const unsigned& ny,
169  const double& lx,
170  const double& ly,
171  const double& gap_fraction,
172  GeomObject* wall_pt,
173  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
174  : FSIDrivenCavityMesh<ELEMENT>(
175  nx, ny, lx, ly, gap_fraction, wall_pt, time_stepper_pt)
176  {
177  // Add the geometric object to the list associated with this AlgebraicMesh
179 
180  // Setup algebraic node update operations
182  }
183 
186 
189  void algebraic_node_update(const unsigned& t, AlgebraicNode*& node_pt);
190 
195 
196  protected:
199  };
200 
201 
205 
206 
207  //=================================================================
215  //=================================================================
216  template<class ELEMENT>
218  : public RefineableQuadMesh<ELEMENT>,
219  public virtual AlgebraicFSIDrivenCavityMesh<ELEMENT>
220  {
221  public:
226  const unsigned& nx,
227  const unsigned& ny,
228  const double& lx,
229  const double& ly,
230  const double& gap_fraction,
231  GeomObject* wall_pt,
232  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
233  : FSIDrivenCavityMesh<ELEMENT>(
234  nx, ny, lx, ly, gap_fraction, wall_pt, time_stepper_pt),
236  nx, ny, lx, ly, gap_fraction, wall_pt, time_stepper_pt)
237  {
238  // Build quadtree forest
239  this->setup_quadtree_forest();
240  }
241 
245  };
246 
247 
248 } // namespace oomph
249 
250 #endif
Definition: fsi_driven_cavity_mesh.template.h:161
virtual ~AlgebraicFSIDrivenCavityMesh()
Destructor: empty.
Definition: fsi_driven_cavity_mesh.template.h:185
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Definition: fsi_driven_cavity_mesh.template.cc:201
void setup_algebraic_node_update()
Function to setup the algebraic node update.
Definition: fsi_driven_cavity_mesh.template.cc:283
void update_node_update(AlgebraicNode *&node_pt)
Definition: fsi_driven_cavity_mesh.template.h:194
AlgebraicFSIDrivenCavityMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const double &gap_fraction, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: fsi_driven_cavity_mesh.template.h:166
Definition: algebraic_elements.h:599
void add_geom_object_list_pt(GeomObject *geom_object_pt)
Definition: algebraic_elements.h:823
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Definition: algebraic_elements.h:620
Definition: algebraic_elements.h:55
Definition: fsi_driven_cavity_mesh.template.h:66
unsigned Nx
Number of elements in x direction.
Definition: fsi_driven_cavity_mesh.template.h:83
GeomObject * Wall_pt
Pointer to geometric object that represents the moving wall.
Definition: fsi_driven_cavity_mesh.template.h:93
double Gap_fraction
Definition: fsi_driven_cavity_mesh.template.h:90
FSIDrivenCavityMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const double &gap_fraction, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: fsi_driven_cavity_mesh.template.cc:41
unsigned Ny
Number of elements in y direction.
Definition: fsi_driven_cavity_mesh.template.h:86
Definition: geom_objects.h:101
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
Definition: fsi_driven_cavity_mesh.template.h:220
RefineableAlgebraicFSIDrivenCavityMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const double &gap_fraction, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: fsi_driven_cavity_mesh.template.h:225
void update_node_update(AlgebraicNode *&node_pt)
Definition: fsi_driven_cavity_mesh.template.cc:388
Definition: fsi_driven_cavity_mesh.template.h:123
~RefineableFSIDrivenCavityMesh()
Destructor(empty)
Definition: fsi_driven_cavity_mesh.template.h:144
RefineableFSIDrivenCavityMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, const double &gap_fraction, GeomObject *wall_pt, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: fsi_driven_cavity_mesh.template.h:127
Definition: refineable_quad_mesh.h:53
void setup_quadtree_forest()
Definition: refineable_quad_mesh.h:88
Definition: simple_rectangular_quadmesh.template.h:58
const unsigned & ny() const
Access function for number of elements in y directions.
Definition: simple_rectangular_quadmesh.template.h:77
const unsigned & nx() const
Access function for number of elements in x directions.
Definition: simple_rectangular_quadmesh.template.h:71
Definition: timesteppers.h:231
const double ly
Definition: ConstraintElementsUnitTest.cpp:34
const double lx
Definition: ConstraintElementsUnitTest.cpp:33
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
t
Definition: plotPSD.py:36