Nektar++
StdQuadExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdQuadExp.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 field for Quadrilateral routines built upon
33 // StdExpansion2D
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef NEKTAR_LIB_STDREGIONS_STDQUADEXP_H
38 #define NEKTAR_LIB_STDREGIONS_STDQUADEXP_H
39 
43 
44 namespace Nektar
45 {
46  namespace StdRegions
47  {
48 
49  class StdExpansion1D;
50 
51  class StdQuadExp: virtual public StdExpansion2D
52  {
53 
54  typedef boost::shared_ptr<StdExpansion1D> StdExpansion1DSharedPtr;
55 
56  public:
59  const LibUtilities::BasisKey &Ba,
60  const LibUtilities::BasisKey &Bb);
63 
64  protected:
65  //-------------------------------
66  // Integration Methods
67  //-------------------------------
69  const Array<OneD, const NekDouble>& inarray);
70 
71  //-------------------------------
72  // Differentiation Methods
73  //-------------------------------
74  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
75  const Array<OneD, const NekDouble>& inarray,
76  Array<OneD, NekDouble> &out_d0,
77  Array<OneD, NekDouble> &out_d1,
79  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
80  const int dir,
81  const Array<OneD, const NekDouble>& inarray,
82  Array<OneD, NekDouble> &outarray);
84  const Array<OneD, const NekDouble>& inarray,
85  Array<OneD, NekDouble> &out_d0,
86  Array<OneD, NekDouble> &out_d1,
89  const int dir,
90  const Array<OneD, const NekDouble>& inarray,
91  Array<OneD, NekDouble> &outarray);
92 
93  //---------------------------------------
94  // Transforms
95  //---------------------------------------
96  STD_REGIONS_EXPORT virtual void v_BwdTrans(
97  const Array<OneD, const NekDouble>& inarray,
98  Array<OneD, NekDouble> &outarray);
100  const Array<OneD, const NekDouble>& inarray,
101  Array<OneD, NekDouble> &outarray);
103  const Array<OneD, const NekDouble>& inarray,
104  Array<OneD, NekDouble> &outarray);
106  const Array<OneD, const NekDouble>& base0,
107  const Array<OneD, const NekDouble>& base1,
108  const Array<OneD, const NekDouble>& inarray,
109  Array<OneD, NekDouble> &outarray,
111  bool doCheckCollDir0,
112  bool doCheckCollDir1);
113  STD_REGIONS_EXPORT virtual void v_FwdTrans(
114  const Array<OneD, const NekDouble>& inarray,
115  Array<OneD, NekDouble> &outarray);
116 
117  //---------------------------------------
118  // Inner product functions
119  //---------------------------------------
121  const Array<OneD, const NekDouble>& inarray,
122  Array<OneD, NekDouble> &outarray);
124  const Array<OneD, const NekDouble>& inarray,
125  Array<OneD, NekDouble> &outarray,
126  bool multiplybyweights = true);
128  const Array<OneD, const NekDouble>& inarray,
129  Array<OneD, NekDouble> &outarray);
131  const Array<OneD, const NekDouble>& base0,
132  const Array<OneD, const NekDouble>& base1,
133  const Array<OneD, const NekDouble>& inarray,
134  Array<OneD, NekDouble> &outarray,
136  bool doCheckCollDir0,
137  bool doCheckCollDir1);
139  const int dir,
140  const Array<OneD, const NekDouble>& inarray,
141  Array<OneD, NekDouble> & outarray);
143  const int dir,
144  const Array<OneD, const NekDouble>& inarray,
145  Array<OneD, NekDouble> & outarray);
147  const int dir,
148  const Array<OneD, const NekDouble>& inarray,
149  Array<OneD, NekDouble> & outarray);
150 
151  //---------------------------------------
152  // Evaluation functions
153  //---------------------------------------
157 
158  STD_REGIONS_EXPORT virtual void v_FillMode(
159  const int mode,
160  Array<OneD, NekDouble> &array);
161 
162  //---------------------------
163  // Helper functions
164  //---------------------------
165  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
166  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
167  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
168  STD_REGIONS_EXPORT virtual int v_GetEdgeNumPoints(const int i) const;
169  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
170  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
172  const int i) const;
173  STD_REGIONS_EXPORT virtual int v_DetCartesianDirOfEdge(const int edge);
175  const std::vector<unsigned int> &nummodes,
176  int &modes_offset);
178  v_DetEdgeBasisKey(const int i) const;
181  STD_REGIONS_EXPORT virtual void v_GetCoords(
182  Array<OneD, NekDouble> &coords_0,
183  Array<OneD, NekDouble> &coords_1,
184  Array<OneD, NekDouble> &coords_2);
185 
186  //--------------------------
187  // Mappings
188  //--------------------------
190  Array<OneD, unsigned int>& outarray);
192  Array<OneD, unsigned int>& outarray);
193  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
194  bool useCoeffPacking = false);
196  const int eid,
197  const Orientation edgeOrient,
198  Array<OneD, unsigned int> &maparray,
199  Array<OneD, int> &signarray);
201  const int eid,
202  const Orientation edgeOrient,
203  Array<OneD, unsigned int> &maparray,
204  Array<OneD, int> &signarray);
205 
206  //---------------------------------------
207  // Wrapper functions
208  //---------------------------------------
210  const StdMatrixKey &mkey);
212  const StdMatrixKey &mkey);
213 
214  //---------------------------------------
215  // Operator evaluation functions
216  //---------------------------------------
217  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
218  const Array<OneD, const NekDouble> &inarray,
219  Array<OneD,NekDouble> &outarray,
220  const StdMatrixKey &mkey);
222  const Array<OneD, const NekDouble> &inarray,
223  Array<OneD,NekDouble> &outarray,
224  const StdMatrixKey &mkey);
226  const int k1, const int k2,
227  const Array<OneD, const NekDouble> &inarray,
228  Array<OneD,NekDouble> &outarray,
229  const StdMatrixKey &mkey);
231  const int i,
232  const Array<OneD, const NekDouble> &inarray,
233  Array<OneD,NekDouble> &outarray,
234  const StdMatrixKey &mkey);
236  const Array<OneD, const NekDouble> &inarray,
237  Array<OneD,NekDouble> &outarray,
238  const StdMatrixKey &mkey);
240  Array<OneD, NekDouble> &array,
241  const StdMatrixKey &mkey);
243  int numMin,
244  const Array<OneD, const NekDouble> &inarray,
245  Array<OneD, NekDouble> &outarray);
247  const NekDouble> &inarray,
248  Array<OneD,NekDouble> &outarray,
249  const StdMatrixKey &mkey);
251  const Array<OneD, const NekDouble> &inarray,
252  Array<OneD, NekDouble> &outarray);
253 
254  //---------------------------------------
255  // Output interpolation functions
256  //---------------------------------------
258  Array<OneD, int> &conn,
259  bool standard = true);
260  };
261  typedef boost::shared_ptr<StdQuadExp> StdQuadExpSharedPtr;
262 
263  } //end of namespace
264 } //end of namespace
265 
266 #endif //STDQUADEXP_H
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:441
static Array< OneD, NekDouble > NullNekDouble1DArray
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Calculate the derivative of the physical points.
Definition: StdQuadExp.cpp:95
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdQuadExp.cpp:741
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdQuadExp.cpp:846
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Definition: StdQuadExp.cpp:127
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:254
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
Definition: StdQuadExp.cpp:231
void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_NumDGBndryCoeffs() const
Definition: StdQuadExp.cpp:717
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdQuadExp.cpp:779
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
Definition: StdQuadExp.cpp:507
virtual const LibUtilities::BasisKey v_DetEdgeBasisKey(const int i) const
Definition: StdQuadExp.cpp:682
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:422
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:164
virtual int v_DetCartesianDirOfEdge(const int edge)
Definition: StdQuadExp.cpp:668
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:434
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdQuadExp.cpp:567
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
double NekDouble
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
Definition: StdQuadExp.cpp:758
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdQuadExp.cpp:626
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)
Definition: StdQuadExp.cpp:186
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:472
virtual int v_GetNedges() const
Definition: StdQuadExp.cpp:621
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdQuadExp.cpp:731
#define STD_REGIONS_EXPORT
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdQuadExp.cpp:654
virtual int v_NumBndryCoeffs() const
Definition: StdQuadExp.cpp:703
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray...
Definition: StdQuadExp.cpp:379
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdQuadExp.cpp:899
boost::shared_ptr< StdQuadExp > StdQuadExpSharedPtr
Definition: StdQuadExp.h:261
boost::shared_ptr< StdExpansion1D > StdExpansion1DSharedPtr
Definition: StdQuadExp.h:54
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdQuadExp.cpp:393
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
Definition: StdQuadExp.cpp:76
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdQuadExp.cpp:150
void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &array)
Fill outarray with mode mode of expansion.
Definition: StdQuadExp.cpp:580
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual int v_GetEdgeNumPoints(const int i) const
Definition: StdQuadExp.cpp:640
Describes the specification for a Basis.
Definition: Basis.h:50
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdQuadExp.cpp:697
virtual int v_GetNverts() const
Definition: StdQuadExp.cpp:616
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)