![]() |
OGS
|
|
A source term whose values are computed by a Python script.
Definition at line 37 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) | |
| Public Member Functions inherited from ProcessLib::SourceTermBase | |
| virtual | ~SourceTermBase ()=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 23 of file PythonSourceTerm.cpp.
References ProcessLib::SourceTerm::SourceTerm(), _flush_stdout, _local_assemblers, _source_term_data, ProcessLib::SourceTerm::_source_term_dof_table, and ProcessLib::BoundaryConditionAndSourceTerm::createLocalAssemblersPython().
|
overridevirtual |
Implements ProcessLib::SourceTermBase.
Definition at line 40 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 59 of file PythonSourceTerm.h.
Referenced by PythonSourceTerm(), and integrate().
|
private |
Local assemblers for all elements of the source term mesh.
Definition at line 54 of file PythonSourceTerm.h.
Referenced by PythonSourceTerm(), and integrate().
|
private |
Auxiliary data used by the local assemblers.
Definition at line 50 of file PythonSourceTerm.h.
Referenced by PythonSourceTerm().