My Project
PyMaterialState.hpp
1 /*
2  Copyright 2020 Equinor ASA.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_PY_MATERIAL_STATE_HEADER_INCLUDED
21 #define OPM_PY_MATERIAL_STATE_HEADER_INCLUDED
22 
23 #include <opm/models/utils/propertysystem.hh>
24 
25 #include <exception>
26 #include <iostream>
27 #include <map>
28 #include <memory>
29 #include <string>
30 #include <vector>
31 
32 namespace Opm::Pybind
33 {
34  template <class TypeTag>
36  using Simulator = GetPropType<TypeTag, Opm::Properties::Simulator>;
37  using Problem = GetPropType<TypeTag, Opm::Properties::Problem>;
38  using Model = GetPropType<TypeTag, Opm::Properties::Model>;
39  using ElementContext = GetPropType<TypeTag, Opm::Properties::ElementContext>;
40  using FluidSystem = GetPropType<TypeTag, Opm::Properties::FluidSystem>;
41  using Indices = GetPropType<TypeTag, Opm::Properties::Indices>;
42  using GridView = GetPropType<TypeTag, Opm::Properties::GridView>;
43 
44  public:
45  PyMaterialState(Simulator *ebosSimulator)
46  : ebosSimulator_(ebosSimulator) { }
47 
48  std::unique_ptr<double []> getCellVolumes( std::size_t *size);
49  std::unique_ptr<double []> getPorosity( std::size_t *size);
50  void setPorosity(const double *poro, std::size_t size);
51  private:
52  Simulator *ebosSimulator_;
53  };
54 
55 }
56 #include "PyMaterialState_impl.hpp"
57 
58 #endif // OPM_PY_MATERIAL_STATE_HEADER_INCLUDED
Definition: PyMaterialState.hpp:35