Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SubSteppingExtrapolate.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: SubSteppingExtrapolate.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Abstract base class for SubSteppingExtrapolate.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_SUBSTEPPINGEXTRAPOLATE_H
37 #define NEKTAR_SOLVERS_SUBSTEPPINGEXTRAPOLATE_H
38 
42 #include <MultiRegions/ExpList.h>
47 
48 namespace Nektar
49 {
50  //--------
51  // Substepping
52  // --------
53 
55 
56  typedef boost::shared_ptr<SubSteppingExtrapolate> SubSteppingExtrapolateSharedPtr;
57 
59  {
60  public:
61 
62  /// Creates an instance of this class
65  Array<OneD, MultiRegions::ExpListSharedPtr> &pFields,
67  const Array<OneD, int> &pVel,
68  const SolverUtils::AdvectionSharedPtr &advObject)
69  {
71  ::AllocateSharedPtr(pSession,pFields,pPressure,pVel,advObject);
72  return p;
73  }
74 
75  /// Name of class
76  static std::string className;
77 
80  Array<OneD, MultiRegions::ExpListSharedPtr> pFields,
82  const Array<OneD, int> pVel,
83  const SolverUtils::AdvectionSharedPtr advObject);
84 
85  virtual ~SubSteppingExtrapolate();
86 
87  protected:
88 
89  virtual void v_SubSteppingTimeIntegration(
90  int intMethod,
92  &IntegrationScheme);
93 
94  virtual void v_SubStepSaveFields(
95  int nstep);
96 
97  virtual void v_SubStepSetPressureBCs(
98  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
99  NekDouble Aii_Dt,
100  NekDouble kinvis);
101 
102  virtual void v_SubStepAdvance(
103  const LibUtilities::TimeIntegrationSolutionSharedPtr &integrationSoln,
104  int nstep,
105  NekDouble time);
106 
107  virtual void v_MountHOPBCs(
108  int HBCdata,
109  NekDouble kinvis,
110  Array<OneD, NekDouble> &Q,
111  Array<OneD, const NekDouble> &Advection);
112 
113  void AddDuDt(
114  const Array<OneD, const Array<OneD, NekDouble> > &N,
115  NekDouble Aii_Dt);
116  void AddDuDt2D(
117  const Array<OneD, const Array<OneD, NekDouble> > &N,
118  NekDouble Aii_Dt);
119  void AddDuDt3D(
120  const Array<OneD, const Array<OneD, NekDouble> > &N,
121  NekDouble Aii_Dt);
122 
123  void SubStepAdvection(
124  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
125  Array<OneD, Array<OneD,NekDouble> > &outarray,
126  const NekDouble time);
127 
128  void SubStepProjection(
129  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
130  Array<OneD, Array<OneD, NekDouble> > &outarray,
131  const NekDouble time);
132 
134  NekDouble toff,
135  Array< OneD, Array<OneD, NekDouble> > &ExtVel);
136 
138  const Array<OneD, const Array<OneD, NekDouble> > &velfield,
139  const Array<OneD, const Array<OneD, NekDouble> > &physfield,Array<OneD,
140  Array<OneD, NekDouble> > &outarray);
141 
143 
146 
147  Array<OneD, Array<OneD, NekDouble> > m_previousVelFields;
148 
152  };
153 }
154 
155 #endif
156