Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StdTetExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File StdTetExp.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 tetrahedral routines built upon
33 // StdExpansion3D
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 
37 #ifndef NEKTAR_LIB_STDREGIONS_STDTETEXP_H
38 #define NEKTAR_LIB_STDREGIONS_STDTETEXP_H
39 
43 
44 namespace Nektar
45 {
46  namespace StdRegions
47  {
48  class StdMatrixKey;
49 
50 
51  class StdTetExp : virtual public StdExpansion3D
52  {
53 
54  public:
55 
58  const LibUtilities::BasisKey &Ba,
59  const LibUtilities::BasisKey &Bb,
60  const LibUtilities::BasisKey &Bc);
62  const LibUtilities::BasisKey &Ba,
63  const LibUtilities::BasisKey &Bb,
64  const LibUtilities::BasisKey &Bc,
65  NekDouble *coeffs,
66  NekDouble *phys);
67  STD_REGIONS_EXPORT StdTetExp(const StdTetExp &T);
69 
71  {
73  }
74 
75 
76  /** \brief Single Point Evaluation */
78 
79 
80  protected:
81  //----------------------------
82  // Differentiation Methods
83  //----------------------------
84  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
85  const Array<OneD, const NekDouble>& inarray,
86  Array<OneD, NekDouble>& out_dx,
87  Array<OneD, NekDouble>& out_dy,
88  Array<OneD, NekDouble>& out_dz);
89  STD_REGIONS_EXPORT virtual void v_PhysDeriv(
90  const int dir,
91  const Array<OneD, const NekDouble>& inarray,
92  Array<OneD, NekDouble>& outarray);
94  const Array<OneD, const NekDouble>& inarray,
95  Array<OneD, NekDouble>& out_d0,
96  Array<OneD, NekDouble>& out_d1,
97  Array<OneD, NekDouble>& out_d2);
99  const int dir,
100  const Array<OneD, const NekDouble>& inarray,
101  Array<OneD, NekDouble>& outarray);
102 
103  //---------------------------------------
104  // Transforms
105  //---------------------------------------
106  STD_REGIONS_EXPORT virtual void v_BwdTrans(
107  const Array<OneD, const NekDouble>& inarray,
108  Array<OneD, NekDouble>& outarray);
110  const Array<OneD, const NekDouble>& inarray,
111  Array<OneD, NekDouble>& outarray);
113  const Array<OneD, const NekDouble>& base0,
114  const Array<OneD, const NekDouble>& base1,
115  const Array<OneD, const NekDouble>& base2,
116  const Array<OneD, const NekDouble>& inarray,
117  Array<OneD, NekDouble>& outarray,
119  bool doCheckCollDir0,
120  bool doCheckCollDir1,
121  bool doCheckCollDir2);
122  STD_REGIONS_EXPORT virtual void v_FwdTrans(
123  const Array<OneD, const NekDouble>& inarray,
124  Array<OneD, NekDouble>& outarray );
125 
126  //---------------------------------------
127  // Inner product functions
128  //---------------------------------------
130  const Array<OneD, const NekDouble>& inarray,
131  Array<OneD, NekDouble>& outarray);
133  const Array<OneD, const NekDouble>& inarray,
134  Array<OneD, NekDouble>& outarray);
136  const Array<OneD, const NekDouble>& inarray,
137  Array<OneD, NekDouble>& outarray,
138  bool multiplybyweights = true);
140  const Array<OneD, const NekDouble>& base0,
141  const Array<OneD, const NekDouble>& base1,
142  const Array<OneD, const NekDouble>& base2,
143  const Array<OneD, const NekDouble>& inarray,
144  Array<OneD, NekDouble>& outarray,
146  bool doCheckCollDir0,
147  bool doCheckCollDir1,
148  bool doCheckCollDir2);
150  const int dir,
151  const Array<OneD, const NekDouble>& inarray,
152  Array<OneD, NekDouble>& outarray);
154  const int dir,
155  const Array<OneD, const NekDouble>& inarray,
156  Array<OneD, NekDouble>& outarray);
158  const int dir,
159  const Array<OneD, const NekDouble>& inarray,
160  Array<OneD, NekDouble>& outarray);
161 
162 
163  //---------------------------------------
164  // Evaluation functions
165  //---------------------------------------
169  STD_REGIONS_EXPORT virtual void v_GetCoords(
170  Array<OneD, NekDouble> &coords_x,
171  Array<OneD, NekDouble> &coords_y,
172  Array<OneD, NekDouble> &coords_z);
173  STD_REGIONS_EXPORT virtual void v_FillMode(
174  const int mode,
175  Array<OneD, NekDouble>& outarray);
176 
177 
178  //---------------------------
179  // Helper functions
180  //---------------------------
181  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
182  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
183  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
185  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
186  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
187  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
188  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
189  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
191  const int i) const;
192  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
193  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
195  const int i, const int j) const;
197  const std::vector<unsigned int> &nummodes,
198  int &modes_offset);
200  v_DetFaceBasisKey(const int i, const int k) const;
202  const int i) const;
204 
205 
206  //--------------------------
207  // Mappings
208  //--------------------------
210  const int fid,
211  const Orientation faceOrient,
212  Array<OneD, unsigned int> &maparray,
213  Array<OneD, int> &signarray,
214  int P = -1,
215  int Q = -1);
216  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
217  bool useCoeffPacking = false); STD_REGIONS_EXPORT virtual void v_GetEdgeInteriorMap(const int eid,
218  const Orientation edgeOrient,
219  Array<OneD, unsigned int> &maparray,
220  Array<OneD, int> &signarray);
222  const int fid,
223  const Orientation faceOrient,
224  Array<OneD, unsigned int> &maparray,
225  Array<OneD, int>& signarray);
227  Array<OneD, unsigned int>& outarray);
229  Array<OneD, unsigned int>& outarray);
230 
231  //---------------------------------------
232  // Wrapper functions
233  //---------------------------------------
235  const StdMatrixKey &mkey);
237  const StdMatrixKey &mkey);
238 
240  const Array<OneD, const NekDouble>& inarray,
241  Array<OneD, NekDouble>& outarray);
242 
244 
245  //---------------------------------------
246  // Method for applying sensors
247  //---------------------------------------
249  int numMin,
250  const Array<OneD, const NekDouble> &inarray,
251  Array<OneD, NekDouble> &outarray);
252 
253  //---------------------------------------
254  // Output interpolation functions
255  //---------------------------------------
256 
258  Array<OneD, int> &conn,
259  bool standard = true);
260 
261  private:
262  //---------------------------------------
263  // Private helper functions
264  //---------------------------------------
265  STD_REGIONS_EXPORT int GetMode(const int i, const int j, const int k);
266  };
267 
268  typedef boost::shared_ptr<StdTetExp> StdTetExpSharedPtr;
269  } //end of namespace
270 } //end of namespace
271 
272 #endif //STDTETEXP_H
int GetMode(const int i, const int j, const int k)
Compute the mode number in the expansion for a particular tensorial combination.
Definition: StdTetExp.cpp:1884
virtual int v_NumBndryCoeffs() const
Definition: StdTetExp.cpp:932
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:1765
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)
Definition: StdTetExp.cpp:251
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdTetExp.cpp:2136
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdTetExp.cpp:1146
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdTetExp.cpp:974
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdTetExp.cpp:866
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdTetExp.cpp:1164
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdTetExp.cpp:545
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dx, Array< OneD, NekDouble > &out_dy, Array< OneD, NekDouble > &out_dz)
Calculate the derivative of the physical points.
Definition: StdTetExp.cpp:106
virtual int v_GetNverts() const
Definition: StdTetExp.cpp:912
virtual void v_BwdTrans_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
Definition: StdTetExp.cpp:356
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdTetExp.cpp:1103
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual int v_NumDGBndryCoeffs() const
Definition: StdTetExp.cpp:952
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTetExp.cpp:1456
virtual void v_IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
Definition: StdTetExp.cpp:581
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:452
virtual int v_GetFaceIntNcoeffs(const int i) const
Definition: StdTetExp.cpp:1030
LibUtilities::ShapeType DetShapeType() const
Definition: StdTetExp.h:70
NekDouble PhysEvaluate3D(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
Single Point Evaluation.
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdTetExp.cpp:927
virtual int v_GetTotalFaceIntNcoeffs() const
Definition: StdTetExp.cpp:1051
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:898
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
Definition: StdTetExp.cpp:1083
virtual int v_GetTotalEdgeIntNcoeffs() const
Definition: StdTetExp.cpp:995
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:323
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:713
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdTetExp.cpp:1706
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:667
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:1853
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdTetExp.cpp:1667
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:1916
Defines a specification for a set of points.
Definition: Points.h:58
double NekDouble
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1, int Q=-1)
Definition: StdTetExp.cpp:1206
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:1996
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTetExp.cpp:1573
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdTetExp.cpp:1190
virtual int v_GetNfaces() const
Definition: StdTetExp.cpp:922
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:676
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:526
#define STD_REGIONS_EXPORT
virtual int v_GetFaceNcoeffs(const int i) const
Definition: StdTetExp.cpp:1004
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
Definition: StdTetExp.cpp:1116
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdTetExp.cpp:1378
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:293
virtual int v_GetFaceNumPoints(const int i) const
Definition: StdTetExp.cpp:1062
boost::shared_ptr< StdTetExp > StdTetExpSharedPtr
Definition: StdTetExp.h:268
virtual int v_GetNedges() const
Definition: StdTetExp.cpp:917
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:2071
Describes the specification for a Basis.
Definition: Basis.h:50
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:503