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
38#include <boost/core/ignore_unused.hpp>
39
42
43namespace Nektar
44{
45namespace StdRegions
46{
47class StdPointExp : virtual public StdExpansion0D
48{
49public:
53 STD_REGIONS_EXPORT virtual ~StdPointExp() override;
54
55protected:
56 //----------------------------
57 // Evaluations Methods
58 //---------------------------
61 Array<OneD, NekDouble> &coords_2) override;
62
63 //----------------------------
64 // Helper functions
65 //---------------------------
67 const override;
68
69 //-----------------------------
70 // Transforms
71 //-----------------------------
72 STD_REGIONS_EXPORT virtual void v_BwdTrans(
73 const Array<OneD, const NekDouble> &inarray,
74 Array<OneD, NekDouble> &outarray) override;
75 STD_REGIONS_EXPORT virtual void v_FwdTrans(
76 const Array<OneD, const NekDouble> &inarray,
77 Array<OneD, NekDouble> &outarray) override;
79 const Array<OneD, const NekDouble> &inarray,
80 Array<OneD, NekDouble> &outarray) override;
81
82 //----------------------------
83 // Inner product functions
84 //----------------------------
86 const Array<OneD, const NekDouble> &inarray,
87 Array<OneD, NekDouble> &outarray) override;
90 const Array<OneD, const NekDouble> &inarray,
91 Array<OneD, NekDouble> &outarray, int coll_check) override;
93 const Array<OneD, const NekDouble> &inarray,
94 Array<OneD, NekDouble> &outarray,
95 bool multiplybyweights = true) override;
97 const int dir, const Array<OneD, const NekDouble> &inarray,
98 Array<OneD, NekDouble> &outarray) override;
99
100 //---------------------------
101 // Evaluations Methods
102 //---------------------------
104 const StdMatrixKey &mkey) override;
106 const StdMatrixKey &mkey) override;
107
108private:
109 virtual int v_GetNverts() const override final
110 {
111 return 1;
112 }
113
114 virtual int v_NumBndryCoeffs() const override final
115 {
116 return 0;
117 }
118
119 virtual int v_NumDGBndryCoeffs() const override final
120 {
121 return 0;
122 }
123
124 virtual int v_GetTraceNcoeffs(const int i) const override final
125 {
126 boost::ignore_unused(i);
127 return 0;
128 }
129
130 virtual int v_GetTraceIntNcoeffs(const int i) const override final
131 {
132 boost::ignore_unused(i);
133 return 0;
134 }
135
136 virtual int v_GetTraceNumPoints(const int i) const override final
137 {
138 boost::ignore_unused(i);
139 return 0;
140 }
141
142 virtual int v_GetVertexMap(int localVertexId,
143 bool useCoeffPacking = false) override
144 {
145 boost::ignore_unused(localVertexId, useCoeffPacking);
146 ASSERTL2(localVertexId == 0, "Only single point in StdPointExp!");
147 return 0;
148 }
149};
150
151// type defines for use of PointExp in a boost vector
152typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr;
153} // namespace StdRegions
154} // namespace Nektar
155
156#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:272
#define STD_REGIONS_EXPORT
Describes the specification for a Basis.
Definition: Basis.h:47
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
virtual int v_GetTraceNcoeffs(const int i) const override final
Definition: StdPointExp.h:124
virtual 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.
virtual int v_GetTraceNumPoints(const int i) const override final
Definition: StdPointExp.h:136
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual int v_GetNverts() const override final
Definition: StdPointExp.h:109
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
virtual LibUtilities::ShapeType v_DetShapeType() const override
Definition: StdPointExp.cpp:67
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Definition: StdPointExp.cpp:80
virtual 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:97
virtual int v_GetTraceIntNcoeffs(const int i) const override final
Definition: StdPointExp.h:130
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
Definition: StdPointExp.cpp:72
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
virtual ~StdPointExp() override
Definition: StdPointExp.cpp:63
virtual int v_NumBndryCoeffs() const override final
Definition: StdPointExp.h:114
virtual int v_NumDGBndryCoeffs() const override final
Definition: StdPointExp.h:119
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
Definition: StdPointExp.h:142
std::shared_ptr< StdPointExp > StdPointExpSharedPtr
Definition: StdPointExp.h:152
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75