19#ifndef OPM_PY_MATERIAL_STATE_IMPL_HEADER_INCLUDED
20#define OPM_PY_MATERIAL_STATE_IMPL_HEADER_INCLUDED
23#ifndef OPM_PY_MATERIAL_STATE_HEADER_INCLUDED
25#include <opm/simulators/flow/python/PyMaterialState.hpp>
28#include <fmt/format.h>
30namespace Opm::Pybind {
32template <
class TypeTag>
34PyMaterialState<TypeTag>::
37 Model& model = this->simulator_->model();
38 const auto size = model.numGridDof();
39 std::vector<double>
array(size);
46template <
class TypeTag>
48PyMaterialState<TypeTag>::
51 Problem& problem = this->simulator_->problem();
52 Model& model = this->simulator_->model();
53 const auto size = model.numGridDof();
54 std::vector<double>
array(size);
61template <
class TypeTag>
63PyMaterialState<TypeTag>::
64setPorosity(
const double* poro, std::size_t size)
66 Problem& problem = this->simulator_->problem();
67 Model& model = this->simulator_->model();
70 const std::string
msg = fmt::format(
71 "Cannot set porosity. Expected array of size: {}, got array of size: ",
74 throw std::runtime_error(
msg);
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240