Nektar++
DiffusionLDG.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: DiffusionLDG.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_SOLVERUTILS_DIFFUSIONWEAKDG
36 #define NEKTAR_SOLVERUTILS_DIFFUSIONWEAKDG
37 
38 #include <boost/core/ignore_unused.hpp>
39 
41 
42 namespace Nektar
43 {
44  namespace SolverUtils
45  {
46  class DiffusionLDG : public Diffusion
47  {
48  public:
49  static DiffusionSharedPtr create(std::string diffType)
50  {
51  boost::ignore_unused(diffType);
52  return DiffusionSharedPtr(new DiffusionLDG());
53  }
54 
55  static std::string type;
56 
57  protected:
58  DiffusionLDG();
59 
60  std::string m_shockCaptureType;
61 
62  /// Coefficient of penalty term
64 
67 
68  virtual void v_InitObject(
71 
72  virtual void v_Diffuse(
73  const std::size_t nConvective,
75  const Array<OneD, Array<OneD, NekDouble> > &inarray,
76  Array<OneD, Array<OneD, NekDouble> > &outarray,
79 
80  void NumFluxforScalar(
82  const Array<OneD, Array<OneD, NekDouble> > &ufield,
86 
87  void ApplyScalarBCs(
89  const std::size_t var,
90  const Array<OneD, const NekDouble> &ufield,
93  Array<OneD, NekDouble> &penaltyflux);
94 
95  void NumFluxforVector(
97  const Array<OneD, Array<OneD, NekDouble> > &ufield,
100 
101  void ApplyVectorBCs(
103  const std::size_t var,
104  const std::size_t dir,
105  const Array<OneD, const NekDouble> &qfield,
106  const Array<OneD, const NekDouble> &qFwd,
107  const Array<OneD, const NekDouble> &qBwd,
108  Array<OneD, NekDouble> &penaltyflux);
109  };
110  }
111 }
112 
113 #endif
std::shared_ptr< Diffusion > DiffusionSharedPtr
A shared pointer to an EquationSystem object.
Definition: Diffusion.h:183
void ApplyVectorBCs(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const std::size_t var, const std::size_t dir, const Array< OneD, const NekDouble > &qfield, const Array< OneD, const NekDouble > &qFwd, const Array< OneD, const NekDouble > &qBwd, Array< OneD, NekDouble > &penaltyflux)
void NumFluxforScalar(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &uflux, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayofArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayofArray)
virtual void v_Diffuse(const std::size_t nConvective, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayofArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayofArray)
static DiffusionSharedPtr create(std::string diffType)
Definition: DiffusionLDG.h:49
LibUtilities::SessionReaderSharedPtr m_session
Definition: DiffusionLDG.h:66
void NumFluxforVector(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 todo: add variable coeff and h dependence to p...
double NekDouble
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Definition: DiffusionLDG.h:65
NekDouble m_C11
Coefficient of penalty term.
Definition: DiffusionLDG.h:63
void ApplyScalarBCs(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const std::size_t var, const Array< OneD, const NekDouble > &ufield, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &penaltyflux)
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayofArray
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
std::shared_ptr< SessionReader > SessionReaderSharedPtr