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);
68  LOCAL_REGIONS_EXPORT void SetTraceToGeomOrientation(Array<OneD, NekDouble> &inout);
69  LOCAL_REGIONS_EXPORT void SetFaceToGeomOrientation(const int face, Array<OneD, NekDouble> &inout);
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,
80  Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp,
81  Array<OneD, Array<OneD, NekDouble> > &faceCoeffs,
82  Array<OneD,NekDouble> &outarray);
83 
84  inline void AddNormTraceInt(
85  const int dir,
86  Array<OneD, const NekDouble> &inarray,
87  Array<OneD,StdRegions::StdExpansionSharedPtr> &FaceExp,
88  Array<OneD,NekDouble> &outarray,
89  const StdRegions::VarCoeffMap &varcoeffs);
90 
91  inline void AddFaceBoundaryInt(
92  const int face,
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,
104  Array<OneD, StdRegions::StdExpansionSharedPtr> &FaceExp,
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,
112  const Array<OneD, const NekDouble> &Fn,
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 
119  virtual NekDouble v_Integrate(
120  const Array<OneD, const NekDouble>& inarray);
121 
122  //-----------------------------
123  // Low Energy Basis functions
124  //-----------------------------
125 
126  LOCAL_REGIONS_EXPORT virtual Array<OneD, unsigned int>
128 
129  LOCAL_REGIONS_EXPORT virtual Array<OneD, unsigned int>
131 
133  const DNekScalMatSharedPtr &r_bnd,
134  const StdRegions::MatrixType matrixType);
135 
137  const DNekScalMatSharedPtr & m_transformationmatrix);
138 
140  const DNekScalMatSharedPtr &r_bnd);
141 
142  private:
143  // Do not add members here since it may lead to conflicts.
144  // Only use this class for member functions
145 
146  std::vector<Expansion2DWeakPtr> m_faceExp;
147  std::vector<bool> m_requireNeg;
148  };
149 
151  {
152  return boost::dynamic_pointer_cast<SpatialDomains::Geometry3D>(m_geom);
153  }
154  } //end of namespace
155 } //end of namespace
156 
157 #endif