Nektar++
StdPointExp.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File $Source: /usr/sci/projects/Nektar/cvs/Nektar++/library/LocalRegions/PointExp.h,v $
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 
43 
44 namespace Nektar
45 {
46  namespace StdRegions
47  {
48  class StdPointExp: virtual public StdExpansion0D
49  {
50  public:
51 
56 
57  protected:
58  //----------------------------
59  // Evaluations Methods
60  //---------------------------
61  STD_REGIONS_EXPORT virtual void v_GetCoords(
62  Array<OneD, NekDouble> &coords_0,
63  Array<OneD, NekDouble> &coords_1,
64  Array<OneD, NekDouble> &coords_2);
65 
66  //----------------------------
67  // Helper functions
68  //---------------------------
70  v_DetShapeType() const;
71 
72  //-----------------------------
73  // Transforms
74  //-----------------------------
75  STD_REGIONS_EXPORT virtual void v_BwdTrans(
76  const Array<OneD, const NekDouble>& inarray,
77  Array<OneD, NekDouble> &outarray);
78  STD_REGIONS_EXPORT virtual void v_FwdTrans(
79  const Array<OneD, const NekDouble>& inarray,
80  Array<OneD, NekDouble> &outarray);
82  const Array<OneD, const NekDouble>& inarray,
83  Array<OneD, NekDouble> &outarray);
85  const Array<OneD, const NekDouble>& inarray,
86  Array<OneD, NekDouble> &outarray);
87 
88  //----------------------------
89  // Inner product functions
90  //----------------------------
92  const Array<OneD, const NekDouble>& inarray,
93  Array<OneD, NekDouble> &outarray);
95  const Array<OneD, const NekDouble>& base,
96  const Array<OneD, const NekDouble>& inarray,
97  Array<OneD, NekDouble> &outarray,
98  int coll_check);
100  const Array<OneD, const NekDouble>& inarray,
101  Array<OneD, NekDouble> &outarray,
102  bool multiplybyweights= true);
104  const int dir,
105  const Array<OneD, const NekDouble> &inarray,
106  Array<OneD, NekDouble> &outarray);
107 
108  //---------------------------
109  // Evaluations Methods
110  //---------------------------
112  const StdMatrixKey &mkey);
114  const StdMatrixKey &mkey);
115 
116  private:
117  virtual int v_GetNverts() const
118  {
119  return 1;
120  }
121 
122  virtual int v_GetNtraces() const
123  {
124  return 0;
125  }
126 
127  virtual int v_GetVertexMap(
128  int localVertexId, bool useCoeffPacking = false)
129  {
130  boost::ignore_unused(localVertexId, useCoeffPacking);
131  ASSERTL2(localVertexId == 0,
132  "Only single point in StdPointExp!");
133  return 0;
134  }
135  };
136 
137  // type defines for use of PointExp in a boost vector
138  typedef std::shared_ptr<StdPointExp> StdPointExpSharedPtr;
139  } //end of namespace
140 } //end of namespace
141 
142 #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:274
#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:79
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdPointExp.cpp:90
virtual int v_GetNtraces() const
Definition: StdPointExp.h:122
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:117
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.
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:73
virtual int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false)
Definition: StdPointExp.h:127
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
std::shared_ptr< StdPointExp > StdPointExpSharedPtr
Definition: StdPointExp.h:138
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69