backward_step_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// 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
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
39namespace oomph
40{
41 //=================================================================
42 /// Backward step mesh
43 //=================================================================
44 template<class ELEMENT>
45 class BackwardStepQuadMesh : public virtual RectangularQuadMesh<ELEMENT>
46 {
47 public:
48 /// Pass overall number of elements in the horizontal
49 /// and vertical directions, nx and ny, and the corresponding
50 /// dimensions, lx and ly. nx_cut_out and ny_cut_out elements
51 /// are cut out from the lower right corner to create the
52 /// (reversed) backward step geometry. Timestepper defaults
53 /// to Steady.
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)
63 {
64 // Do the actual build
66 }
67
68 /// Destructor: Empty
70
71 private:
72 /// Actual build function
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
83 ////////////////////////////////////////////////////////////////////
84 ////////////////////////////////////////////////////////////////////
85 ////////////////////////////////////////////////////////////////////
86
87 //=================================================================
88 /// Refineable backward step mesh
89 //=================================================================
90 template<class ELEMENT>
92 : public virtual BackwardStepQuadMesh<ELEMENT>,
93 public RefineableQuadMesh<ELEMENT>
94 {
95 public:
96 /// Pass overall number of elements in the horizontal
97 /// and vertical directions, nx and ny, and the corresponding
98 /// dimensions, lx and ly. nx_cut_out and ny_cut_out elements
99 /// are cut out from the lower right corner to create the
100 /// (reversed) backward step geometry. Timestepper defaults
101 /// to Steady.
103 const unsigned& nx,
104 const unsigned& ny,
105 const unsigned& nx_cut_out,
106 const unsigned& ny_cut_out,
107 const double& lx,
108 const double& ly,
109 TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
113 {
114 // Nodal positions etc. were created in constructor for
115 // SimpleRectangularQuadMesh<...> --> We only need to set up
116 // adaptivity information: Associate finite elements with their
117 // QuadTrees and plant them in a QuadTreeForest:
118 this->setup_quadtree_forest();
119
120 } // end of constructor
121
122 /// Destructor: Empty
124
125 }; // end of mesh
126
127} // namespace oomph
129#endif
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.
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)
Pass overall number of elements in the horizontal and vertical directions, nx and ny,...
virtual ~BackwardStepQuadMesh()
Destructor: Empty.
Collapsible channel mesh with MacroElement-based node update. The collapsible segment is represented ...
RectangularQuadMesh is a two-dimensional mesh of Quad elements with Nx elements in the "x" (horizonal...
const unsigned & ny() const
Return number of elements in y direction.
const unsigned & nx() const
Return number of elements in x direction.
Refineable backward step mesh.
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)
Pass overall number of elements in the horizontal and vertical directions, nx and ny,...
virtual ~RefineableBackwardStepQuadMesh()
Destructor: Empty.