45 exp->FwdTrans(in, out);
53 exp->BwdTrans(in, out);
61 exp->IProductWRTBase(in, out);
69 return exp->PhysEvaluate(coords, physvals);
82 return exp->L2(in, err);
87 int nPhys = exp->GetTotPoints();
88 int coordim = exp->GetCoordim();
90 std::vector<Array<OneD, NekDouble>> coords(coordim);
91 for (
int i = 0; i < coordim; ++i)
99 exp->GetCoords(coords[0]);
100 return py::make_tuple(coords[0]);
103 exp->GetCoords(coords[0], coords[1]);
104 return py::make_tuple(coords[0], coords[1]);
107 exp->GetCoords(coords[0], coords[1], coords[2]);
108 return py::make_tuple(coords[0], coords[1], coords[2]);
118 int nPhys = exp->GetTotPoints();
119 int coordim = exp->GetCoordim();
121 std::vector<Array<OneD, NekDouble>> derivs(coordim);
122 for (
int i = 0; i < coordim; ++i)
130 exp->PhysDeriv(inarray, derivs[0]);
131 return py::make_tuple(derivs[0]);
134 exp->PhysDeriv(inarray, derivs[0], derivs[1]);
135 return py::make_tuple(derivs[0], derivs[1]);
138 exp->PhysDeriv(inarray, derivs[0], derivs[1], derivs[2]);
139 return py::make_tuple(derivs[0], derivs[1], derivs[2]);
148 py::class_<StdExpansion, std::shared_ptr<StdExpansion>, boost::noncopyable>(
149 "StdExpansion", py::no_init)
162 py::return_value_policy<py::copy_const_reference>())
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)
Array< OneD, NekDouble > StdExpansion_IProductWRTBase(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
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)
void export_StdExpansion()
Array< OneD, NekDouble > StdExpansion_FwdTrans(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
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.
const LibUtilities::BasisSharedPtr & GetBasis(int dir) const
This function gets the shared point to basis in the dir direction.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
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.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
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.
The namespace associated with the the StdRegions library (StdRegions introduction)
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
The above copyright notice and this permission notice shall be included.