opm-simulators
EmptyModel.hpp
1 /*
2  Copyright 2024, SINTEF Digital
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_EMPTY_MODEL_HPP
21 #define OPM_EMPTY_MODEL_HPP
22 
23 // this is an empty model that having a lot of empty interfaces.
24 // it is use for the development when some facility class are not ready
25 
26 #include <opm/output/data/Aquifer.hpp>
27 
29 
30 namespace Opm {
31 
32 template<typename TypeTag>
33 class EmptyModel : public BaseAuxiliaryModule<TypeTag>
34 {
39 
40 public:
42  explicit EmptyModel(Simulator& /*simulator*/)
43  {
44  }
45 
46  void init(){}
47  template<class Something>
48  void init(Something /*A*/){}
49  void prepareTracerBatches(){};
50  using NeighborSet = std::set<unsigned>;
51  void linearize(SparseMatrixAdapter& /*matrix*/, GlobalEqVector& /*residual*/) override {}
52  unsigned numDofs() const override { return 0; }
53  void addNeighbors(std::vector<NeighborSet>& /*neighbors*/) const override {}
54  void initialSolutionApplied(){};
55  template <class Restarter>
56  void serialize(Restarter& /*res*/){};
57 
58  template <class Restarter>
59  void deserialize(Restarter& /*res*/){};
60 
61  // no state to round-trip through OPMRST files
62  template<class Serializer>
63  void serializeOp(Serializer& /*serializer*/){};
64 
65  void beginEpisode(){};
66  void beginTimeStep(){};
67  void beginIteration(){};
68  // add the water rate due to aquifers to the source term.
69  template<class RateVector, class Context>
70  void addToSource(RateVector& /*rates*/, const Context& /*context*/,
71  unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const {}
72  template<class RateVector>
73  void addToSource(RateVector& /*rates*/, unsigned /*globalSpaceIdx*/,
74  unsigned /*timeIdx*/) const {}
75  void endIteration()const{};
76  void endTimeStep(){};
77  void endEpisode(){};
78  void applyInitial() override {}
79  auto aquiferData() const {
80  return data::Aquifers{};
81  }
82 };
83 
84 } // end of namespace Opm
85 
86 #endif // OPM_EMPTY_MODEL_HPP
void applyInitial() override
Set the initial condition of the auxiliary module in the solution vector.
Definition: EmptyModel.hpp:78
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
Base class for specifying auxiliary equations.
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
void addNeighbors(std::vector< NeighborSet > &) const override
Specify the additional neighboring correlations caused by the auxiliary module.
Definition: EmptyModel.hpp:53
unsigned numDofs() const override
Returns the number of additional degrees of freedom required for the auxiliary module.
Definition: EmptyModel.hpp:52
void linearize(SparseMatrixAdapter &, GlobalEqVector &) override
Linearize the auxiliary equation.
Definition: EmptyModel.hpp:51
Definition: EmptyModel.hpp:33
Base class for specifying auxiliary equations.
Definition: baseauxiliarymodule.hh:55