mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
implement abililty to change the geology during the simulation run
i.e. it now supports stuff like MULTFLT in the schedule section. Possibly, the MPI-parallel code paths need some fixes. (but if the geology is not changed during the simulation, the parallel code will do the same as before.) the most fundamental change of this patch is that the reference/pointer to the DerivedGeology object is made non-constant. IMO that's okay, though, becase the geology can no longer assumed to be constant over the whole simulation run.
This commit is contained in:
@@ -69,6 +69,17 @@ namespace Opm
|
||||
, trans_(Opm::AutoDiffGrid::numFaces(grid))
|
||||
, gpot_ (Vector::Zero(Opm::AutoDiffGrid::cell2Faces(grid).noEntries(), 1))
|
||||
, z_(Opm::AutoDiffGrid::numCells(grid))
|
||||
, use_local_perm_(use_local_perm)
|
||||
{
|
||||
update(grid, props, eclState, grav);
|
||||
}
|
||||
|
||||
/// compute the all geological properties at a given report step
|
||||
template <class Props, class Grid>
|
||||
void update(const Grid& grid,
|
||||
const Props& props ,
|
||||
Opm::EclipseStateConstPtr eclState,
|
||||
const double* grav)
|
||||
{
|
||||
int numCells = AutoDiffGrid::numCells(grid);
|
||||
int numFaces = AutoDiffGrid::numFaces(grid);
|
||||
@@ -121,7 +132,7 @@ namespace Opm
|
||||
Vector htrans(AutoDiffGrid::numCellFaces(grid));
|
||||
Grid* ug = const_cast<Grid*>(& grid);
|
||||
|
||||
if (! use_local_perm) {
|
||||
if (! use_local_perm_) {
|
||||
tpfa_htrans_compute(ug, props.permeability(), htrans.data());
|
||||
}
|
||||
else {
|
||||
@@ -204,9 +215,7 @@ namespace Opm
|
||||
Vector gpot_ ;
|
||||
Vector z_;
|
||||
double gravity_[3]; // Size 3 even if grid is 2-dim.
|
||||
|
||||
|
||||
|
||||
bool use_local_perm_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user