Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UnsteadyViscousBurgers.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File UnsteadyViscousBurgers.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: Unsteady advection-diffusion solve routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_UNSTEADYADVECTIONDIFFUSION_H
37 #define NEKTAR_SOLVERS_ADRSOLVER_EQUATIONSYSTEMS_UNSTEADYADVECTIONDIFFUSION_H
38 
44 
45 using namespace Nektar::SolverUtils;
46 
47 namespace Nektar
48 {
50  {
51  public:
53 
54  /// Creates an instance of this class
56  const LibUtilities::SessionReaderSharedPtr& pSession) {
59  AllocateSharedPtr(pSession);
60  p->InitObject();
61  return p;
62  }
63  /// Name of class
64  static std::string className;
65 
66  /// Destructor
67  virtual ~UnsteadyViscousBurgers();
68 
69  protected:
70  bool m_useSpecVanVisc; // Use Spectral Vanishing Viscosity
71  bool m_useSpecVanViscVarDiff; // Use Spectral Vanishing Viscosity with Moura variable diffusion
72  NekDouble m_sVVCutoffRatio; // cut off ratio from which to start decayhing modes
73  NekDouble m_sVVDiffCoeff; // Diffusion coefficient of SVV modes
77 
78  /// Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise
80 
81  // Plane (used only for Discontinous projection with 3DHomogenoeus1D expansion)
83 
84  /// Forcing terms
85  std::vector<SolverUtils::ForcingSharedPtr> m_forcing;
86 
87  /// Session reader
89  const LibUtilities::SessionReaderSharedPtr& pSession);
90 
91  /// Evaluate the flux at each solution point for the advection part
92  void GetFluxVectorAdv(
93  const Array<OneD, Array<OneD, NekDouble> > &physfield,
95 
96  /// Evaluate the flux at each solution point for the diffusion part
97  void GetFluxVectorDiff(
98  const int i,
99  const int j,
100  const Array<OneD, Array<OneD, NekDouble> > &physfield,
101  Array<OneD, Array<OneD, NekDouble> > &derivatives,
103 
104  /// Compute the RHS
105  virtual void DoOdeRhs(
106  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
107  Array<OneD, Array<OneD, NekDouble> >&outarray,
108  const NekDouble time);
109 
110  /// Perform the projection
111  void DoOdeProjection(
112  const Array<OneD, const Array<OneD, NekDouble> > &inarray,
113  Array<OneD, Array<OneD, NekDouble> > &outarray,
114  const NekDouble time);
115 
116  /// Solve implicitly the diffusion term
117  virtual void DoImplicitSolve(
118  const Array<OneD, const Array<OneD, NekDouble> >&inarray,
119  Array<OneD, Array<OneD, NekDouble> >&outarray,
120  NekDouble time,
121  NekDouble lambda);
122 
123  /// Get the normal velocity
124  Array<OneD, NekDouble> &GetNormalVelocity(
125  Array<OneD, Array<OneD, NekDouble> >&inarray);
126 
127  /// Initialise the object
128  virtual void v_InitObject();
129 
130  /// Print Summary
131  virtual void v_GenerateSummary(SolverUtils::SummaryList& s);
132 
133  private:
136  };
137 }
138 
139 #endif
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::vector< std::pair< std::string, std::string > > SummaryList
Definition: Misc.h:47
Array< OneD, NekDouble > m_traceVn
StdRegions::VarCoeffMap m_varCoeffLap
Variable Coefficient map for the Laplacian which can be activated as part of SVV or otherwise...
boost::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
Creates an instance of this class.
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
boost::shared_ptr< Diffusion > DiffusionSharedPtr
A shared pointer to an EquationSystem object.
Definition: Diffusion.h:164
double NekDouble
SolverUtils::DiffusionSharedPtr m_diffusion
A base class for PDEs which include an advection component.
static std::string className
Name of class.
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
Forcing terms.