FEM: Draft architecture of post data extraction with histogram example

This commit is contained in:
Stefan Tröger
2025-03-31 20:11:09 +02:00
parent ce54149637
commit ac02a222ff
51 changed files with 4228 additions and 14 deletions

View File

@@ -34,6 +34,10 @@
#include "FemPostPipelinePy.cpp"
// clang-format on
#ifdef BUILD_FEM_VTK_WRAPPER
#include <vtkPythonUtil.h>
#endif //BUILD_FEM_VTK
using namespace Fem;
@@ -313,6 +317,25 @@ PyObject* FemPostPipelinePy::renameArrays(PyObject* args)
Py_Return;
}
PyObject* FemPostPipelinePy::getOutputAlgorithm(PyObject* args)
{
#ifdef BUILD_FEM_VTK_WRAPPER
// we take no arguments
if (!PyArg_ParseTuple(args, "")) {
return nullptr;
}
// return python object for the algorithm
auto algorithm = getFemPostPipelinePtr()->getOutputAlgorithm();
PyObject* py_algorithm = vtkPythonUtil::GetObjectFromPointer(algorithm);
return Py::new_reference_to(py_algorithm);
#else
PyErr_SetString(PyExc_NotImplementedError, "VTK python wrapper not available");
Py_Return;
#endif
}
PyObject* FemPostPipelinePy::getCustomAttributes(const char* /*attr*/) const
{
return nullptr;