Nektar++
StdPointExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File $Source:
4 // /usr/sci/projects/Nektar/cvs/Nektar++/library/LocalRegions/PointExp.h,v $
5 //
6 // For more information, please see: http://www.nektar.info
7 //
8 // The MIT License
9 //
10 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
11 // Department of Aeronautics, Imperial College London (UK), and Scientific
12 // Computing and Imaging Institute, University of Utah (USA).
13 //
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Definition of a Point expansion
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NEKTAR_LIBS_STDREGIONS_STDPOINTEXP_H
37 #define NEKTAR_LIBS_STDREGIONS_STDPOINTEXP_H
38 
39 #include <boost/core/ignore_unused.hpp>
40 
43 
44 namespace Nektar
45 {
46 namespace StdRegions
47 {
48 class StdPointExp : virtual public StdExpansion0D
49 {
50 public:
55 
56 protected:
57  //----------------------------
58  // Evaluations Methods
59  //---------------------------
60  STD_REGIONS_EXPORT virtual void v_GetCoords(
62  Array<OneD, NekDouble> &coords_2);
63 
64  //----------------------------
65  // Helper functions
66  //---------------------------
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);
75  STD_REGIONS_EXPORT virtual void v_FwdTrans(
76  const Array<OneD, const NekDouble> &inarray,
77  Array<OneD, NekDouble> &outarray);
79  const Array<OneD, const NekDouble> &inarray,
80  Array<OneD, NekDouble> &outarray);
82  const Array<OneD, const NekDouble> &inarray,
83  Array<OneD, NekDouble> &outarray);
84 
85  //----------------------------
86  // Inner product functions
87  //----------------------------
89  const Array<OneD, const NekDouble> &inarray,
90  Array<OneD, NekDouble> &outarray);
92  const Array<OneD, const NekDouble> &base,
93  const Array<OneD, const NekDouble> &inarray,
94  Array<OneD, NekDouble> &outarray, int coll_check);
96  const Array<OneD, const NekDouble> &inarray,
97  Array<OneD, NekDouble> &outarray, bool multiplybyweights = true);
99  const int dir, const Array<OneD, const NekDouble> &inarray,
100  Array<OneD, NekDouble> &outarray);
101 
102  //---------------------------
103  // Evaluations Methods
104  //---------------------------
106  const StdMatrixKey &mkey);
108  const StdMatrixKey &mkey);
109 
110 private:
111  virtual int v_GetNverts() const
112  {
113  return 1;
114  }
115 
116  virtual int v_GetNtraces() const
117  {
118  return 0;
119  }
120 
121  virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking = false)
122  {
123  boost::ignore_unused(localVertexId, useCoeffPacking);
124  ASSERTL2(localVertexId == 0, "Only single point in StdPointExp!");
125  return 0;
126  }
127 };
128 
129 // type defines for use of PointExp in a boost vector
130 typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr;
131 } // namespace StdRegions
132 } // namespace Nektar
133 
134 #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:50
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
Definition: StdPointExp.cpp:73
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdPointExp.cpp:81
virtual int v_GetNtraces() const
Definition: StdPointExp.h:116
virtual DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey)
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product of a given function f with the different modes of the expansion.
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual int v_GetNverts() const
Definition: StdPointExp.h:111
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
Definition: StdPointExp.cpp:98
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual LibUtilities::ShapeType v_DetShapeType() const
Definition: StdPointExp.cpp:68
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdPointExp.h:121
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
std::shared_ptr< StdPointExp > StdPointExpSharedPtr
Definition: StdPointExp.h:130
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75