14#include <pybind11/pybind11.h>
31 std::unique_ptr<NumLib::LocalToGlobalIndexMap> source_term_dof_table,
32 PythonStData&& source_term_data,
unsigned const integration_order,
33 unsigned const global_dim,
bool const flush_stdout)
34 :
SourceTerm(std::move(source_term_dof_table)),
35 _source_term_data(std::move(source_term_data)),
36 _flush_stdout(flush_stdout)
58 catch (pybind11::error_already_set
const& e)
60 OGS_FATAL(
"Error evaluating source term in Python: {}", e.what());
Global vector based on Eigen vector.
bool isAxiallySymmetric() const
std::vector< Element * > const & getElements() const
Get the element-vector for the mesh.
std::unique_ptr< NumLib::LocalToGlobalIndexMap > const _source_term_dof_table
virtual void assemble(std::size_t const source_term_element_id, NumLib::LocalToGlobalIndexMap const &source_term_dof_table, double const t, const GlobalVector &x, GlobalVector &b, GlobalMatrix *Jac)=0
PythonSourceTerm(std::unique_ptr< NumLib::LocalToGlobalIndexMap > source_term_dof_table, PythonStData &&source_term_data, unsigned const integration_order, unsigned const global_dim, bool const flush_stdout)
std::vector< std::unique_ptr< PythonSourceTermLocalAssemblerInterface > > _local_assemblers
Local assemblers for all elements of the source term mesh.
void integrate(const double t, GlobalVector const &x, GlobalVector &b, GlobalMatrix *jac) const override
PythonStData _source_term_data
Auxiliary data used by the local assemblers.
void createLocalAssemblersPython(const unsigned dimension, std::vector< MeshLib::Element * > const &mesh_elements, NumLib::LocalToGlobalIndexMap const &dof_table, std::vector< std::unique_ptr< LocalAssemblerInterface > > &local_assemblers, NumLib::IntegrationOrder const integration_order, ExtraCtorArgs &&... extra_ctor_args)
static void executeMemberOnDereferenced(Method method, Container const &container, Args &&... args)
MeshLib::Mesh const & bc_or_st_mesh
The domain, where this BC or ST will be applied.