Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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,
78  Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray);
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,
87  Array<OneD, NekDouble> &out_d2 = NullNekDouble1DArray);
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,
110  Array<OneD, NekDouble> &wsp,
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);
127  const Array<OneD, const NekDouble>& inarray,
128  Array<OneD, NekDouble> &outarray);
130  const Array<OneD, const NekDouble>& base0,
131  const Array<OneD, const NekDouble>& base1,
132  const Array<OneD, const NekDouble>& inarray,
133  Array<OneD, NekDouble> &outarray,
134  Array<OneD, NekDouble> &wsp,
135  bool doCheckCollDir0,
136  bool doCheckCollDir1);
138  const int dir,
139  const Array<OneD, const NekDouble>& inarray,
140  Array<OneD, NekDouble> & outarray);
142  const int dir,
143  const Array<OneD, const NekDouble>& inarray,
144  Array<OneD, NekDouble> & outarray);
146  const int dir,
147  const Array<OneD, const NekDouble>& inarray,
148  Array<OneD, NekDouble> & outarray);
149 
150  //---------------------------------------
151  // Evaluation functions
152  //---------------------------------------
154  const Array<OneD, const NekDouble>& xi,
155  Array<OneD, NekDouble>& eta);
156 
157  STD_REGIONS_EXPORT virtual void v_FillMode(
158  const int mode,
159  Array<OneD, NekDouble> &array);
160 
161  //---------------------------
162  // Helper functions
163  //---------------------------
164  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
165  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
166  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
167  STD_REGIONS_EXPORT virtual int v_GetEdgeNumPoints(const int i) const;
168  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
169  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
171  const int i) const;
172  STD_REGIONS_EXPORT virtual int v_DetCartesianDirOfEdge(const int edge);
174  const std::vector<unsigned int> &nummodes,
175  int &modes_offset);
177  v_DetEdgeBasisKey(const int i) const;
180  STD_REGIONS_EXPORT virtual void v_GetCoords(
181  Array<OneD, NekDouble> &coords_0,
182  Array<OneD, NekDouble> &coords_1,
183  Array<OneD, NekDouble> &coords_2);
184 
185  //--------------------------
186  // Mappings
187  //--------------------------
189  Array<OneD, unsigned int>& outarray);
191  Array<OneD, unsigned int>& outarray);
192  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
193  bool useCoeffPacking = false);
195  const int eid,
196  const Orientation edgeOrient,
197  Array<OneD, unsigned int> &maparray,
198  Array<OneD, int> &signarray);
200  const int eid,
201  const Orientation edgeOrient,
202  Array<OneD, unsigned int> &maparray,
203  Array<OneD, int> &signarray);
204 
205  //---------------------------------------
206  // Wrapper functions
207  //---------------------------------------
209  const StdMatrixKey &mkey);
211  const StdMatrixKey &mkey);
212 
213  //---------------------------------------
214  // Operator evaluation functions
215  //---------------------------------------
216  STD_REGIONS_EXPORT virtual void v_MassMatrixOp(
217  const Array<OneD, const NekDouble> &inarray,
218  Array<OneD,NekDouble> &outarray,
219  const StdMatrixKey &mkey);
221  const Array<OneD, const NekDouble> &inarray,
222  Array<OneD,NekDouble> &outarray,
223  const StdMatrixKey &mkey);
225  const int k1, const int k2,
226  const Array<OneD, const NekDouble> &inarray,
227  Array<OneD,NekDouble> &outarray,
228  const StdMatrixKey &mkey);
230  const int i,
231  const Array<OneD, const NekDouble> &inarray,
232  Array<OneD,NekDouble> &outarray,
233  const StdMatrixKey &mkey);
235  const Array<OneD, const NekDouble> &inarray,
236  Array<OneD,NekDouble> &outarray,
237  const StdMatrixKey &mkey);
239  Array<OneD, NekDouble> &array,
240  const StdMatrixKey &mkey);
242  int numMin,
243  const Array<OneD, const NekDouble> &inarray,
244  Array<OneD, NekDouble> &outarray);
246  const NekDouble> &inarray,
247  Array<OneD,NekDouble> &outarray,
248  const StdMatrixKey &mkey);
250  const Array<OneD, const NekDouble> &inarray,
251  Array<OneD, NekDouble> &outarray);
252  };
253  typedef boost::shared_ptr<StdQuadExp> StdQuadExpSharedPtr;
254 
255  } //end of namespace
256 } //end of namespace
257 
258 #endif //STDQUADEXP_H