mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
EclTracerModel: move code using WellTracerProperties to compile unit
This commit is contained in:
parent
325963fb63
commit
188d19fcf0
@ -34,6 +34,8 @@
|
|||||||
#include <opm/input/eclipse/EclipseState/Phase.hpp>
|
#include <opm/input/eclipse/EclipseState/Phase.hpp>
|
||||||
#include <opm/input/eclipse/EclipseState/Tables/TracerVdTable.hpp>
|
#include <opm/input/eclipse/EclipseState/Tables/TracerVdTable.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/Well/WellTracerProperties.hpp>
|
||||||
|
|
||||||
#include <dune/istl/operators.hh>
|
#include <dune/istl/operators.hh>
|
||||||
#include <dune/istl/solvers.hh>
|
#include <dune/istl/solvers.hh>
|
||||||
#include <dune/istl/schwarz.hh>
|
#include <dune/istl/schwarz.hh>
|
||||||
@ -70,6 +72,7 @@ struct TracerSolverSelector
|
|||||||
using TracerOperator = Dune::OverlappingSchwarzOperator<M, V, V, Comm>;
|
using TracerOperator = Dune::OverlappingSchwarzOperator<M, V, V, Comm>;
|
||||||
using type = Dune::FlexibleSolver<TracerOperator>;
|
using type = Dune::FlexibleSolver<TracerOperator>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Vector, class Grid, class Matrix>
|
template<class Vector, class Grid, class Matrix>
|
||||||
std::tuple<std::unique_ptr<Dune::OverlappingSchwarzOperator<Matrix,Vector,Vector,
|
std::tuple<std::unique_ptr<Dune::OverlappingSchwarzOperator<Matrix,Vector,Vector,
|
||||||
Dune::OwnerOverlapCopyCommunication<int,int>>>,
|
Dune::OwnerOverlapCopyCommunication<int,int>>>,
|
||||||
@ -111,7 +114,6 @@ EclGenericTracerModel(const GridView& gridView,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
Scalar EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
Scalar EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
tracerConcentration(int tracerIdx, int globalDofIdx) const
|
tracerConcentration(int tracerIdx, int globalDofIdx) const
|
||||||
@ -122,7 +124,6 @@ tracerConcentration(int tracerIdx, int globalDofIdx) const
|
|||||||
return tracerConcentration_[tracerIdx][globalDofIdx];
|
return tracerConcentration_[tracerIdx][globalDofIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
setTracerConcentration(int tracerIdx, int globalDofIdx, Scalar value)
|
setTracerConcentration(int tracerIdx, int globalDofIdx, Scalar value)
|
||||||
@ -144,6 +145,13 @@ fname(int tracerIdx) const
|
|||||||
return this->eclState_.tracer()[tracerIdx].fname();
|
return this->eclState_.tracer()[tracerIdx].fname();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
|
double EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
|
currentConcentration_(const Well& eclWell, const std::string& name) const
|
||||||
|
{
|
||||||
|
return eclWell.getTracerProperties().getConcentration(name);
|
||||||
|
}
|
||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
const std::string& EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
const std::string& EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
name(int tracerIdx) const
|
name(int tracerIdx) const
|
||||||
@ -151,7 +159,6 @@ name(int tracerIdx) const
|
|||||||
return this->eclState_.tracer()[tracerIdx].name;
|
return this->eclState_.tracer()[tracerIdx].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
doInit(bool rst, size_t numGridDof,
|
doInit(bool rst, size_t numGridDof,
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
class EclipseState;
|
class EclipseState;
|
||||||
|
class Well;
|
||||||
|
|
||||||
template<class Grid, class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid, class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
class EclGenericTracerModel {
|
class EclGenericTracerModel {
|
||||||
@ -96,6 +97,8 @@ protected:
|
|||||||
|
|
||||||
bool linearSolveBatchwise_(const TracerMatrix& M, std::vector<TracerVector>& x, std::vector<TracerVector>& b);
|
bool linearSolveBatchwise_(const TracerMatrix& M, std::vector<TracerVector>& x, std::vector<TracerVector>& b);
|
||||||
|
|
||||||
|
double currentConcentration_(const Well& eclWell, const std::string& name) const;
|
||||||
|
|
||||||
const GridView& gridView_;
|
const GridView& gridView_;
|
||||||
const EclipseState& eclState_;
|
const EclipseState& eclState_;
|
||||||
const CartesianIndexMapper& cartMapper_;
|
const CartesianIndexMapper& cartMapper_;
|
||||||
|
@ -30,8 +30,6 @@
|
|||||||
|
|
||||||
#include <ebos/eclgenerictracermodel.hh>
|
#include <ebos/eclgenerictracermodel.hh>
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/Well/WellTracerProperties.hpp>
|
|
||||||
|
|
||||||
#include <opm/models/utils/propertysystem.hh>
|
#include <opm/models/utils/propertysystem.hh>
|
||||||
#include <opm/simulators/utils/VectorVectorDataHandle.hpp>
|
#include <opm/simulators/utils/VectorVectorDataHandle.hpp>
|
||||||
|
|
||||||
@ -341,7 +339,7 @@ protected:
|
|||||||
|
|
||||||
std::vector<double> wtracer(tr.numTracer());
|
std::vector<double> wtracer(tr.numTracer());
|
||||||
for (int tIdx = 0; tIdx < tr.numTracer(); ++tIdx) {
|
for (int tIdx = 0; tIdx < tr.numTracer(); ++tIdx) {
|
||||||
wtracer[tIdx] = eclWell.getTracerProperties().getConcentration(this->name(tr.idx_[tIdx]));
|
wtracer[tIdx] = this->currentConcentration_(eclWell, this->name(tr.idx_[tIdx]));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& perfData : well.perforationData()) {
|
for (auto& perfData : well.perforationData()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user