51 return exp->GetExp(i);
56 std::ofstream out(filename.c_str());
57 exp->WriteVtkHeader(out);
58 for (
int i = 0; i < exp->GetExpSize(); ++i)
60 exp->WriteVtkPieceHeader(out, i);
61 exp->WriteVtkPieceFooter(out, i);
63 exp->WriteVtkFooter(out);
71 exp->FwdTrans(in, out);
80 exp->BwdTrans(in, out);
89 exp->IProductWRTBase(in, out);
98 exp->MultiplyByInvMassMatrix(in, out,
eLocal);
105 const py::object constFactorMap,
106 const py::object varCoeffMap)
113 if (!constFactorMap.is_none())
115 facMap = py::extract<StdRegions::ConstFactorMap>(constFactorMap);
117 if (!varCoeffMap.is_none())
119 coeffMap = py::extract<StdRegions::VarCoeffMap>(varCoeffMap);
124 exp->HelmSolve(in, out, notUsed, facMap, coeffMap);
140 return exp->L2(in, err);
147 return exp->Linf(in);
155 return exp->Linf(in, err);
160 int nPhys = exp->GetNpoints();
161 int coordim = exp->GetCoordim(0);
163 std::vector<Array<OneD, NekDouble> > coords(coordim);
164 for (
int i = 0; i < coordim; ++i)
172 exp->GetCoords(coords[0]);
173 return py::make_tuple(coords[0]);
176 exp->GetCoords(coords[0], coords[1]);
177 return py::make_tuple(coords[0], coords[1]);
180 exp->GetCoords(coords[0], coords[1], coords[2]);
181 return py::make_tuple(coords[0], coords[1], coords[2]);
192 exp->SetPhysArray(inarray);
199 exp->SetPhys(inarray);
204 return exp->GetPhys();
209 return exp->PhysIntegral();
214 std::stringstream ss;
215 ss << static_cast<const void*>(&(exp->GetPhys()[0]));
221 exp->ClearGlobalLinSysManager();
235 std::shared_ptr<ExpList>,
237 "ExpList", py::no_init)
245 .def(
"GetNcoeffs", GetNcoeffs)
260 py::arg(
"constFactorMap") = py::object(),
261 py::arg(
"varCoeffMap") = py::object()
Array< OneD, NekDouble > ExpList_MultiplyByInvMassMatrix(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)
Array< OneD, NekDouble > ExpList_FwdTrans(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)
Array< OneD, NekDouble > ExpList_HelmSolve(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in, const py::object constFactorMap, const py::object varCoeffMap)
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
NekDouble ExpList_L2(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)
NekDouble ExpList_Linf_Error(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in, const Array< OneD, const NekDouble > &err)
int GetNpoints(void) const
Returns the total number of quadrature points m_npoints .
ExpansionSharedPtr ExpList_GetExp(ExpListSharedPtr exp, int i)
void ExpList_ResetManagers(ExpListSharedPtr exp)
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::string ExpList_GetPhysAddress(ExpListSharedPtr exp)
int GetExpSize(void)
This function returns the number of elements in the expansion.
void ExpList_SetPhys(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &inarray)
NekDouble ExpList_L2_Error(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in, const Array< OneD, const NekDouble > &err)
Base class for all multi-elemental spectral/hp expansions.
bool GetPhysState(void) const
This function indicates whether the array of physical values (implemented as m_phys) is filled or no...
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
NekDouble ExpList_PhysIntegral(ExpListSharedPtr exp)
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
const Array< OneD, const NekDouble > ExpList_GetPhys(ExpListSharedPtr exp)
py::tuple ExpList_GetCoords(ExpListSharedPtr exp)
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &phys)
std::shared_ptr< Expansion > ExpansionSharedPtr
Array< OneD, NekDouble > ExpList_IProductWRTBase(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)
The namespace associated with the the StdRegions library (StdRegions introduction) ...
void SetPhysState(const bool physState)
This function manually sets whether the array of physical values (implemented as m_phys) is filled o...
Used to lookup the create function in NekManager.
Array< OneD, NekDouble > ExpList_BwdTrans(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
void ExpList_WriteVTK(ExpListSharedPtr exp, std::string filename)
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
void ExpList_SetPhysArray(ExpListSharedPtr exp, Array< OneD, NekDouble > inarray)
static VarCoeffMap NullVarCoeffMap
static ConstFactorMap NullConstFactorMap
NekDouble ExpList_Linf(ExpListSharedPtr exp, const Array< OneD, const NekDouble > &in)