GenericTracerModel: use Scalar type

This commit is contained in:
Arne Morten Kvarving 2024-02-21 09:39:45 +01:00
parent bf93915101
commit 61bfea46c7
2 changed files with 7 additions and 5 deletions

View File

@ -77,7 +77,7 @@ public:
/*!
* \brief Return well tracer rates
*/
const std::map<std::pair<std::string, std::string>, double>&
const std::map<std::pair<std::string, std::string>, Scalar>&
getWellTracerRates() const {return wellTracerRate_;}
template<class Serializer>
@ -105,9 +105,11 @@ protected:
bool linearSolve_(const TracerMatrix& M, TracerVector& x, TracerVector& b);
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;
Scalar currentConcentration_(const Well& eclWell, const std::string& name) const;
const GridView& gridView_;
const EclipseState& eclState_;
@ -120,7 +122,7 @@ protected:
std::vector<Dune::BlockVector<Dune::FieldVector<Scalar, 1>>> storageOfTimeIndex1_;
// <wellName, tracerIdx> -> wellRate
std::map<std::pair<std::string, std::string>, double> wellTracerRate_;
std::map<std::pair<std::string, std::string>, Scalar> wellTracerRate_;
/// \brief Function returning the cell centers
std::function<std::array<double,dimWorld>(int)> centroids_;
};

View File

@ -144,7 +144,7 @@ fname(int tracerIdx) const
}
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
double GenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
Scalar GenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
currentConcentration_(const Well& eclWell, const std::string& name) const
{
return eclWell.getTracerProperties().getConcentration(name);