Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VelocityCorrectionScheme.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File VelocityCorrectionScheme.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: Velocity Correction Scheme header
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEME_H
37 #define NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEME_H
38 
40 
41 namespace Nektar
42 {
44  {
45  public:
46 
47  /// Creates an instance of this class
49  const LibUtilities::SessionReaderSharedPtr& pSession) {
52  AllocateSharedPtr(pSession);
53  p->InitObject();
54  return p;
55  }
56 
57  /// Name of class
58  static std::string className;
59 
60 
61  /// Constructor.
63 
64  virtual ~VelocityCorrectionScheme();
65 
66  virtual void v_InitObject();
67 
69  const Array<OneD, const Array<OneD, NekDouble> > &fields,
70  Array<OneD, Array<OneD, NekDouble> > &Forcing,
71  const NekDouble aii_Dt)
72  {
73  v_SetUpPressureForcing( fields, Forcing, aii_Dt);
74  }
75 
77  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
78  Array<OneD, Array<OneD, NekDouble> > &Forcing,
79  const NekDouble aii_Dt)
80  {
81  v_SetUpViscousForcing( inarray, Forcing, aii_Dt);
82  }
83 
84  void SolvePressure( const Array<OneD, NekDouble> &Forcing)
85  {
86  v_SolvePressure( Forcing);
87  }
88 
90  const Array<OneD, const Array<OneD, NekDouble> > &Forcing,
91  Array<OneD, Array<OneD, NekDouble> > &outarray,
92  const NekDouble aii_Dt)
93  {
94  v_SolveViscous( Forcing, outarray, aii_Dt);
95  }
96 
98  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
99  Array<OneD, Array<OneD, NekDouble> > &outarray,
100  const NekDouble time,
101  const NekDouble a_iixDt);
102 
104  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
105  Array<OneD, Array<OneD, NekDouble> > &outarray,
106  const NekDouble time)
107  {
108  v_EvaluateAdvection_SetPressureBCs( inarray, outarray, time);
109  }
110 
111  protected:
112  /// bool to identify if spectral vanishing viscosity is active.
114  /// bool to identify if spectral vanishing viscosity is active.
116  /// cutt off ratio from which to start decayhing modes
118  /// Diffusion coefficient of SVV modes
120 
121  /// Save aiiDt value to use as a trip to reset global matrix setup
123 
124  /// Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise
126 
127  // Virtual functions
129 
130  virtual void v_TransCoeffToPhys(void);
131 
132  virtual void v_TransPhysToCoeff(void);
133 
134  virtual void v_DoInitialise(void);
135 
137 
138  virtual int v_GetForceDimension();
139 
140  virtual void v_SetUpPressureForcing(
141  const Array<OneD, const Array<OneD, NekDouble> > &fields,
142  Array<OneD, Array<OneD, NekDouble> > &Forcing,
143  const NekDouble aii_Dt);
144 
145  virtual void v_SetUpViscousForcing(
146  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
147  Array<OneD, Array<OneD, NekDouble> > &Forcing,
148  const NekDouble aii_Dt);
149 
150  virtual void v_SolvePressure( const Array<OneD, NekDouble> &Forcing);
151 
152  virtual void v_SolveViscous(
153  const Array<OneD, const Array<OneD, NekDouble> > &Forcing,
154  Array<OneD, Array<OneD, NekDouble> > &outarray,
155  const NekDouble aii_Dt);
156 
158  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
159  Array<OneD, Array<OneD, NekDouble> > &outarray,
160  const NekDouble time);
161 
162  private:
163 
164  };
165 
166  typedef boost::shared_ptr<VelocityCorrectionScheme>
168 
169 } //end of namespace
170 
171 
172 #endif //VELOCITY_CORRECTION_SCHEME_H
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
virtual Array< OneD, bool > v_GetSystemSingularChecks()
virtual void v_DoInitialise(void)
Sets up initial conditions.
void EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void SolveUnsteadyStokesSystem(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble a_iixDt)
void SolvePressure(const Array< OneD, NekDouble > &Forcing)
VelocityCorrectionScheme(const LibUtilities::SessionReaderSharedPtr &pSession)
Constructor.
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
Print a summary of time stepping parameters.
bool m_useHomo1DSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
NekDouble m_sVVDiffCoeff
Diffusion coefficient of SVV modes.
boost::shared_ptr< VelocityCorrectionScheme > VelocityCorrectionSchemeSharedPtr
static std::string className
Name of class.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
void SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
void SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
virtual void v_SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
void SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
virtual void v_TransCoeffToPhys(void)
Virtual function for transformation to physical space.
double NekDouble
virtual void v_SolvePressure(const Array< OneD, NekDouble > &Forcing)
virtual void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt)
NekDouble m_sVVCutoffRatio
cutt off ratio from which to start decayhing modes
Array< OneD, NekDouble > m_saved_aii_Dt
Save aiiDt value to use as a trip to reset global matrix setup.
bool m_useSpecVanVisc
bool to identify if spectral vanishing viscosity is active.
virtual void v_TransPhysToCoeff(void)
Virtual function for transformation to coefficient space.
This class is the base class for Navier Stokes problems.
virtual void v_InitObject()
Init object for UnsteadySystem class.
virtual void v_SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt)
virtual void v_EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
StdRegions::VarCoeffMap m_varCoeffLap
Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise...