Files
SERiF/src/python/mfem/Trampoline/PyMFEMTrampolines/Coefficient/PyCoefficient.h

27 lines
867 B
C++

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h> // Needed for std::function
#include <memory>
#include "mfem.hpp"
namespace py = pybind11;
using namespace mfem;
namespace serif::pybind {
// --- Trampoline for the abstract Coefficient base class ---
class PyCoefficient : public Coefficient {
public:
using Coefficient::Coefficient;
real_t Eval(ElementTransformation &T, const IntegrationPoint &ip) override;
void SetTime(real_t t) override;
};
// --- Trampoline for the abstract VectorCoefficient base class ---
class PyVectorCoefficient : public VectorCoefficient {
public:
using VectorCoefficient::VectorCoefficient;
void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip) override;
void SetTime(real_t t) override;
};
}