Override certain properties with values from elsewhere.This allows mixing of property objects from several sources, such as rock and fluid properties from a file but unsaturated properties from a function. Care must be taken to setup the shadowing so no inconsistencies arise.
std::vector<double> poro;
IncompPropertiesFromDeck fromDeck(deck, grid);
simulate (IncompPropertiesShadow(fromDeck).usePorosity(poro));
#ifndef OPM_INCOMPPROPERTIESSHADOW_HEADER_INCLUDED
#define OPM_INCOMPPROPERTIESSHADOW_HEADER_INCLUDED
#ifndef OPM_INCOMPPROPERTIESINTERFACE_HEADER_INCLUDED
#include <opm/core/props/IncompPropertiesInterface.hpp>
#endif
{
struct IncompPropertiesShadow : public IncompPropertiesInterface
{
virtual const double*
porosity ()
const;
virtual const double*
density ()
const;
const double* s,
const int* cells,
double* kr,
double* dkrds) const;
const double* s,
const int* cells,
double* pc,
double* dpcds) const;
const int* cells,
double* smin,
double* smax) const;
private:
const IncompPropertiesInterface& prototype_;
int shadowed_;
static const int POROSITY = 1 << 1;
static const int PERMEABILITY = 1 << 2;
static const int VISCOSITY = 1 << 3;
static const int DENSITY = 1 << 4;
static const int SURFACE_DENSITY = 1 << 5;
const double* poro_;
const double* perm_;
const double* visc_;
const double* dens_;
const double* surf_;
};
}
#include <opm/core/props/IncompPropertiesShadow_impl.hpp>
#endif