Nektar++
PolyEPoints.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PolyEPoints.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 // License for the specific language governing rights and limitations under
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: Header file of 1D Evenly-Spaced Point Definitions
33 //
34 ///////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef POLYEPOINTS_H
37 #define POLYEPOINTS_H
38 
41 #include <boost/shared_ptr.hpp>
44 
45 //#include <LibUtilities/BasicUtils/BasicUtilsFwd.hpp> // for NekManager
47 
48 namespace Nektar
49 {
50  namespace LibUtilities
51  {
52 
53 
54 
55  class PolyEPoints: public Points<NekDouble>
56  {
57  public:
59 
60  virtual ~PolyEPoints()
61  {
62  }
63 
64  LIB_UTILITIES_EXPORT static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key);
65 
66  LIB_UTILITIES_EXPORT const boost::shared_ptr<NekMatrix<NekDouble> > GetI(const PointsKey &pkey);
67  LIB_UTILITIES_EXPORT const boost::shared_ptr<NekMatrix<NekDouble> > GetI(const Array<OneD, const NekDouble>& x);
68  LIB_UTILITIES_EXPORT const boost::shared_ptr<NekMatrix<NekDouble> > GetI(unsigned int numpoints, const Array<OneD, const NekDouble>& x);
69 
70  PolyEPoints(const PointsKey &key):PointsBaseType(key)
71  {
72  }
73 
74  private:
75  /// Default constructor should not be called except by Create method.
76  PolyEPoints():PointsBaseType(NullPointsKey)
77  {
78  }
79 
80  /// Copy constructor should not be called.
81  PolyEPoints(const PolyEPoints &points):PointsBaseType(points.m_pointsKey)
82  {
83  }
84 
85  void CalculatePoints();
86  void CalculateWeights();
87  void CalculateDerivMatrix();
88  void CalculateInterpMatrix(unsigned int npts, const Array<OneD, const NekDouble>& xpoints, Array<OneD, NekDouble>& interp);
89 
93 
94  }; // class PolyEPoints
95  } // end of namespace
96 } // end of namespace
97 
98 
99 #endif //POLYEPOINTS_H
static const PointsKey NullPointsKey(0, eNoPointsType)
Stores a set of points of datatype DataT, defined by a PointKey.
Points< NekDouble > PointsBaseType
Definition: PolyEPoints.h:58
const boost::shared_ptr< NekMatrix< NekDouble > > GetI(const PointsKey &pkey)
PolyEPoints()
Default constructor should not be called except by Create method.
Definition: PolyEPoints.h:76
#define LIB_UTILITIES_EXPORT
static std::string npts
Definition: InputFld.cpp:43
Defines a specification for a set of points.
Definition: Points.h:58
double NekDouble
static boost::shared_ptr< PointsBaseType > Create(const PointsKey &key)
void CalculateInterpMatrix(unsigned int npts, const Array< OneD, const NekDouble > &xpoints, Array< OneD, NekDouble > &interp)
PolyEPoints(const PolyEPoints &points)
Copy constructor should not be called.
Definition: PolyEPoints.h:81
NekDouble LagrangeInterpolant(NekDouble x, int npts, const Array< OneD, const NekDouble > &xpts, const Array< OneD, const NekDouble > &funcvals)
NekDouble LagrangePoly(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
NekDouble LagrangePolyDeriv(NekDouble x, int pt, int npts, const Array< OneD, const NekDouble > &xpts)
PolyEPoints(const PointsKey &key)
Definition: PolyEPoints.h:70