Nektar++
Loading...
Searching...
No Matches
StdPointExp.h
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: StdPointExp.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: Definition of a Point expansion
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_LIBS_STDREGIONS_STDPOINTEXP_H
36#define NEKTAR_LIBS_STDREGIONS_STDPOINTEXP_H
37
39
40namespace Nektar::StdRegions
41{
42class StdPointExp : virtual public StdExpansion0D
43{
44public:
48 STD_REGIONS_EXPORT ~StdPointExp() override = default;
49
50protected:
51 //----------------------------
52 // Evaluations Methods
53 //---------------------------
56 Array<OneD, NekDouble> &coords_2) override;
57
58 //----------------------------
59 // Helper functions
60 //---------------------------
62
64 const Array<OneD, const NekDouble> &inarray,
65 Array<OneD, NekDouble> &outarray);
66
67 //-----------------------------
68 // Transforms
69 //-----------------------------
71 const Array<OneD, const NekDouble> &inarray,
72 Array<OneD, NekDouble> &outarray) override;
73
74 //----------------------------
75 // Inner product functions
76 //----------------------------
78 const Array<OneD, const NekDouble> &inarray,
79 Array<OneD, NekDouble> &outarray) override;
81 const int dir, const Array<OneD, const NekDouble> &inarray,
82 Array<OneD, NekDouble> &outarray) override;
83
84 //---------------------------
85 // Evaluations Methods
86 //---------------------------
88 v_GenMatrix(const StdMatrixKey &mkey) override;
90 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
91
92private:
93 int v_GetNverts() const final
94 {
95 return 1;
96 }
97
98 int v_NumBndryCoeffs() const final
99 {
100 return 0;
101 }
102
103 int v_NumDGBndryCoeffs() const final
104 {
105 return 0;
106 }
107
108 int v_GetTraceNcoeffs([[maybe_unused]] const int i) const final
109 {
110 return 0;
111 }
112
113 int v_GetTraceIntNcoeffs([[maybe_unused]] const int i) const final
114 {
115 return 0;
116 }
117
118 int v_GetTraceNumPoints([[maybe_unused]] const int i) const final
119 {
120 return 0;
121 }
122
123 int v_GetVertexMap([[maybe_unused]] int localVertexId,
124 [[maybe_unused]] bool useCoeffPacking = false) override
125 {
126 ASSERTL2(localVertexId == 0, "Only single point in StdPointExp!");
127 return 0;
128 }
129};
130
131// type defines for use of PointExp in a boost vector
132typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr;
133} // namespace Nektar::StdRegions
134
135#endif // STDPOINTEXP_H
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition Basis.h:45
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
StdPointExp(const StdPointExp &T)=default
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int v_GetNverts() const final
Definition StdPointExp.h:93
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) 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.
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
int v_NumDGBndryCoeffs() const final
int v_GetTraceNcoeffs(const int i) const final
int v_GetTraceNumPoints(const int i) const final
LibUtilities::ShapeType v_DetShapeType() const override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
~StdPointExp() override=default
void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
int v_NumBndryCoeffs() const final
Definition StdPointExp.h:98
int v_GetTraceIntNcoeffs(const int i) const final
std::shared_ptr< StdPointExp > StdPointExpSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr