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  const Array<OneD, Array<OneD, NekDouble> > &uplus,
97  Array<OneD, Array<OneD, NekDouble> > &penaltyfluxO1);
98 
99  virtual void v_NumericalFluxO2(
101  const Array<OneD, Array<OneD, NekDouble> > &ufield,
103  Array<OneD, Array<OneD, NekDouble> > &qflux);
104 
105  virtual void v_WeakPenaltyO2(
107  const int var,
108  const int dir,
109  const Array<OneD, const NekDouble> &qfield,
110  const Array<OneD, const NekDouble> &qtemp,
111  Array<OneD, NekDouble> &penaltyflux);
112 
113  virtual void v_SetHomoDerivs(
115  {
116  m_homoDerivs = deriv;
117  }
118 
120  {
121  return m_viscTensor;
122  }
123  };
124 
125  typedef boost::shared_ptr<DiffusionLDGNS> DiffusionLDGNSSharedPtr;
126  }
127 }
128 
129 #endif
130 
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, const Array< OneD, const NekDouble > &qtemp, 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
virtual void v_WeakPenaltyO1(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, const Array< OneD, Array< OneD, NekDouble > > &uplus, Array< OneD, Array< OneD, NekDouble > > &penaltyfluxO1)
Imposes appropriate bcs for the 1st order derivatives.
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_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()