Nektar++
Loading...
Searching...
No Matches
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// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description:
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef TETEXP_H
36#define TETEXP_H
37
44
46{
47
48class TetExp : virtual public StdRegions::StdTetExp, virtual public Expansion3D
49{
50
51public:
53 const LibUtilities::BasisKey &Bb,
54 const LibUtilities::BasisKey &Bc,
56
58
59 LOCAL_REGIONS_EXPORT ~TetExp() override = default;
60
61protected:
62 //-----------------------------
63 // Inner product functions
64 //-----------------------------
66 const int dir, const Array<OneD, const NekDouble> &inarray,
67 Array<OneD, NekDouble> &outarray) override;
69 const int dir, const Array<OneD, const NekDouble> &inarray,
70 Array<OneD, Array<OneD, NekDouble>> &outarray) override;
71
72 //-----------------------------
73 // Evaluation functions
74 //-----------------------------
77 const Array<OneD, const NekDouble> &inarray,
78 std::array<NekDouble, 3> &firstOrderDerivs) override;
79
81 const Array<OneD, const NekDouble> &Lcoords,
82 Array<OneD, NekDouble> &coords) override;
83
86 Array<OneD, NekDouble> &coords_3) override;
87
88 //-----------------------------
89 // Helper functions
90 //-----------------------------
92 void) const override;
93
95 void) const override;
96
98 const NekDouble *data, const std::vector<unsigned int> &nummodes,
99 const int mode_offset, NekDouble *coeffs,
100 std::vector<LibUtilities::BasisType> &fromType) override;
101
103 const int face, Array<OneD, int> &outarray) override;
104
105 LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int face) override;
106
107 //-----------------------------
108 // Operator creation functions
109 //-----------------------------
111 const Array<OneD, const NekDouble> &inarray,
112 Array<OneD, NekDouble> &outarray,
113 const StdRegions::StdMatrixKey &mkey) override;
114
116 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
117 Array<OneD, NekDouble> &outarray,
118 const StdRegions::StdMatrixKey &mkey) override;
119
122 const StdRegions::StdMatrixKey &mkey) override;
123
124 //-----------------------------
125 // Matrix creation functions
126 //-----------------------------
128 v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override;
129
131 v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override;
132
134 v_GetLocMatrix(const MatrixKey &mkey) override;
135
136 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
137
139 v_GetLocStaticCondMatrix(const MatrixKey &mkey) override;
140
142 const MatrixKey &mkey) override;
143
145 const DNekMatSharedPtr &m_transformationmatrix,
146 DNekMatSharedPtr m_inversetransformationmatrix,
147 DNekMatSharedPtr m_inversetransposedtransformationmatrix);
148
150
151private:
156
158 const Array<OneD, const NekDouble> &inarray,
159 Array<OneD, NekDouble> &outarray, const StdRegions::StdMatrixKey &mkey);
161 const Array<OneD, const NekDouble> &inarray,
162 Array<OneD, NekDouble> &outarray, Array<OneD, NekDouble> &wsp) override;
163};
164
165typedef std::shared_ptr<TetExp> TetExpSharedPtr;
166typedef std::vector<TetExpSharedPtr> TetExpVector;
167} // namespace Nektar::LocalRegions
168
169#endif // TETEXP_H
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
void v_ComputeTraceNormal(const int face) override
Compute the normal of a triangular face.
Definition TetExp.cpp:432
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
Definition TetExp.cpp:768
void v_DropLocMatrix(const MatrixKey &mkey) override
Definition TetExp.cpp:773
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition TetExp.h:155
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition TetExp.h:153
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition TetExp.cpp:735
void SetUpInverseTransformationMatrix(const DNekMatSharedPtr &m_transformationmatrix, DNekMatSharedPtr m_inversetransformationmatrix, DNekMatSharedPtr m_inversetransposedtransformationmatrix)
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
Definition TetExp.cpp:690
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
Definition TetExp.cpp:222
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
Definition TetExp.cpp:778
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Get the coordinates "coords" at the local coordinates "Lcoords".
Definition TetExp.cpp:236
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
Definition TetExp.cpp:264
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition TetExp.cpp:757
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
Definition TetExp.cpp:119
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
Definition TetExp.cpp:271
~TetExp() override=default
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition TetExp.cpp:253
void GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition TetExp.cpp:788
void v_ComputeLaplacianMetric() override
Definition TetExp.cpp:892
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
Definition TetExp.cpp:783
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
Definition TetExp.cpp:705
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition TetExp.cpp:156
void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
Returns the physical values at the quadrature points of a face.
Definition TetExp.cpp:344
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
Definition TetExp.cpp:811
void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
Definition TetExp.cpp:284
3D geometry information
Definition Geometry3D.h:50
std::vector< TetExpSharedPtr > TetExpVector
Definition TetExp.h:166
std::shared_ptr< TetExp > TetExpSharedPtr
Definition TetExp.h:165
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr