54 return py::make_tuple(pts->GetZ(), pts->GetW());
64 return pts->GetD(dir);
74 "Characterise the type of points.\n"
76 "Sample usage: PointsType.GaussLobattoLegendre\n"
78 "Available point types:\n"
79 "\tNoPointsType: No points type.\n"
80 "\tGaussGaussLegendre: 1D Gauss-Gauss-Legendre quadrature points.\n"
81 "\tGaussRadauMLegendre: 1D Gauss-Radau-Legendre quadrature points,\n"
82 "\t\tpinned at x=-1.\n"
83 "\tGaussRadauPLegendre: 1D Gauss-Radau-Legendre quadrature points,\n"
84 "\t\tpinned at x=1.\n"
85 "\tGaussLobattoLegendre: 1D Gauss-Lobatto-Legendre quadrature points.\n"
86 "\tGaussGaussChebyshev: 1D Gauss-Gauss-Chebyshev quadrature points.\n"
87 "\tGaussRadauMChebyshev: 1D Gauss-Radau-Chebyshev quadrature points,\n"
88 "\t\tpinned at x=-1.\n"
89 "\tGaussRadauPChebyshev: 1D Gauss-Radau-Chebyshev quadrature points,\n"
90 "\t\tpinned at x=1.\n"
91 "\tGaussLobattoChebyshev: 1D Gauss-Lobatto-Legendre quadrature points\n"
92 "\tGaussRadauMAlpha0Beta1: Gauss Radau pinned at x=-1,\n"
93 "\t\talpha = 0, beta = 1\n"
94 "\tGaussRadauMAlpha0Beta2: Gauss Radau pinned at x=-1,\n"
95 "\t\talpha = 0, beta = 2\n"
96 "\tGaussRadauMAlpha1Beta0: Gauss Radau pinned at x=-1,\n"
97 "\t\talpha = 1, beta = 0\n"
98 "\tGaussRadauMAlpha2Beta0: Gauss Radau pinned at x=-1,\n"
99 "\t\talpha = 2, beta = 0\n"
100 "\tGaussKronrodLegendre: 1D Gauss-Kronrod-Legendre quadrature points.\n"
101 "\tGaussRadauKronrodMLegendre: 1D Gauss-Radau-Kronrod-Legendre "
103 "\t\tpoints, pinned at x=-1.\n"
104 "\tGaussRadauKronrodMAlpha1Beta0: 1D Gauss-Radau-Kronrod-Legendre\n"
105 "\t\tpinned at x=-1, alpha = 1, beta = 0\n"
106 "\tGaussLobattoKronrodLegendre: 1D Lobatto Kronrod quadrature points.\n"
107 "\tPolyEvenlySpaced: 1D Evenly-spaced points using Lagrange "
109 "\tFourierEvenlySpaced: 1D Evenly-spaced points using Fourier Fit.\n"
110 "\tFourierSingleModeSpaced: 1D Non Evenly-spaced points for Single "
113 "\tBoundaryLayerPoints: 1D power law distribution for boundary layer "
115 "\tBoundaryLayerPointsRev: 1D power law distribution for boundary "
118 "\tNodalTriElec: 2D Nodal Electrostatic Points on a Triangle.\n"
119 "\tNodalTriFekete: 2D Nodal Fekete Points on a Triangle.\n"
120 "\tNodalTriEvenlySpaced: 2D Evenly-spaced points on a Triangle.\n"
121 "\tNodalTetEvenlySpaced: 3D Evenly-spaced points on a Tetrahedron.\n"
122 "\tNodalTetElec: 3D Nodal Electrostatic Points on a Tetrahedron.\n"
123 "\tNodalPrismEvenlySpaced: 3D Evenly-spaced points on a Prism.\n"
124 "\tNodalPrismElec: 3D electrostatically spaced points on a Prism.\n"
125 "\tNodalTriSPI: 2D Nodal Symmetric positive internal triangle\n"
126 "\t\t(Whitherden, Vincent).\n"
127 "\tNodalTetSPI: 3D Nodal Symmetric positive internal tet\n"
128 "\t\t(Whitherden, Vincent).\n"
129 "\tNodalPrismSPI: 3D prism SPI.\n"
130 "\tNodalQuadElec: 2D GLL for quad.\n"
131 "\tNodalHexElec: 3D GLL for hex");
133 py::class_<PointsKey>(
135 "Create a PointsKey which uniquely defines quadrature points.\n"
138 "\tnQuadPoints (integer): The number of quadrature points.\n"
139 "\tpointsType (PointsType object): The type of quadrature points.",
140 py::init<const int, const PointsType &>())
142 .def(
"GetNumPoints", &PointsKey::GetNumPoints,
143 "Get the number of quadrature points in PointsKey.\n"
148 "\tInteger defining the number of quadrature points in PointsKey.")
149 .def(
"GetPointsType", &PointsKey::GetPointsType,
150 "Get the type of points in PointsKey.\n"
155 "\tPointsType object specifying the type of points in PointsKey.")
156 .def(
"GetPointsDim", &PointsKey::GetPointsDim,
157 "Get the dimension of the PointsKey.\n"
162 "\tInteger characterising the dimension of the PointsKey (e.g. 2\n"
163 "\tfor 2D PointsKey).")
164 .def(
"GetTotNumPoints", &PointsKey::GetTotNumPoints,
165 "Get the total number of points in PointsKey.\n"
170 "\tInteger defining the total number of points in PointsKey.");
172 py::class_<Points<double>, std::shared_ptr<Points<double>>,
175 "Create a set of points which can be used to calculate\n"
176 "quadrature zeros, weights etc."
182 "Create a Points object using PointsKey.\n"
185 "\tpointsKey (PointsKey object): The PointsKey to be used to\n"
188 "\tPoints object created with the given PointsKey.")
189 .staticmethod(
"Create")
192 "Initialise Points object by calculating points, weights\n"
193 "and differentiation matrix.\n"
200 "Get the dimension of the Points object.\n"
205 "\tInteger characterising the dimension of the Points object\n"
206 "\t(e.g. 2 for 2D Points object).")
208 "Get the type of points in Points object.\n"
213 "\tPointsType object specifying the type of points in Points\n"
216 "Get the number of quadrature points in Points object.\n"
221 "\tInteger defining the number of quadrature points in Points\n"
224 "Get the total number of points in Points object.\n"
229 "\tInteger defining the total number of points in Points\n"
233 py::return_value_policy<py::copy_const_reference>(),
234 "Get quadrature zeros.\n"
239 "\tNumPy ndarray of length equal to the number of quadrature\n"
240 "\tpoints, containing quadrature zeros.")
242 py::return_value_policy<py::copy_const_reference>(),
243 "Get quadrature weights.\n"
248 "\tNumPy ndarray of length equal to the number of quadrature\n"
249 "\tpoints, containing quadrature weights.")
251 "Get quadrature zeros and weights.\n"
256 "\tTuple containing the quadrature zeros and quadrature weights,\n"
257 "\ti.e. (Points.GetZ(), Points.GetW()).")
259 "Get the differentiation matrix.\n"
264 "\tNumPy ndarray of n x n dimensions, where n is equal to\n"
265 "\tthe number of quadrature points, containing the\n"
266 "\tdifferentiation matrix.")
268 "Get the differentiation matrix.\n"
271 "\tdir (Direction object): The direction of the desired\n"
272 "\tdifferentiation matrix.\n"
274 "\tNumPy ndarray of n x n dimensions, where n is equal to\n"
275 "\tthe number of quadrature points containing the\n"
276 "\tdifferentiation matrix.");
#define NEKPY_WRAP_ENUM_STRING_DOCS(ENUMNAME, MAPNAME, DOCSTRING)
py::tuple Points_GetZW(PointsSharedPtr pts)
MatrixSharedPtrType Points_GetD(PointsSharedPtr pts)
std::shared_ptr< NekMatrix< NekDouble > > MatrixSharedPtrType
std::shared_ptr< Points< double > > PointsSharedPtr
void export_Points()
Points exports.
PointsSharedPtr Points_Create(const PointsKey &pts)
MatrixSharedPtrType Points_GetD2(PointsSharedPtr pts, Direction dir)
Stores a set of points of datatype DataT, defined by a PointKey.
Defines a specification for a set of points.
std::shared_ptr< Points< NekDouble > > PointsSharedPtr
const std::string kPointsTypeStr[]
PointsManagerT & PointsManager(void)