Nektar++
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
63 //-----------------------------
64 // Transforms
65 //-----------------------------
67 const Array<OneD, const NekDouble> &inarray,
68 Array<OneD, NekDouble> &outarray) override;
70 const Array<OneD, const NekDouble> &inarray,
71 Array<OneD, NekDouble> &outarray) override;
73 const Array<OneD, const NekDouble> &inarray,
74 Array<OneD, NekDouble> &outarray) override;
75
76 //----------------------------
77 // Inner product functions
78 //----------------------------
80 const Array<OneD, const NekDouble> &inarray,
81 Array<OneD, NekDouble> &outarray) override;
84 const Array<OneD, const NekDouble> &inarray,
85 Array<OneD, NekDouble> &outarray, int coll_check) override;
87 const Array<OneD, const NekDouble> &inarray,
88 Array<OneD, NekDouble> &outarray,
89 bool multiplybyweights = true) override;
91 const int dir, const Array<OneD, const NekDouble> &inarray,
92 Array<OneD, NekDouble> &outarray) override;
93
94 //---------------------------
95 // Evaluations Methods
96 //---------------------------
98 v_GenMatrix(const StdMatrixKey &mkey) override;
100 v_CreateStdMatrix(const StdMatrixKey &mkey) override;
101
102private:
103 int v_GetNverts() const final
104 {
105 return 1;
106 }
107
108 int v_NumBndryCoeffs() const final
109 {
110 return 0;
111 }
112
113 int v_NumDGBndryCoeffs() const final
114 {
115 return 0;
116 }
117
118 int v_GetTraceNcoeffs([[maybe_unused]] const int i) const final
119 {
120 return 0;
121 }
122
123 int v_GetTraceIntNcoeffs([[maybe_unused]] const int i) const final
124 {
125 return 0;
126 }
127
128 int v_GetTraceNumPoints([[maybe_unused]] const int i) const final
129 {
130 return 0;
131 }
132
133 int v_GetVertexMap([[maybe_unused]] int localVertexId,
134 [[maybe_unused]] bool useCoeffPacking = false) override
135 {
136 ASSERTL2(localVertexId == 0, "Only single point in StdPointExp!");
137 return 0;
138 }
139};
140
141// type defines for use of PointExp in a boost vector
142typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr;
143} // namespace Nektar::StdRegions
144
145#endif // STDPOINTEXP_H
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Definition: ErrorUtil.hpp:265
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:45
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
Definition: StdPointExp.h:133
StdPointExp(const StdPointExp &T)=default
int v_GetNverts() const final
Definition: StdPointExp.h:103
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
Definition: StdPointExp.h:113
void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdPointExp.cpp:99
int v_GetTraceNcoeffs(const int i) const final
Definition: StdPointExp.h:118
int v_GetTraceNumPoints(const int i) const final
Definition: StdPointExp.h:128
LibUtilities::ShapeType v_DetShapeType() const override
Definition: StdPointExp.cpp:48
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdPointExp.cpp:60
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.
Definition: StdPointExp.cpp:77
~StdPointExp() override=default
void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
Definition: StdPointExp.cpp:53
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
int v_NumBndryCoeffs() const final
Definition: StdPointExp.h:108
int v_GetTraceIntNcoeffs(const int i) const final
Definition: StdPointExp.h:123
std::shared_ptr< StdPointExp > StdPointExpSharedPtr
Definition: StdPointExp.h:142
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75