Nektar++
Expansion3D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Expansion3D.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: Header file for Expansion3D routines
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef EXPANSION3D_H
37 #define EXPANSION3D_H
38 
39 #include <LocalRegions/Expansion.h>
43 
44 namespace Nektar
45 {
46  namespace LocalRegions
47  {
48 
49  class Expansion2D;
50  typedef boost::shared_ptr<Expansion2D> Expansion2DSharedPtr;
51  typedef boost::weak_ptr<Expansion2D> Expansion2DWeakPtr;
52 
53  class Expansion3D;
54  typedef boost::shared_ptr<Expansion3D> Expansion3DSharedPtr;
55  typedef boost::weak_ptr<Expansion3D> Expansion3DWeakPtr;
56  typedef std::vector< Expansion3DSharedPtr > Expansion3DVector;
58 
59  class Expansion3D: virtual public Expansion,
60  virtual public StdRegions::StdExpansion3D
61  {
62  public:
65 
66  LOCAL_REGIONS_EXPORT void SetFaceExp(const int face, Expansion2DSharedPtr &f);
67  LOCAL_REGIONS_EXPORT Expansion2DSharedPtr GetFaceExp(const int face);
70 
71  inline void AddHDGHelmholtzFaceTerms(
72  const NekDouble tau,
73  const int edge,
74  Array<OneD, NekDouble> &facePhys,
75  const StdRegions::VarCoeffMap &dirForcing,
76  Array<OneD, NekDouble> &outarray);
77 
78  inline void AddNormTraceInt(
79  const int dir,
81  Array<OneD, Array<OneD, NekDouble> > &faceCoeffs,
82  Array<OneD,NekDouble> &outarray);
83 
84  inline void AddNormTraceInt(
85  const int dir,
88  Array<OneD,NekDouble> &outarray,
89  const StdRegions::VarCoeffMap &varcoeffs);
90 
91  inline void AddFaceBoundaryInt(
92  const int face,
93  ExpansionSharedPtr &FaceExp,
94  Array<OneD, NekDouble> &facePhys,
95  Array<OneD, NekDouble> &outarray,
97 
99 
100  protected:
101  virtual void v_DGDeriv(
102  const int dir,
103  const Array<OneD, const NekDouble> &incoeffs,
105  Array<OneD, Array<OneD, NekDouble> > &faceCoeffs,
106  Array<OneD, NekDouble> &out_d);
108  const StdRegions::StdMatrixKey &mkey);
109  virtual void v_AddFaceNormBoundaryInt(
110  const int face,
111  const ExpansionSharedPtr &FaceExp,
113  Array<OneD, NekDouble> &outarray);
114  virtual void v_AddRobinMassMatrix(
115  const int face,
116  const Array<OneD, const NekDouble> &primCoeffs,
117  DNekMatSharedPtr &inoutmat);
118  virtual StdRegions::Orientation v_GetForient(int face);
119 
120 
121  //-----------------------------
122  // Low Energy Basis functions
123  //-----------------------------
124 
127 
130 
132  const DNekScalMatSharedPtr &r_bnd,
133  const StdRegions::MatrixType matrixType);
134 
136  const DNekScalMatSharedPtr & m_transformationmatrix);
137 
139  const DNekScalMatSharedPtr &r_bnd);
140 
141  private:
142  // Do not add members here since it may lead to conflicts.
143  // Only use this class for member functions
144 
145  std::vector<Expansion2DWeakPtr> m_faceExp;
146  std::vector<bool> m_requireNeg;
147  };
148 
150  {
151  return boost::dynamic_pointer_cast<SpatialDomains::Geometry3D>(m_geom);
152  }
153  } //end of namespace
154 } //end of namespace
155 
156 #endif
void AddFaceBoundaryInt(const int face, ExpansionSharedPtr &FaceExp, Array< OneD, NekDouble > &facePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
virtual void v_DGDeriv(const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &out_d)
Evaluate coefficients of weak deriviative in the direction dir given the input coefficicents incoeffs...
std::vector< Expansion3DSharedPtr > Expansion3DVector
Definition: Expansion3D.h:56
std::vector< Expansion3DSharedPtr >::iterator Expansion3DVectorIter
Definition: Expansion3D.h:57
virtual StdRegions::Orientation v_GetForient(int face)
void SetFaceToGeomOrientation(const int face, Array< OneD, NekDouble > &inout)
Align face orientation with the geometry orientation.
SpatialDomains::Geometry3DSharedPtr GetGeom3D() const
Definition: Expansion3D.h:149
virtual DNekMatSharedPtr v_BuildTransformationMatrix(const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:125
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual DNekMatSharedPtr v_BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::vector< bool > m_requireNeg
Definition: Expansion3D.h:146
void SetTraceToGeomOrientation(Array< OneD, NekDouble > &inout)
Align trace orientation with the geometry orientation.
virtual Array< OneD, unsigned int > v_GetFaceInverseBoundaryMap(int fid, StdRegions::Orientation faceOrient=StdRegions::eNoOrientation)
void SetFaceExp(const int face, Expansion2DSharedPtr &f)
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:225
boost::shared_ptr< Expansion3D > Expansion3DSharedPtr
Definition: Expansion2D.h:48
double NekDouble
void AddNormTraceInt(const int dir, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &outarray)
void AddHDGHelmholtzFaceTerms(const NekDouble tau, const int edge, Array< OneD, NekDouble > &facePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
Definition: Expansion3D.cpp:48
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::vector< Expansion2DWeakPtr > m_faceExp
Definition: Expansion3D.h:145
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix(const DNekScalMatSharedPtr &m_transformationmatrix)
Build inverse and inverse transposed transformation matrix: and .
boost::weak_ptr< Expansion3D > Expansion3DWeakPtr
Definition: Expansion2D.h:50
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
3D geometry information
Definition: Geometry3D.h:70
virtual void v_AddFaceNormBoundaryInt(const int face, const ExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
boost::weak_ptr< Expansion2D > Expansion2DWeakPtr
Definition: Expansion1D.h:51
virtual void v_AddRobinMassMatrix(const int face, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
Expansion2DSharedPtr GetFaceExp(const int face)
#define LOCAL_REGIONS_EXPORT
Expansion3D(SpatialDomains::Geometry3DSharedPtr pGeom)
Definition: Expansion3D.h:63
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap(int eid)
boost::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:49
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:226
boost::shared_ptr< Geometry3D > Geometry3DSharedPtr
Definition: Geometry3D.h:52