Nektar++
Expansion1D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Expansion1D.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: Header file for Expansion1D routines
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef EXPANSION1D_H
36 #define EXPANSION1D_H
37 
38 #include <LocalRegions/Expansion.h>
42 
43 namespace Nektar
44 {
45 namespace LocalRegions
46 {
47 class Expansion2D;
48 typedef std::shared_ptr<Expansion2D> Expansion2DSharedPtr;
49 typedef std::weak_ptr<Expansion2D> Expansion2DWeakPtr;
50 
51 class Expansion1D;
52 typedef std::shared_ptr<Expansion1D> Expansion1DSharedPtr;
53 typedef std::weak_ptr<Expansion1D> Expansion1DWeakPtr;
54 typedef std::vector<Expansion1DSharedPtr> Expansion1DVector;
55 
56 class Expansion1D : virtual public Expansion,
57  virtual public StdRegions::StdExpansion1D
58 {
59 public:
61  : Expansion(pGeom), StdExpansion1D()
62  {
63  }
64 
66  {
67  }
68 
70  const int dir, Array<OneD, const NekDouble> &inarray,
71  Array<OneD, NekDouble> &outarray);
72 
73  void AddHDGHelmholtzTraceTerms(const NekDouble tau,
74  const Array<OneD, const NekDouble> &inarray,
75  Array<OneD, NekDouble> &outarray);
76 
78 
79 protected:
81 
82  virtual void v_AddRobinMassMatrix(
83  const int vert, const Array<OneD, const NekDouble> &primCoeffs,
84  DNekMatSharedPtr &inoutmat);
85 
86  virtual void v_AddRobinEdgeContribution(
87  const int vert, const Array<OneD, const NekDouble> &primCoeffs,
88  const Array<OneD, NekDouble> &incoeffs, Array<OneD, NekDouble> &coeffs);
89 
90  virtual NekDouble v_VectorFlux(
91  const Array<OneD, Array<OneD, NekDouble>> &vec);
92 
93  virtual void v_NormalTraceDerivFactors(
95  Array<OneD, Array<OneD, NekDouble>> &d0factors,
96  Array<OneD, Array<OneD, NekDouble>> &d1factors);
97 
98  virtual const NormalVector &v_GetTraceNormal(const int edge) const final;
99 
100  virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient,
101  Array<OneD, int> &idmap, const int nq0,
102  const int nq1);
103 
104  virtual void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p);
105 
106 private:
107 };
108 
110 {
111  return std::dynamic_pointer_cast<SpatialDomains ::Geometry1D>(m_geom);
112 }
113 } // namespace LocalRegions
114 } // namespace Nektar
115 
116 #endif
#define LOCAL_REGIONS_EXPORT
virtual const NormalVector & v_GetTraceNormal(const int edge) const final
Definition: Expansion1D.cpp:46
virtual void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p)
virtual void v_AddRobinEdgeContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs)
virtual void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble >> &factors, Array< OneD, Array< OneD, NekDouble >> &d0factors, Array< OneD, Array< OneD, NekDouble >> &d1factors)
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
void AddNormTraceInt(const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: Expansion1D.cpp:54
Expansion1D(SpatialDomains::Geometry1DSharedPtr pGeom)
Definition: Expansion1D.h:60
SpatialDomains::Geometry1DSharedPtr GetGeom1D() const
Definition: Expansion1D.h:109
virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1)
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble >> &vec)
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:272
std::weak_ptr< Expansion2D > Expansion2DWeakPtr
Definition: Expansion1D.h:49
std::vector< Expansion1DSharedPtr > Expansion1DVector
Definition: Expansion1D.h:54
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:47
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
Definition: Expansion1D.h:51
std::weak_ptr< Expansion1D > Expansion1DWeakPtr
Definition: Expansion1D.h:53
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
Definition: Geometry.h:63
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble