Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 // 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: LDG diffusion class.
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_SOLVERUTILS_DIFFUSIONLDGNS
37 #define NEKTAR_SOLVERUTILS_DIFFUSIONLDGNS
38 
40 
41 namespace Nektar
42 {
43  namespace SolverUtils
44  {
45  class DiffusionLDGNS : public Diffusion
46  {
47  public:
48  static DiffusionSharedPtr create(std::string diffType)
49  {
50  return DiffusionSharedPtr(new DiffusionLDGNS());
51  }
52 
53  static std::string type;
54 
55  protected:
57 
64  std::string m_ViscosityType;
69 
71 
73 
75  int m_diffDim;
76 
77  virtual void v_InitObject(
80 
81  virtual void v_Diffuse(
82  const int nConvective,
84  const Array<OneD, Array<OneD, NekDouble> > &inarray,
85  Array<OneD, Array<OneD, NekDouble> > &outarray);
86 
87  virtual void v_NumericalFluxO1(
89  const Array<OneD, Array<OneD, NekDouble> > &inarray,
91  &numericalFluxO1);
92 
93  virtual void v_WeakPenaltyO1(
95  const Array<OneD, Array<OneD, NekDouble> > &inarray,
96  Array<OneD, Array<OneD, NekDouble> > &penaltyfluxO1);
97 
98  virtual void v_NumericalFluxO2(
100  const Array<OneD, Array<OneD, NekDouble> > &ufield,
102  Array<OneD, Array<OneD, NekDouble> > &qflux);
103 
104  virtual void v_WeakPenaltyO2(
106  const int var,
107  const int dir,
108  const Array<OneD, const NekDouble> &qfield,
109  Array<OneD, NekDouble> &penaltyflux);
110 
111  virtual void v_SetHomoDerivs(
113  {
114  m_homoDerivs = deriv;
115  }
116 
118  {
119  return m_viscTensor;
120  }
121  };
122 
123  typedef boost::shared_ptr<DiffusionLDGNS> DiffusionLDGNSSharedPtr;
124  }
125 }
126 
127 #endif
128 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array< OneD, Array< OneD, NekDouble > > m_homoDerivs
static DiffusionSharedPtr create(std::string diffType)
virtual void v_WeakPenaltyO2(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const int var, const int dir, const Array< OneD, const NekDouble > &qfield, Array< OneD, NekDouble > &penaltyflux)
Imposes appropriate bcs for the 2nd order derivatives.
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
virtual void v_SetHomoDerivs(Array< OneD, Array< OneD, NekDouble > > &deriv)
LibUtilities::SessionReaderSharedPtr m_session
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscTensor
Array< OneD, Array< OneD, NekDouble > > m_traceVel
boost::shared_ptr< Diffusion > DiffusionSharedPtr
A shared pointer to an EquationSystem object.
Definition: Diffusion.h:164
double NekDouble
virtual void v_NumericalFluxO2(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux)
Build the numerical flux for the 2nd order derivatives.
boost::shared_ptr< DiffusionLDGNS > DiffusionLDGNSSharedPtr
virtual void v_NumericalFluxO1(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &numericalFluxO1)
Builds the numerical flux for the 1st order derivatives.
virtual void v_WeakPenaltyO1(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &penaltyfluxO1)
Imposes appropriate bcs for the 1st order derivatives.
virtual void v_Diffuse(const int nConvective, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Calculate weak DG Diffusion in the LDG form for the Navier-Stokes (NS) equations: ...
virtual Array< OneD, Array< OneD, Array< OneD, NekDouble > > > & v_GetFluxTensor()