48 exp->FwdTrans(in, out);
56 exp->BwdTrans(in, out);
64 exp->IProductWRTBase(in, out);
72 return exp->PhysEvaluate(coords, physvals);
85 return exp->L2(in, err);
90 int nPhys = exp->GetTotPoints();
91 int coordim = exp->GetCoordim();
93 std::vector<Array<OneD, NekDouble>> coords(coordim);
94 for (
int i = 0; i < coordim; ++i)
102 exp->GetCoords(coords[0]);
103 return py::make_tuple(coords[0]);
106 exp->GetCoords(coords[0], coords[1]);
107 return py::make_tuple(coords[0], coords[1]);
110 exp->GetCoords(coords[0], coords[1], coords[2]);
111 return py::make_tuple(coords[0], coords[1], coords[2]);
121 int nPhys = exp->GetTotPoints();
122 int coordim = exp->GetCoordim();
124 std::vector<Array<OneD, NekDouble>> derivs(coordim);
125 for (
int i = 0; i < coordim; ++i)
133 exp->PhysDeriv(inarray, derivs[0]);
134 return py::make_tuple(derivs[0]);
137 exp->PhysDeriv(inarray, derivs[0], derivs[1]);
138 return py::make_tuple(derivs[0], derivs[1]);
141 exp->PhysDeriv(inarray, derivs[0], derivs[1], derivs[2]);
142 return py::make_tuple(derivs[0], derivs[1], derivs[2]);
152 auto mat = stdExp->GenMatrix(mkey);
156 return py::array({mat->GetRows(), mat->GetColumns()},
164 auto mat = stdExp->GetStdMatrix(mkey);
165 return py::array({mat->GetRows(), mat->GetColumns()},
172 py::class_<StdExpansion, std::shared_ptr<StdExpansion>>(m,
"StdExpansion")
NekDouble StdExpansion_L2_Error(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in, const Array< OneD, const NekDouble > &err)
py::tuple StdExpansion_PhysDeriv(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &inarray)
py::array StdExpansion_GetStdMatrix(std::shared_ptr< StdExpansion > &stdExp, const StdMatrixKey &mkey)
Array< OneD, NekDouble > StdExpansion_FwdTrans(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
void export_StdExpansion(py::module &m)
NekDouble StdExpansion_L2(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
py::tuple StdExpansion_GetCoords(StdExpansionSharedPtr exp)
Array< OneD, NekDouble > StdExpansion_BwdTrans(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
NekDouble StdExpansion_PhysEvaluate(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
py::array StdExpansion_GenMatrix(std::shared_ptr< StdExpansion > &stdExp, const StdMatrixKey &mkey)
Array< OneD, NekDouble > StdExpansion_IProductWRTBase(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
int GetNtraces() const
Returns the number of trace elements connected to this element.
int GetNverts() const
This function returns the number of vertices of the expansion domain.
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
int GetShapeDimension() const
NekDouble Integral(const Array< OneD, const NekDouble > &inarray)
This function integrates the specified function over the domain.
std::shared_ptr< StdExpansion > StdExpansionSharedPtr