Nektar++
NodalTriExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: NodalTriExp.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: Header for NodalTriExp routines
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NODALTRIEXP_H
36#define NODALTRIEXP_H
37
40
44
46{
47
48class NodalTriExp final : virtual public StdRegions::StdNodalTriExp,
49 virtual public Expansion2D
50{
51public:
52 /** \brief Constructor using BasisKey class for quadrature
53 points and order definition */
56 const LibUtilities::PointsType Ntype,
58
60
61 LOCAL_REGIONS_EXPORT ~NodalTriExp() override = default;
62
63protected:
64 //-------------------------------
65 // Integration Methods
66 //-------------------------------
68 v_Integral(const Array<OneD, const NekDouble> &inarray) override;
69
70 //----------------------------
71 // Differentiation Methods
72 //----------------------------
74 const Array<OneD, const NekDouble> &inarray,
76 [[maybe_unused]] Array<OneD, NekDouble> &out_d2 =
77 NullNekDouble1DArray) override;
79 const int dir, const Array<OneD, const NekDouble> &inarray,
80 Array<OneD, NekDouble> &outarray) override;
81
82 //---------------------------------------
83 // Transforms
84 //---------------------------------------
86 const Array<OneD, const NekDouble> &inarray,
87 Array<OneD, NekDouble> &outarray) override;
88
89 //---------------------------------------
90 // Inner product functions
91 //---------------------------------------
93 const Array<OneD, const NekDouble> &inarray,
94 Array<OneD, NekDouble> &outarray) override;
96 const int dir, const Array<OneD, const NekDouble> &inarray,
97 Array<OneD, NekDouble> &outarray) override;
99 const Array<OneD, const NekDouble> &inarray,
100 Array<OneD, NekDouble> &outarray,
101 [[maybe_unused]] bool multiplybyweights = true) override;
103 const int dir, const Array<OneD, const NekDouble> &inarray,
104 Array<OneD, NekDouble> &outarray) override;
106 const int dir, const Array<OneD, const NekDouble> &inarray,
107 Array<OneD, Array<OneD, NekDouble>> &outarray) override;
108
109 //---------------------------------------
110 // Evaluation functions
111 //---------------------------------------
113 void) const override;
115 void) const override;
117 Array<OneD, NekDouble> &coords_0,
119 Array<OneD, NekDouble> &coords_2 = NullNekDouble1DArray) override;
121 const Array<OneD, const NekDouble> &lcoord,
122 Array<OneD, NekDouble> &coord) override;
125 const Array<OneD, const NekDouble> &physvals) override;
126 LOCAL_REGIONS_EXPORT void v_ComputeTraceNormal(const int edge) override;
128 const NekDouble *data, const std::vector<unsigned int> &nummodes,
129 const int mode_offset, NekDouble *coeffs,
130 [[maybe_unused]] std::vector<LibUtilities::BasisType> &fromType)
131 override;
132
133 //---------------------------------------
134 // Helper functions
135 //---------------------------------------
137 const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp,
138 const Array<OneD, const NekDouble> &inarray,
139 Array<OneD, NekDouble> &outarray,
140 StdRegions::Orientation orient) override;
141
142 //---------------------------------------
143 // Matrix creation functions
144 //---------------------------------------
146 v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override;
148 v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override;
150 v_GetLocMatrix(const MatrixKey &mkey) override;
152 v_GetLocStaticCondMatrix(const MatrixKey &mkey) override;
153 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
155 const Array<OneD, const NekDouble> &inarray,
156 Array<OneD, NekDouble> &outarray,
157 const StdRegions::StdMatrixKey &mkey) override;
159 const Array<OneD, const NekDouble> &inarray,
160 Array<OneD, NekDouble> &outarray,
161 const StdRegions::StdMatrixKey &mkey) override;
163 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
164 Array<OneD, NekDouble> &outarray,
165 const StdRegions::StdMatrixKey &mkey) override;
167 const int i, const Array<OneD, const NekDouble> &inarray,
168 Array<OneD, NekDouble> &outarray,
169 const StdRegions::StdMatrixKey &mkey) override;
171 const Array<OneD, const NekDouble> &inarray,
172 Array<OneD, NekDouble> &outarray,
173 const StdRegions::StdMatrixKey &mkey) override;
174
175private:
180};
181
182typedef std::shared_ptr<NodalTriExp> NodalTriExpSharedPtr;
183typedef std::vector<NodalTriExpSharedPtr> NodalTriExpVector;
184
185} // namespace Nektar::LocalRegions
186
187#endif // NODALTRIEXP_H
#define LOCAL_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:45
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: NodalTriExp.h:177
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
Calculate the derivative of the physical points.
Definition: NodalTriExp.cpp:93
NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
This function evaluates the expansion at a single (arbitrary) point of the domain.
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product of a given function f with the different modes of the expansion.
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrates the specified function over the domain.
Definition: NodalTriExp.cpp:70
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: NodalTriExp.h:179
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Transform a given function from physical quadrature space to coefficient space.
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coords_2=NullNekDouble1DArray) override
void v_DropLocMatrix(const MatrixKey &mkey) override
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
NodalTriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::PointsType Ntype, const SpatialDomains::TriGeomSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
Definition: NodalTriExp.cpp:42
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_ComputeTraceNormal(const int edge) override
void v_GetCoord(const Array< OneD, const NekDouble > &lcoord, Array< OneD, NekDouble > &coord) override
std::shared_ptr< NodalTriExp > NodalTriExpSharedPtr
Definition: NodalTriExp.h:182
std::vector< NodalTriExpSharedPtr > NodalTriExpVector
Definition: NodalTriExp.h:183
std::shared_ptr< TriGeom > TriGeomSharedPtr
Definition: TriGeom.h:56
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:79
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
double NekDouble