Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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);
177  const int fid,
178  const Orientation faceOrient,
179  int &numModes0,
180  int &numModes1);
181 
182  //---------------------------
183  // Helper functions
184  //---------------------------
185  STD_REGIONS_EXPORT virtual int v_GetNverts() const;
186  STD_REGIONS_EXPORT virtual int v_GetNedges() const;
187  STD_REGIONS_EXPORT virtual int v_GetNfaces() const;
189  STD_REGIONS_EXPORT virtual int v_NumBndryCoeffs() const;
190  STD_REGIONS_EXPORT virtual int v_NumDGBndryCoeffs() const;
191  STD_REGIONS_EXPORT virtual int v_GetEdgeNcoeffs(const int i) const;
192  STD_REGIONS_EXPORT virtual int v_GetTotalEdgeIntNcoeffs() const;
193  STD_REGIONS_EXPORT virtual int v_GetFaceNcoeffs(const int i) const;
195  const int i) const;
196  STD_REGIONS_EXPORT virtual int v_GetTotalFaceIntNcoeffs() const;
197  STD_REGIONS_EXPORT virtual int v_GetFaceNumPoints(const int i) const;
199  const int i, const int j) const;
201  const std::vector<unsigned int> &nummodes,
202  int &modes_offset);
204  v_DetFaceBasisKey(const int i, const int k) const;
206  const int i) const;
208 
209 
210  //--------------------------
211  // Mappings
212  //--------------------------
214  const int fid,
215  const Orientation faceOrient,
216  Array<OneD, unsigned int> &maparray,
217  Array<OneD, int> &signarray,
218  int P = -1,
219  int Q = -1);
220  STD_REGIONS_EXPORT virtual int v_GetVertexMap(int localVertexId,
221  bool useCoeffPacking = false); STD_REGIONS_EXPORT virtual void v_GetEdgeInteriorMap(const int eid,
222  const Orientation edgeOrient,
223  Array<OneD, unsigned int> &maparray,
224  Array<OneD, int> &signarray);
226  const int fid,
227  const Orientation faceOrient,
228  Array<OneD, unsigned int> &maparray,
229  Array<OneD, int>& signarray);
231  Array<OneD, unsigned int>& outarray);
233  Array<OneD, unsigned int>& outarray);
234 
235  //---------------------------------------
236  // Wrapper functions
237  //---------------------------------------
239  const StdMatrixKey &mkey);
241  const StdMatrixKey &mkey);
242 
244  const Array<OneD, const NekDouble>& inarray,
245  Array<OneD, NekDouble>& outarray);
246 
248 
249  //---------------------------------------
250  // Method for applying sensors
251  //---------------------------------------
253  int numMin,
254  const Array<OneD, const NekDouble> &inarray,
255  Array<OneD, NekDouble> &outarray);
256 
257  //---------------------------------------
258  // Output interpolation functions
259  //---------------------------------------
260 
262  Array<OneD, int> &conn,
263  bool standard = true);
264 
265  private:
266  //---------------------------------------
267  // Private helper functions
268  //---------------------------------------
269  STD_REGIONS_EXPORT int GetMode(const int i, const int j, const int k);
270  };
271 
272  typedef boost::shared_ptr<StdTetExp> StdTetExpSharedPtr;
273  } //end of namespace
274 } //end of namespace
275 
276 #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:1918
virtual int v_NumBndryCoeffs() const
Definition: StdTetExp.cpp:966
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:1799
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:253
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
Definition: StdTetExp.cpp:2170
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
Definition: StdTetExp.cpp:1180
virtual int v_GetEdgeNcoeffs(const int i) const
Definition: StdTetExp.cpp:1008
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Definition: StdTetExp.cpp:868
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
Definition: StdTetExp.cpp:1198
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: StdTetExp.cpp:547
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:108
virtual int v_GetNverts() const
Definition: StdTetExp.cpp:946
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:358
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
Definition: StdTetExp.cpp:1137
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual int v_NumDGBndryCoeffs() const
Definition: StdTetExp.cpp:986
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTetExp.cpp:1490
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:583
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:454
virtual int v_GetFaceIntNcoeffs(const int i) const
Definition: StdTetExp.cpp:1064
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:961
virtual int v_GetTotalFaceIntNcoeffs() const
Definition: StdTetExp.cpp:1085
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:900
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
Definition: StdTetExp.cpp:1117
virtual int v_GetTotalEdgeIntNcoeffs() const
Definition: StdTetExp.cpp:1029
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:325
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:715
virtual void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdTetExp.cpp:1740
virtual void v_GetFaceNumModes(const int fid, const Orientation faceOrient, int &numModes0, int &numModes1)
Definition: StdTetExp.cpp:909
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:669
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:1887
virtual void v_GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdTetExp.cpp:1701
virtual void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:1950
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:1240
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdTetExp.cpp:2030
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
Definition: StdTetExp.cpp:1607
virtual bool v_IsBoundaryInteriorExpansion()
Definition: StdTetExp.cpp:1224
virtual int v_GetNfaces() const
Definition: StdTetExp.cpp:956
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:678
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:528
#define STD_REGIONS_EXPORT
virtual int v_GetFaceNcoeffs(const int i) const
Definition: StdTetExp.cpp:1038
virtual const LibUtilities::BasisKey v_DetFaceBasisKey(const int i, const int k) const
Definition: StdTetExp.cpp:1150
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdTetExp.cpp:1412
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:295
virtual int v_GetFaceNumPoints(const int i) const
Definition: StdTetExp.cpp:1096
boost::shared_ptr< StdTetExp > StdTetExpSharedPtr
Definition: StdTetExp.h:272
virtual int v_GetNedges() const
Definition: StdTetExp.cpp:951
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdTetExp.cpp:2105
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:505