Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EulerCFE.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File EulerCFE.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: Euler equations in conservative variables without artificial diffusion
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_EULERCFE_H
37 #define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_EULERCFE_H
38 
40 
41 namespace Nektar
42 {
44  {
45  eGeneral, ///< No problem defined - Default Inital data
46  eIsentropicVortex, ///< Isentropic Vortex
47  eRinglebFlow, ///< Ringleb Flow
48  SIZE_ProblemType ///< Length of enum list
49  };
50 
51  const char* const ProblemTypeMap[] =
52  {
53  "General",
54  "IsentropicVortex",
55  "RinglebFlow"
56  };
57 
59  {
60  public:
61  friend class MemoryManager<EulerCFE>;
62 
63  /// Creates an instance of this class.
66  {
68  p->InitObject();
69  return p;
70  }
71  /// Name of class.
72  static std::string className;
73 
74  virtual ~EulerCFE();
75 
76  ///< problem type selector
78 
79  protected:
80 
82 
83  virtual void v_InitObject();
84 
85  /// Print a summary of time stepping parameters.
87 
88  void DoOdeRhs(
89  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
90  Array<OneD, Array<OneD, NekDouble> > &outarray,
91  const NekDouble time);
92  void DoOdeProjection(
93  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
94  Array<OneD, Array<OneD, NekDouble> > &outarray,
95  const NekDouble time);
96  virtual void v_SetInitialConditions(
97  NekDouble initialtime = 0.0,
98  bool dumpInitialConditions = true,
99  const int domain = 0);
100 
101  virtual void v_EvaluateExactSolution(
102  unsigned int field,
103  Array<OneD, NekDouble> &outfield,
104  const NekDouble time = 0.0);
105 
106  private:
108  Array<OneD, Array<OneD, NekDouble> > &physarray,
109  NekDouble time);
110 
111  /// Isentropic Vortex Test Case.
113  const Array<OneD, NekDouble> &x,
114  const Array<OneD, NekDouble> &y,
115  const Array<OneD, NekDouble> &z,
116  Array<OneD, Array<OneD, NekDouble> > &u,
117  NekDouble time,
118  const int o = 0);
120  int field,
121  Array<OneD, NekDouble> &outarray,
122  NekDouble time);
124  NekDouble initialtime);
126  int bcRegion,
127  NekDouble time,
128  int cnt, Array<OneD, Array<OneD, NekDouble> > &physarray);
129 
130  /// Ringleb Flow Test Case.
131  void GetExactRinglebFlow(
132  int field,
133  Array<OneD, NekDouble> &outarray);
135  void);
137  int bcRegion,
138  NekDouble time,
139  int cnt,
140  Array<OneD, Array<OneD, NekDouble> > &physarray);
141  };
142 }
143 #endif