Nektar++
DiffusionLDGNS.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: DiffusionLDGNS.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: LDG diffusion class.
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_DIFFUSIONLDGNS
36 #define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_DIFFUSIONLDGNS
37 
38 #include <boost/core/ignore_unused.hpp>
39 
44 
45 
46 using namespace Nektar::SolverUtils;
47 
48 namespace Nektar
49 {
50  class DiffusionLDGNS : public Diffusion
51  {
52  public:
53  static DiffusionSharedPtr create(std::string diffType)
54  {
55  boost::ignore_unused(diffType);
56  return DiffusionSharedPtr(new DiffusionLDGNS());
57  }
58 
59  static std::string type;
60 
61  protected:
63 
64  /// Penalty coefficient for LDGNS
66 
67  /// h scaling for penalty term
69 
74  /// Equation of system for computing temperature
76 
78 
80 
81  std::size_t m_spaceDim;
82  std::size_t m_diffDim;
83 
84  virtual void v_InitObject(
87 
88  virtual void v_Diffuse(
89  const std::size_t nConvective,
91  const Array<OneD, Array<OneD, NekDouble> > &inarray,
92  Array<OneD, Array<OneD, NekDouble> > &outarray,
93  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
94  const Array<OneD, Array<OneD, NekDouble> > &pBwd);
95 
96  void NumericalFluxO1(
98  const Array<OneD, Array<OneD, NekDouble> > &inarray,
100  &numericalFluxO1,
101  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
102  const Array<OneD, Array<OneD, NekDouble> > &pBwd);
103 
104  void ApplyBCsO1(
106  const Array<OneD, Array<OneD, NekDouble> > &inarray,
107  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
108  const Array<OneD, Array<OneD, NekDouble> > &pBwd,
109  Array<OneD, Array<OneD, NekDouble> > &flux01);
110 
111  void NumericalFluxO2(
115  const Array<OneD, Array<OneD, NekDouble> > &pFwd,
116  const Array<OneD, Array<OneD, NekDouble> > &pBwd);
117 
118  void ApplyBCsO2(
120  const std::size_t var,
121  const std::size_t dir,
122  const Array<OneD, const NekDouble> &qfield,
123  const Array<OneD, const NekDouble> &qFwd,
124  const Array<OneD, const NekDouble> &qBwd,
125  Array<OneD, NekDouble> &penaltyflux);
126 
127  virtual void v_SetHomoDerivs(
129  {
130  m_homoDerivs = deriv;
131  }
132 
134  {
135  return m_viscTensor;
136  }
137  };
138 
139  typedef std::shared_ptr<DiffusionLDGNS> DiffusionLDGNSSharedPtr;
140 }
141 
142 #endif
143 
std::shared_ptr< Diffusion > DiffusionSharedPtr
A shared pointer to an EquationSystem object.
Definition: Diffusion.h:183
Array< OneD, Array< OneD, NekDouble > > m_traceVel
EquationOfStateSharedPtr m_eos
Equation of system for computing temperature.
virtual void v_SetHomoDerivs(Array< OneD, Array< OneD, NekDouble > > &deriv)
std::shared_ptr< DiffusionLDGNS > DiffusionLDGNSSharedPtr
static std::string type
NekDouble m_C11
Penalty coefficient for LDGNS.
Array< OneD, Array< OneD, NekDouble > > m_homoDerivs
double NekDouble
std::shared_ptr< EquationOfState > EquationOfStateSharedPtr
A shared pointer to an equation of state object.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array< OneD, NekDouble > m_traceOneOverH
h scaling for penalty term
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscTensor
LibUtilities::SessionReaderSharedPtr m_session
virtual Array< OneD, Array< OneD, Array< OneD, NekDouble > > > & v_GetFluxTensor()
static DiffusionSharedPtr create(std::string diffType)
std::shared_ptr< SessionReader > SessionReaderSharedPtr