Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  LOCAL_REGIONS_EXPORT void ReOrientFacePhysMap(const int nvert,
101  const StdRegions::Orientation orient,
102  const int nq0,
103  const int nq1,
104  Array<OneD, int> &idmap);
106  const Array<OneD, const Array<OneD, NekDouble> > &Fvec,
107  Array<OneD, NekDouble> &outarray);
108 
109  protected:
110  virtual void v_DGDeriv(
111  const int dir,
112  const Array<OneD, const NekDouble> &incoeffs,
114  Array<OneD, Array<OneD, NekDouble> > &faceCoeffs,
115  Array<OneD, NekDouble> &out_d);
117  const StdRegions::StdMatrixKey &mkey);
118  virtual void v_AddFaceNormBoundaryInt(
119  const int face,
120  const ExpansionSharedPtr &FaceExp,
122  Array<OneD, NekDouble> &outarray);
123  virtual void v_AddRobinMassMatrix(
124  const int face,
125  const Array<OneD, const NekDouble> &primCoeffs,
126  DNekMatSharedPtr &inoutmat);
127  virtual StdRegions::Orientation v_GetForient(int face);
128 
129  virtual void v_GetTracePhysVals(
130  const int face,
131  const StdRegions::StdExpansionSharedPtr &FaceExp,
132  const Array<OneD, const NekDouble> &inarray,
133  Array<OneD, NekDouble> &outarray,
134  StdRegions::Orientation orient);
135 
136  virtual void v_GetFacePhysVals(
137  const int face,
138  const StdRegions::StdExpansionSharedPtr &FaceExp,
139  const Array<OneD, const NekDouble> &inarray,
140  Array<OneD, NekDouble> &outarray,
141  StdRegions::Orientation orient);
142 
143  //-----------------------------
144  // Low Energy Basis functions
145  //-----------------------------
146 
149 
152 
154  const DNekScalMatSharedPtr &r_bnd,
155  const StdRegions::MatrixType matrixType);
156 
158  const DNekScalMatSharedPtr & m_transformationmatrix);
159 
161  const DNekScalMatSharedPtr &r_bnd);
162 
164  const int nq0,
165  const int nq1,
166  Array<OneD, int> &idmap);
167 
169  const int nq0,
170  const int nq1,
171  Array<OneD, int> &idmap);
172  private:
173  // Do not add members here since it may lead to conflicts.
174  // Only use this class for member functions
175 
176  std::vector<Expansion2DWeakPtr> m_faceExp;
177  std::vector<bool> m_requireNeg;
178  };
179 
181  {
182  return boost::dynamic_pointer_cast<SpatialDomains::Geometry3D>(m_geom);
183  }
184  } //end of namespace
185 } //end of namespace
186 
187 #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.
void ReOrientQuadFacePhysMap(const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
SpatialDomains::Geometry3DSharedPtr GetGeom3D() const
Definition: Expansion3D.h:180
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)
void ReOrientFacePhysMap(const int nvert, const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::vector< bool > m_requireNeg
Definition: Expansion3D.h:177
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)
void ReOrientTriFacePhysMap(const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
boost::shared_ptr< Expansion3D > Expansion3DSharedPtr
Definition: Expansion2D.h:48
virtual void v_GetTracePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
Returns the physical values at the quadrature points of a face Wrapper function to v_GetFacePhysVals...
virtual void v_GetFacePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
double NekDouble
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
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:51
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::vector< Expansion2DWeakPtr > m_faceExp
Definition: Expansion3D.h:176
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::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
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void v_NormVectorIProductWRTBase(const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray)
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap(int eid)
boost::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:49
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:227
boost::shared_ptr< Geometry3D > Geometry3DSharedPtr
Definition: Geometry3D.h:52