Nektar++
VelocityCorrectionSchemeImplicit.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File VelocityCorrectionSchemeImplicit.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// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Velocity Correction Scheme header
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEMEIMPLICIT_H
36#define NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEMEIMPLICIT_H
37
39
40namespace Nektar
41{
43{
44public:
45 /// Creates an instance of this class
49 {
52 p->InitObject();
53 return p;
54 }
55
56 /// Name of class
57 static std::string className;
58
59 /// Constructor.
62
63 ~VCSImplicit() override;
64
65protected:
66 /// 2D Array for Advection Velocities [dir][dof]
68 /// 3D Array for extrapolated Advection Velocities [dir][time-levle][dof]
70 /// bool to identify implicit scheme ie advection velocity
72 /// bool to identify advection operator
74 /// integer for advection velocity
76 std::string m_convectiveType;
77 /// Array checking whether GlobalLinSys needs to be unset
79
80 // Virtual functions
82
84 const Array<OneD, const Array<OneD, NekDouble>> &fields,
86 const NekDouble aii_Dt) override;
87
89 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
91 const NekDouble aii_Dt) override;
92
94
95 void v_SolveViscous(
97 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
99 const NekDouble aii_Dt) override;
100
101 void v_DoInitialise(bool dumpInitialConditions) override;
102
103 std::string v_GetExtrapolateStr(void) override
104 {
105 return "Implicit"; // Use ImplicitExtrapolate.cpp
106 }
107
109 const Array<OneD, const Array<OneD, NekDouble>> &inarray,
111 const NekDouble time) override;
112
113 static std::string solverTypeLookupId;
114
116 NekDouble aii_Dt);
117
118 // Function to check whether UnsetGlobalLinSys has to be called
119 // at i-th call of LinearAdvectionDiffusionReactionSolve in SolveViscous
120 void CheckUnsetGlobalLinSys(Array<OneD, NekInt> &unsetGlobalLinSys);
121
122private:
123};
124
125typedef std::shared_ptr<VCSImplicit> VCSImplicitSharedPtr;
126
127} // namespace Nektar
128
129#endif // NEKTAR_SOLVERS_VELOCITYCORRECTIONSCHEMEIMPLICIT_H
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Defines a forcing term to be explicitly applied.
Definition: Forcing.h:71
Array< OneD, NekInt > m_unsetGlobalLinSys
Array checking whether GlobalLinSys needs to be unset.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_extVel
3D Array for extrapolated Advection Velocities [dir][time-levle][dof]
void v_SolveViscous(const Array< OneD, const Array< OneD, NekDouble > > &Forcing, const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble aii_Dt) override
void v_EvaluateAdvection_SetPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time) override
void v_SetUpPressureForcing(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
void v_GenerateSummary(SolverUtils::SummaryList &s) override
Print a summary of time stepping parameters.
Array< OneD, Array< OneD, NekDouble > > m_AdvVel
std::string v_GetExtrapolateStr(void) override
void v_DoInitialise(bool dumpInitialConditions) override
Sets up initial conditions.
Array< OneD, Array< OneD, NekDouble > > m_advection
2D Array for Advection Velocities [dir][dof]
bool m_advectionVelocity
bool to identify implicit scheme ie advection velocity
void AddImplicitSkewSymAdvection(StdRegions::VarCoeffMap varcoeffs, NekDouble aii_Dt)
bool m_implicitSkewSymAdvection
bool to identify advection operator
VCSImplicit(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Constructor.
int m_intOrder
integer for advection velocity
static std::string className
Name of class.
void v_SetUpViscousForcing(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &Forcing, const NekDouble aii_Dt) override
void CheckUnsetGlobalLinSys(Array< OneD, NekInt > &unsetGlobalLinSys)
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
void v_SolvePressure(const Array< OneD, NekDouble > &Forcing) override
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:46
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
Definition: StdRegions.hpp:375
std::shared_ptr< VCSImplicit > VCSImplicitSharedPtr
double NekDouble