Nektar++
Loading...
Searching...
No Matches
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
43#include <LocalRegions/TriExp.h>
44
46{
47
48class NodalTriExp final : virtual public StdRegions::StdNodalTriExp,
49 virtual public TriExp
50{
51public:
52 /** \brief Constructor using BasisKey class for quadrature
53 points and order definition */
55 const LibUtilities::BasisKey &Bb,
56 const LibUtilities::PointsType Ntype,
58
60
61 LOCAL_REGIONS_EXPORT ~NodalTriExp() override = default;
62
63protected:
64 //---------------------------------------
65 // Transforms
66 //---------------------------------------
68 const Array<OneD, const NekDouble> &inarray,
69 Array<OneD, NekDouble> &outarray) override;
70
71 //---------------------------------------
72 // Inner product functions
73 //---------------------------------------
75 const Array<OneD, const NekDouble> &inarray,
76 Array<OneD, NekDouble> &outarray) override;
78 const int dir, const Array<OneD, const NekDouble> &inarray,
79 Array<OneD, NekDouble> &outarray) override;
80
81 //---------------------------------------
82 // Evaluation functions
83 //---------------------------------------
85 const Array<OneD, const NekDouble> &Lcoords,
86 Array<OneD, NekDouble> &coords) override
87 {
88 TriExp::v_GetCoord(Lcoords, coords);
89 }
90
93 Array<OneD, NekDouble> &coords_3) override
94 {
95 TriExp::v_GetCoords(coords_1, coords_2, coords_3);
96 }
97
99 void) const override;
101 void) const override;
103 const NekDouble *data, const std::vector<unsigned int> &nummodes,
104 const int mode_offset, NekDouble *coeffs,
105 [[maybe_unused]] std::vector<LibUtilities::BasisType> &fromType)
106 override;
107
108 //---------------------------------------
109 // Matrix creation functions
110 //---------------------------------------
113 {
114 return TriExp::v_GenMatrix(mkey);
115 }
117 v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override;
119 v_GetLocMatrix(const MatrixKey &mkey) override;
121 v_GetLocStaticCondMatrix(const MatrixKey &mkey) override;
122 LOCAL_REGIONS_EXPORT void v_DropLocMatrix(const MatrixKey &mkey) override;
123
124 //----------------------------------------
125 // Matrix Operators
126 //----------------------------------------
128 const Array<OneD, const NekDouble> &inarray,
129 Array<OneD, NekDouble> &outarray,
130 const StdRegions::StdMatrixKey &mkey) override;
132 const Array<OneD, const NekDouble> &inarray,
133 Array<OneD, NekDouble> &outarray,
134 const StdRegions::StdMatrixKey &mkey) override;
136 const int k1, const int k2, const Array<OneD, const NekDouble> &inarray,
137 Array<OneD, NekDouble> &outarray,
138 const StdRegions::StdMatrixKey &mkey) override;
140 const int i, const Array<OneD, const NekDouble> &inarray,
141 Array<OneD, NekDouble> &outarray,
142 const StdRegions::StdMatrixKey &mkey) override;
144 const Array<OneD, const NekDouble> &inarray,
145 Array<OneD, NekDouble> &outarray,
146 const StdRegions::StdMatrixKey &mkey) override;
147
148private:
153};
154
155typedef std::shared_ptr<NodalTriExp> NodalTriExpSharedPtr;
156typedef std::vector<NodalTriExpSharedPtr> NodalTriExpVector;
157
158} // namespace Nektar::LocalRegions
159
160#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
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
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
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition NodalTriExp.h:91
void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const 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
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Definition NodalTriExp.h:84
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition TriExp.cpp:413
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Definition TriExp.cpp:396
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
Definition TriExp.cpp:769
2D geometry information
Definition Geometry2D.h:50
std::shared_ptr< NodalTriExp > NodalTriExpSharedPtr
std::vector< NodalTriExpSharedPtr > NodalTriExpVector
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr