OGS
PythonSourceTerm.h
Go to the documentation of this file.
1 
11 #pragma once
12 
16 
17 namespace ProcessLib
18 {
19 class LocalToGlobalIndexMap;
20 }
21 
22 namespace ProcessLib
23 {
24 namespace SourceTerms
25 {
26 namespace Python
27 {
30 {
33 
37 
40 
42  std::size_t const source_term_mesh_id;
43 };
44 
47 {
48 public:
49  explicit PythonSourceTerm(
50  std::unique_ptr<NumLib::LocalToGlobalIndexMap> source_term_dof_table,
51  PythonSourceTermData&& source_term_data,
52  unsigned const integration_order, unsigned const shapefunction_order,
53  unsigned const global_dim, bool const flush_stdout);
54 
55  void integrate(const double t, GlobalVector const& x, GlobalVector& b,
56  GlobalMatrix* jac) const override;
57 
58 private:
61 
63  std::vector<std::unique_ptr<PythonSourceTermLocalAssemblerInterface>>
65 
69  bool const _flush_stdout;
70 };
71 
72 } // namespace Python
73 } // namespace SourceTerms
74 } // namespace ProcessLib
Global vector based on Eigen vector.
Definition: EigenVector.h:26
A source term whose values are computed by a Python script.
std::vector< std::unique_ptr< PythonSourceTermLocalAssemblerInterface > > _local_assemblers
Local assemblers for all elements of the source term mesh.
PythonSourceTerm(std::unique_ptr< NumLib::LocalToGlobalIndexMap > source_term_dof_table, PythonSourceTermData &&source_term_data, unsigned const integration_order, unsigned const shapefunction_order, unsigned const global_dim, bool const flush_stdout)
PythonSourceTermData _source_term_data
Auxiliary data.
void integrate(const double t, GlobalVector const &x, GlobalVector &b, GlobalMatrix *jac) const override
Groups data used by source terms, in particular by the local assemblers.
std::size_t const source_term_mesh_id
Mesh ID of the entire domain.
PythonSourceTermPythonSideInterface * source_term_object
Python object computing source term values.
const MeshLib::Mesh & source_term_mesh
The source term mesh, i.e., the (sub-) domain of this source term.