Refactored parts needed for Blackoil in autodiff to get rid of UG dependency.
This patch refactors (hopefully) all parts of opm-core that are needed by the fully implicite black oil solver in opm-autodiff and that inherently relied on UnstructuredGrid. We added a new simple grid interface consisting out of free functions that will allow us to use CpGrid without copying it to an UnstructuredGrid by the means of the GridAdapter. Using this interface we have add methods that allow specifying the grid information (global_cell, cartdims, etc.) wherever possible to prevent introducing grid parameters for the type of the grid. Unfortunately this was not possible everywhere.
This commit is contained in:
1 parent
c1986572c4
commit
8da99e11c5
21 files changed
+1073
-293
No files matched your search
@@ -4,13 +4,18 @@
|
||||
using namespace Opm;
|
||||
|
||||
void
|
||||
BlackoilState::init(const UnstructuredGrid& g, int num_phases) {
|
||||
SimulatorState::init(g, num_phases);
|
||||
gor_.resize(g.number_of_cells, 0.) ;
|
||||
rv_.resize(g.number_of_cells,0.);
|
||||
BlackoilState::init(int number_of_cells, int number_of_phases, int num_phases) {
|
||||
SimulatorState::init(number_of_cells, number_of_phases, num_phases);
|
||||
gor_.resize(number_of_cells, 0.) ;
|
||||
rv_.resize(number_of_cells,0.);
|
||||
// surfvol_ intentionally empty, left to initBlackoilSurfvol
|
||||
}
|
||||
|
||||
void
|
||||
BlackoilState::init(const UnstructuredGrid& g, int num_phases)
|
||||
{
|
||||
init(g.number_of_cells, g.number_of_faces, num_phases);
|
||||
}
|
||||
/// Set the first saturation to either its min or max value in
|
||||
/// the indicated cells. The second saturation value s2 is set
|
||||
/// to (1.0 - s1) for each cell. Any further saturation values
|
||||
|
||||
Reference in new issue
Block a user