Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 int v_GetCoordim();
135 
137  const NekDouble *data,
138  const std::vector<unsigned int> &nummodes,
139  const int mode_offset,
140  NekDouble *coeffs);
141 
143  const int face,
144  Array<OneD, int> &outarray);
145 
146  LOCAL_REGIONS_EXPORT void v_ComputeFaceNormal(const int face);
147  //-----------------------------
148  // Operator creation functions
149  //-----------------------------
151  const Array<OneD, const NekDouble> &inarray,
152  Array<OneD,NekDouble> &outarray,
153  const StdRegions::StdMatrixKey &mkey);
154 
156  const Array<OneD, const NekDouble> &inarray,
157  Array<OneD,NekDouble> &outarray,
158  const StdRegions::StdMatrixKey &mkey);
159 
161  const int k1,
162  const int k2,
163  const Array<OneD, const NekDouble> &inarray,
164  Array<OneD,NekDouble> &outarray,
165  const StdRegions::StdMatrixKey &mkey);
166 
168  Array<OneD, NekDouble> &array,
169  const StdRegions::StdMatrixKey &mkey);
170 
171  //-----------------------------
172  // Matrix creation functions
173  //-----------------------------
175  const StdRegions::StdMatrixKey &mkey);
176 
178  const MatrixKey &mkey);
179 
181  const MatrixKey &mkey);
182 
184  const StdRegions::StdMatrixKey &mkey);
185 
187  const MatrixKey &mkey);
188 
189  LOCAL_REGIONS_EXPORT virtual
191  const MatrixKey &mkey);
192 
194  const MatrixKey &mkey);
195 
197  const DNekMatSharedPtr & m_transformationmatrix,
198  DNekMatSharedPtr m_inversetransformationmatrix,
199  DNekMatSharedPtr m_inversetransposedtransformationmatrix);
200 
202  const DNekScalMatSharedPtr & mat);
203 
205 
206  private:
209 
210  TetExp();
211 
213  const Array<OneD, const NekDouble> &inarray,
214  Array<OneD, NekDouble> &outarray,
215  const StdRegions::StdMatrixKey &mkey);
217  const Array<OneD, const NekDouble> &inarray,
218  Array<OneD, NekDouble> &outarray,
220  };
221 
222  // type defines for use of TetExp in a boost vector
223  typedef boost::shared_ptr<TetExp> TetExpSharedPtr;
224  typedef std::vector< TetExpSharedPtr > TetExpVector;
226 
227  } //end of namespace
228 } //end of namespace
229 
230 #endif // TETEXP_H
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1491
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region.
Definition: TetExp.cpp:120
void GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1506
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
Definition: TetExp.cpp:481
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:293
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: TetExp.h:207
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:239
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:968
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
boost::shared_ptr< TetExp > TetExpSharedPtr
Definition: TetExp.h:223
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1029
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1362
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:977
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs)
Unpack data from input file assuming it comes from the same expansion type.
Definition: TetExp.cpp:564
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:1480
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: TetExp.h:208
std::vector< TetExpSharedPtr >::iterator TetExpVectorIter
Definition: TetExp.h:225
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:300
void v_ComputeFaceNormal(const int face)
Compute the normal of a triangular face.
Definition: TetExp.cpp:718
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:628
void v_ComputeConditionNumberOfMatrix(const DNekScalMatSharedPtr &mat)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
Definition: TetExp.cpp:996
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1496
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
Definition: TetExp.cpp:551
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Definition: TetExp.cpp:1529
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:493
virtual int v_GetCoordim()
Definition: TetExp.cpp:559
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
Definition: TetExp.cpp:364
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:511
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1053
#define LOCAL_REGIONS_EXPORT
std::vector< TetExpSharedPtr > TetExpVector
Definition: TetExp.h:224
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:161
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Definition: TetExp.cpp:1501
Describes the specification for a Basis.
Definition: Basis.h:50
virtual void v_ComputeLaplacianMetric()
Definition: TetExp.cpp:1599
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: TetExp.cpp:530
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list.
Definition: TetExp.cpp:546