backward_step_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 // 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 generated by autoconfig
31 #ifdef HAVE_CONFIG_H
32 #include <oomph-lib-config.h>
33 #endif
34 
35 // OOMPH-LIB headers
37 #include "../generic/refineable_quad_mesh.h"
38 
39 namespace oomph
40 {
41  //=================================================================
43  //=================================================================
44  template<class ELEMENT>
45  class BackwardStepQuadMesh : public virtual RectangularQuadMesh<ELEMENT>
46  {
47  public:
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 
69  virtual ~BackwardStepQuadMesh() {}
70 
71  private:
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 
86 
87 
88  //=================================================================
90  //=================================================================
91  template<class ELEMENT>
93  : public virtual BackwardStepQuadMesh<ELEMENT>,
94  public RefineableQuadMesh<ELEMENT>
95  {
96  public:
104  const unsigned& nx,
105  const unsigned& ny,
106  const unsigned& nx_cut_out,
107  const unsigned& ny_cut_out,
108  const double& lx,
109  const double& ly,
110  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
111  : RectangularQuadMesh<ELEMENT>(nx, ny, lx, ly, time_stepper_pt),
112  BackwardStepQuadMesh<ELEMENT>(
113  nx, ny, nx_cut_out, ny_cut_out, lx, ly, time_stepper_pt)
114  {
115  // Nodal positions etc. were created in constructor for
116  // SimpleRectangularQuadMesh<...> --> We only need to set up
117  // adaptivity information: Associate finite elements with their
118  // QuadTrees and plant them in a QuadTreeForest:
119  this->setup_quadtree_forest();
120 
121  } // end of constructor
122 
125 
126  }; // end of mesh
127 
128 } // namespace oomph
129 #endif
Backward step mesh.
Definition: backward_step_mesh.template.h:46
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:44
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)
Definition: backward_step_mesh.template.h:54
virtual ~BackwardStepQuadMesh()
Destructor: Empty.
Definition: backward_step_mesh.template.h:69
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
Definition: rectangular_quadmesh.template.h:59
const unsigned & ny() const
Return number of elements in y direction.
Definition: rectangular_quadmesh.template.h:231
const unsigned & nx() const
Return number of elements in x direction.
Definition: rectangular_quadmesh.template.h:224
Refineable backward step mesh.
Definition: backward_step_mesh.template.h:95
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)
Definition: backward_step_mesh.template.h:103
virtual ~RefineableBackwardStepQuadMesh()
Destructor: Empty.
Definition: backward_step_mesh.template.h:124
Definition: refineable_quad_mesh.h:53
void setup_quadtree_forest()
Definition: refineable_quad_mesh.h:88
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