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, ExpansionSharedPtr> &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, ExpansionSharedPtr> &FaceExp,
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,
104  Array<OneD, ExpansionSharedPtr> &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,
111  const ExpansionSharedPtr &FaceExp,
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  virtual StdRegions::Orientation v_GetForient(int face);
119 
120 
121  //-----------------------------
122  // Low Energy Basis functions
123  //-----------------------------
124 
125  LOCAL_REGIONS_EXPORT virtual Array<OneD, unsigned int>
127 
128  LOCAL_REGIONS_EXPORT virtual Array<OneD, unsigned int>
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