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  Geometry1DSharedPtr pGeom)
62  : Expansion(pGeom),
64  {
65  }
66 
68 
70  const int dir,
72  Array<OneD,NekDouble> &outarray);
73 
74 
76  const NekDouble tau,
77  const Array<OneD, const NekDouble> &inarray,
78  Array<OneD, NekDouble> &outarray);
79 
81 
82  protected:
83  std::map<int, NormalVector> m_vertexNormals;
84 
86  const StdRegions::StdMatrixKey &mkey);
87 
88  virtual void v_AddRobinMassMatrix(
89  const int vert,
90  const Array<OneD, const NekDouble > &primCoeffs,
91  DNekMatSharedPtr &inoutmat);
92 
93  virtual void v_AddRobinEdgeContribution(
94  const int vert,
95  const Array<OneD, const NekDouble > &primCoeffs,
96  const Array<OneD, NekDouble> &incoeffs,
97  Array<OneD, NekDouble> &coeffs);
98 
99  virtual NekDouble v_VectorFlux(
100  const Array<OneD, Array<OneD, NekDouble> > &vec);
101 
102  virtual const NormalVector &v_GetTraceNormal(const int edge) const final;
103  virtual void v_ReOrientTracePhysMap(
104  const StdRegions::Orientation orient,
105  Array<OneD, int> &idmap,
106  const int nq0, const int nq1);
107 
108  private:
109 
110  };
111 
113  ::GetGeom1D() const
114  {
115  return std::dynamic_pointer_cast<SpatialDomains
116  ::Geometry1D>(m_geom);
117  }
118  } //end of namespace
119 } //end of namespace
120 
121 #endif
122 
#define LOCAL_REGIONS_EXPORT
virtual const NormalVector & v_GetTraceNormal(const int edge) const final
Definition: Expansion1D.cpp:46
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)
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:56
Expansion1D(SpatialDomains::Geometry1DSharedPtr pGeom)
Definition: Expansion1D.h:60
SpatialDomains::Geometry1DSharedPtr GetGeom1D() const
Definition: Expansion1D.h:113
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)
std::map< int, NormalVector > m_vertexNormals
Definition: Expansion1D.h:83
std::weak_ptr< Expansion2D > Expansion2DWeakPtr
Definition: Expansion1D.h:49
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::vector< Expansion1DSharedPtr > Expansion1DVector
Definition: Expansion1D.h:54
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:69
double NekDouble