OGS
|
A source term whose values are computed by a Python script.
Definition at line 44 of file PythonSourceTerm.h.
#include <PythonSourceTerm.h>
Public Member Functions | |
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) | |
void | integrate (const double t, GlobalVector const &x, GlobalVector &b, GlobalMatrix *jac) const override |
Public Member Functions inherited from ProcessLib::SourceTerm | |
SourceTerm (std::unique_ptr< NumLib::LocalToGlobalIndexMap > source_term_dof_table) | |
virtual | ~SourceTerm ()=default |
Private Attributes | |
PythonStData | _source_term_data |
Auxiliary data used by the local assemblers. | |
std::vector< std::unique_ptr< PythonSourceTermLocalAssemblerInterface > > | _local_assemblers |
Local assemblers for all elements of the source term mesh. | |
bool const | _flush_stdout |
Additional Inherited Members | |
Protected Attributes inherited from ProcessLib::SourceTerm | |
std::unique_ptr< NumLib::LocalToGlobalIndexMap > const | _source_term_dof_table |
|
explicit |
Definition at line 30 of file PythonSourceTerm.cpp.
References _local_assemblers, _source_term_data, ProcessLib::SourceTerm::_source_term_dof_table, ProcessLib::BoundaryConditionAndSourceTerm::Python::BcOrStData< BcOrStPythonSideInterface >::bc_or_st_mesh, ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblersPython(), MeshLib::Mesh::getElements(), and MeshLib::Mesh::isAxiallySymmetric().
|
overridevirtual |
Implements ProcessLib::SourceTerm.
Definition at line 47 of file PythonSourceTerm.cpp.
References _flush_stdout, _local_assemblers, ProcessLib::SourceTerm::_source_term_dof_table, ProcessLib::SourceTerms::Python::PythonSourceTermLocalAssemblerInterface::assemble(), NumLib::SerialExecutor::executeMemberOnDereferenced(), and OGS_FATAL.
|
private |
Whether or not to flush standard output before and after each call to Python code. Ensures right order of output messages and therefore simplifies debugging.
Definition at line 66 of file PythonSourceTerm.h.
Referenced by integrate().
|
private |
Local assemblers for all elements of the source term mesh.
Definition at line 61 of file PythonSourceTerm.h.
Referenced by PythonSourceTerm(), and integrate().
|
private |
Auxiliary data used by the local assemblers.
Definition at line 57 of file PythonSourceTerm.h.
Referenced by PythonSourceTerm().