Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TetExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File TetExp.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:
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef TETEXP_H
37 #define TETEXP_H
38 
39 #include <StdRegions/StdTetExp.h>
40 #include <SpatialDomains/TetGeom.h>
41 #include <LocalRegions/MatrixKey.h>
45 
46 namespace Nektar
47 {
48  namespace LocalRegions
49  {
50 
51  class TetExp: virtual public StdRegions::StdTetExp, virtual public Expansion3D
52  {
53 
54  public:
56  const LibUtilities::BasisKey &Bb,
57  const LibUtilities::BasisKey &Bc,
59 
60  LOCAL_REGIONS_EXPORT TetExp(const TetExp &T);
61 
62 
64 
65  protected:
66  //-----------------------------
67  // Integration Methods
68  //-----------------------------
69  LOCAL_REGIONS_EXPORT virtual
71 
72 
73  //-----------------------------
74  // Differentiation Methods
75  //-----------------------------
76  LOCAL_REGIONS_EXPORT virtual void v_PhysDeriv(
77  const Array<OneD, const NekDouble> &inarray,
78  Array<OneD, NekDouble> &out_d0,
79  Array<OneD, NekDouble> &out_d1,
80  Array<OneD, NekDouble> &out_d2);
81 
82  //-----------------------------
83  // Transforms
84  //-----------------------------
85  LOCAL_REGIONS_EXPORT virtual void v_FwdTrans(
86  const Array<OneD, const NekDouble> & inarray,
87  Array<OneD,NekDouble> &outarray);
88 
89  //-----------------------------
90  // Inner product functions
91  //-----------------------------
93  const Array<OneD, const NekDouble>& inarray,
94  Array<OneD, NekDouble>& outarray);
96  const Array<OneD, const NekDouble>& inarray,
97  Array<OneD, NekDouble>& outarray,
98  bool multiplybyweights = true);
100  const int dir,
101  const Array<OneD, const NekDouble>& inarray,
102  Array<OneD, NekDouble>& outarray);
103 
104 
105  //-----------------------------
106  // Evaluation functions
107  //-----------------------------
109  const Array<OneD, const NekDouble> &Lcoord,
110  const Array<OneD, const NekDouble> &physvals);
111 
113  const Array<OneD, const NekDouble> &coords,
114  const Array<OneD, const NekDouble> & physvals);
115 
116  LOCAL_REGIONS_EXPORT virtual void v_GetCoord(
117  const Array<OneD, const NekDouble> &Lcoords,
118  Array<OneD,NekDouble> &coords);
119 
120  LOCAL_REGIONS_EXPORT virtual void v_GetCoords(
121  Array<OneD, NekDouble> &coords_1,
122  Array<OneD, NekDouble> &coords_2,
123  Array<OneD, NekDouble> &coords_3);
124 
125  //-----------------------------
126  // Helper functions
127  //-----------------------------
128  LOCAL_REGIONS_EXPORT virtual
130 
131  LOCAL_REGIONS_EXPORT virtual
133 
134  LOCAL_REGIONS_EXPORT virtual
136 
137  LOCAL_REGIONS_EXPORT virtual int v_GetCoordim();
138 
140  const NekDouble *data,
141  const std::vector<unsigned int> &nummodes,
142  const int mode_offset,
143  NekDouble *coeffs,
144  std::vector<LibUtilities::BasisType> &fromType);
145 
146 
148  const int face,
149  Array<OneD, int> &outarray);
150 
151  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
152  //-----------------------------
153  // Operator creation functions
154  //-----------------------------
156  const Array<OneD, const NekDouble> &inarray,
157  Array<OneD,NekDouble> &outarray,
158  const StdRegions::StdMatrixKey &mkey);
159 
161  const Array<OneD, const NekDouble> &inarray,
162  Array<OneD,NekDouble> &outarray,
163  const StdRegions::StdMatrixKey &mkey);
164 
166  const int k1,
167  const int k2,
168  const Array<OneD, const NekDouble> &inarray,
169  Array<OneD,NekDouble> &outarray,
170  const StdRegions::StdMatrixKey &mkey);
171 
173  Array<OneD, NekDouble> &array,
174  const StdRegions::StdMatrixKey &mkey);
175 
176  //-----------------------------
177  // Matrix creation functions
178  //-----------------------------
180  const StdRegions::StdMatrixKey &mkey);
181 
183  const MatrixKey &mkey);
184 
186  const MatrixKey &mkey);
187 
189  const StdRegions::StdMatrixKey &mkey);
190 
192  const MatrixKey &mkey);
193 
194  LOCAL_REGIONS_EXPORT virtual
196  const MatrixKey &mkey);
197 
199  const MatrixKey &mkey);
200 
202  const DNekMatSharedPtr & m_transformationmatrix,
203  DNekMatSharedPtr m_inversetransformationmatrix,
204  DNekMatSharedPtr m_inversetransposedtransformationmatrix);
205 
207  const DNekScalMatSharedPtr & mat);
208 
210 
211  private:
214 
215  TetExp();
216 
218  const Array<OneD, const NekDouble> &inarray,
219  Array<OneD, NekDouble> &outarray,
220  const StdRegions::StdMatrixKey &mkey);
222  const Array<OneD, const NekDouble> &inarray,
223  Array<OneD, NekDouble> &outarray,
225  };
226 
227  // type defines for use of TetExp in a boost vector
228  typedef boost::shared_ptr<TetExp> TetExpSharedPtr;
229  typedef std::vector< TetExpSharedPtr > TetExpVector;
231 
232  } //end of namespace
233 } //end of namespace
234 
235 #endif // TETEXP_H
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1509
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region.
Definition: TetExp.cpp:122
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
Definition: TetExp.cpp:562
void GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1524
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
Definition: TetExp.cpp:483
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=m_base0*m_base1*m_base2 and put in...
Definition: TetExp.cpp:295
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: TetExp.h:212
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
Definition: TetExp.cpp:241
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:986
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
boost::shared_ptr< TetExp > TetExpSharedPtr
Definition: TetExp.h:228
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1047
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1380
void SetUpInverseTransformationMatrix(const DNekMatSharedPtr &m_transformationmatrix, DNekMatSharedPtr m_inversetransformationmatrix, DNekMatSharedPtr m_inversetransposedtransformationmatrix)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:995
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1498
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: TetExp.h:213
std::vector< TetExpSharedPtr >::iterator TetExpVectorIter
Definition: TetExp.h:230
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: TetExp.cpp:302
void v_ComputeFaceNormal(const int face)
Compute the normal of a triangular face.
Definition: TetExp.cpp:736
double NekDouble
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
Returns the physical values at the quadrature points of a face.
Definition: TetExp.cpp:646
void v_ComputeConditionNumberOfMatrix(const DNekScalMatSharedPtr &mat)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1014
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1514
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: TetExp.cpp:553
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Definition: TetExp.cpp:1547
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
Definition: TetExp.cpp:495
virtual int v_GetCoordim()
Definition: TetExp.cpp:576
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
Definition: TetExp.cpp:581
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
Definition: TetExp.cpp:366
boost::shared_ptr< TetGeom > TetGeomSharedPtr
Definition: TetGeom.h:106
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Get the coordinates "coords" at the local coordinates "Lcoords".
Definition: TetExp.cpp:513
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1071
#define LOCAL_REGIONS_EXPORT
std::vector< TetExpSharedPtr > TetExpVector
Definition: TetExp.h:229
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)
Differentiate inarray in the three coordinate directions.
Definition: TetExp.cpp:163
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1519
Describes the specification for a Basis.
Definition: Basis.h:50
virtual void v_ComputeLaplacianMetric()
Definition: TetExp.cpp:1617
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: TetExp.cpp:532
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list.
Definition: TetExp.cpp:548