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)
151 .def(
"GetNcoeffs", &StdExpansion::GetNcoeffs)
152 .def(
"GetTotPoints", &StdExpansion::GetTotPoints)
153 .def(
"GetBasisType", &StdExpansion::GetBasisType)
154 .def(
"GetPointsType", &StdExpansion::GetPointsType)
155 .def(
"GetNverts", &StdExpansion::GetNverts)
156 .def(
"GetNtraces", &StdExpansion::GetNtraces)
157 .def(
"DetShapeType", &StdExpansion::DetShapeType)
158 .def(
"GetShapeDimension", &StdExpansion::GetShapeDimension)
159 .def(
"Integral", &StdExpansion::Integral)
161 .def(
"GetBasis", &StdExpansion::GetBasis,
162 py::return_value_policy<py::copy_const_reference>())
164 .def(
"GenMatrix", &StdExpansion::GenMatrix)
165 .def(
"GetStdMatrix", &StdExpansion::GetStdMatrix)
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_FwdTrans(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_IProductWRTBase(StdExpansionSharedPtr exp, const Array< OneD, const NekDouble > &in)
std::shared_ptr< StdExpansion > StdExpansionSharedPtr