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 
65  LOCAL_REGIONS_EXPORT virtual ~Expansion1D() override = default;
66 
68  const int dir, Array<OneD, const NekDouble> &inarray,
69  Array<OneD, NekDouble> &outarray);
70 
71  void AddHDGHelmholtzTraceTerms(const NekDouble tau,
72  const Array<OneD, const NekDouble> &inarray,
73  Array<OneD, NekDouble> &outarray);
74 
76 
77 protected:
79  const StdRegions::StdMatrixKey &mkey) override;
80 
81  virtual void v_AddRobinMassMatrix(
82  const int vert, const Array<OneD, const NekDouble> &primCoeffs,
83  DNekMatSharedPtr &inoutmat) override;
84 
85  virtual void v_AddRobinTraceContribution(
86  const int vert, const Array<OneD, const NekDouble> &primCoeffs,
87  const Array<OneD, NekDouble> &incoeffs,
88  Array<OneD, NekDouble> &coeffs) override;
89 
90  virtual NekDouble v_VectorFlux(
91  const Array<OneD, Array<OneD, NekDouble>> &vec) override;
92 
93  virtual void v_NormalTraceDerivFactors(
95  Array<OneD, Array<OneD, NekDouble>> &d0factors,
96  Array<OneD, Array<OneD, NekDouble>> &d1factors) override;
97 
98  virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient,
99  Array<OneD, int> &idmap, const int nq0,
100  const int nq1) override;
101 
102  virtual void v_TraceNormLen(const int traceid, NekDouble &h,
103  NekDouble &p) override;
104 
105 private:
106 };
107 
109 {
110  return std::dynamic_pointer_cast<SpatialDomains ::Geometry1D>(m_geom);
111 }
112 } // namespace LocalRegions
113 } // namespace Nektar
114 
115 #endif
#define LOCAL_REGIONS_EXPORT
virtual void v_AddRobinTraceContribution(const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
virtual void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1) override
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_AddRobinMassMatrix(const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
void AddNormTraceInt(const int dir, 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) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
Expansion1D(SpatialDomains::Geometry1DSharedPtr pGeom)
Definition: Expansion1D.h:60
SpatialDomains::Geometry1DSharedPtr GetGeom1D() const
Definition: Expansion1D.h:108
virtual void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble >> &vec) override
virtual ~Expansion1D() override=default
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition: Expansion1D.cpp:47
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:275
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:2
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble