mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: put tracer batches in an array
now we can easily iterate over them
This commit is contained in:
parent
0d1c989a25
commit
9a88f56e7d
@ -51,8 +51,6 @@ namespace Opm {
|
|||||||
* \ingroup EclBlackOilSimulator
|
* \ingroup EclBlackOilSimulator
|
||||||
*
|
*
|
||||||
* \brief A class which handles tracers as specified in by ECL
|
* \brief A class which handles tracers as specified in by ECL
|
||||||
*
|
|
||||||
* TODO: MPI parallelism.
|
|
||||||
*/
|
*/
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class EclTracerModel : public EclGenericTracerModel<GetPropType<TypeTag, Properties::Grid>,
|
class EclTracerModel : public EclGenericTracerModel<GetPropType<TypeTag, Properties::Grid>,
|
||||||
@ -94,9 +92,10 @@ public:
|
|||||||
simulator.model().dofMapper(),
|
simulator.model().dofMapper(),
|
||||||
simulator.vanguard().cellCentroids())
|
simulator.vanguard().cellCentroids())
|
||||||
, simulator_(simulator)
|
, simulator_(simulator)
|
||||||
, wat_(TracerBatch<TracerVector>(waterPhaseIdx))
|
, tbatch({waterPhaseIdx, oilPhaseIdx, gasPhaseIdx})
|
||||||
, oil_(TracerBatch<TracerVector>(oilPhaseIdx))
|
, wat_(tbatch[0])
|
||||||
, gas_(TracerBatch<TracerVector>(gasPhaseIdx))
|
, oil_(tbatch[1])
|
||||||
|
, gas_(tbatch[2])
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
@ -478,7 +477,7 @@ protected:
|
|||||||
Simulator& simulator_;
|
Simulator& simulator_;
|
||||||
|
|
||||||
// This struct collects tracers of the same type (i.e, transported in same phase).
|
// This struct collects tracers of the same type (i.e, transported in same phase).
|
||||||
// The idea beeing that, under the assumption of linearity, tracers of same type can
|
// The idea being that, under the assumption of linearity, tracers of same type can
|
||||||
// be solved in concert, having a common system matrix but separate right-hand-sides.
|
// be solved in concert, having a common system matrix but separate right-hand-sides.
|
||||||
|
|
||||||
// Since oil or gas tracers appears in dual compositions when VAPOIL respectively DISGAS
|
// Since oil or gas tracers appears in dual compositions when VAPOIL respectively DISGAS
|
||||||
@ -509,9 +508,10 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TracerBatch<TracerVector> wat_;
|
std::array<TracerBatch<TracerVector>,3> tbatch;
|
||||||
TracerBatch<TracerVector> oil_;
|
TracerBatch<TracerVector>& wat_;
|
||||||
TracerBatch<TracerVector> gas_;
|
TracerBatch<TracerVector>& oil_;
|
||||||
|
TracerBatch<TracerVector>& gas_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user