Merge pull request #285 from andlaus/gridManager_to_vanguard

rename the "grid manager" to "vanguard"
This commit is contained in:
Andreas Lauser 2018-02-08 17:53:43 +01:00 committed by GitHub
commit eb6be94f7a
8 changed files with 50 additions and 50 deletions

View File

@ -30,7 +30,7 @@
#include <ewoms/models/ncp/ncpproperties.hh>
#include <ewoms/io/cubegridmanager.hh>
#include <ewoms/io/cubegridvanguard.hh>
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
@ -60,8 +60,8 @@ NEW_TYPE_TAG(DiffusionBaseProblem);
// Set the grid implementation to be used
SET_TYPE_PROP(DiffusionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridManager property
SET_TYPE_PROP(DiffusionBaseProblem, GridManager, Ewoms::CubeGridManager<TypeTag>);
// set the Vanguard property
SET_TYPE_PROP(DiffusionBaseProblem, Vanguard, Ewoms::CubeGridVanguard<TypeTag>);
// Set the problem property
SET_TYPE_PROP(DiffusionBaseProblem, Problem, Ewoms::DiffusionProblem<TypeTag>);

View File

@ -28,7 +28,7 @@
#ifndef EWOMS_FINGER_PROBLEM_HH
#define EWOMS_FINGER_PROBLEM_HH
#include <ewoms/io/structuredgridmanager.hh>
#include <ewoms/io/structuredgridvanguard.hh>
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
@ -61,7 +61,7 @@ template <class TypeTag>
class FingerProblem;
namespace Properties {
NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(StructuredGridManager));
NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(StructuredGridVanguard));
#if HAVE_DUNE_ALUGRID
// use dune-alugrid if available
@ -219,7 +219,7 @@ public:
*/
FingerProblem(Simulator& simulator)
: ParentType(simulator),
materialParams_( simulator.gridManager().grid(), codim )
materialParams_( simulator.vanguard().grid(), codim )
{
}

View File

@ -38,7 +38,7 @@
#endif
#include <ewoms/models/discretefracture/discretefracturemodel.hh>
#include <ewoms/io/dgfgridmanager.hh>
#include <ewoms/io/dgfvanguard.hh>
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
@ -75,8 +75,8 @@ SET_TYPE_PROP(
FractureProblem, Grid,
Dune::ALUGrid</*dim=*/2, /*dimWorld=*/2, Dune::simplex, Dune::nonconforming>);
// Set the GridManager property
SET_TYPE_PROP(FractureProblem, GridManager, Ewoms::DgfGridManager<TypeTag>);
// Set the Vanguard property
SET_TYPE_PROP(FractureProblem, Vanguard, Ewoms::DgfVanguard<TypeTag>);
// Set the problem property
SET_TYPE_PROP(FractureProblem, Problem, Ewoms::FractureProblem<TypeTag>);
@ -398,7 +398,7 @@ public:
* \brief Returns the object representating the fracture topology.
*/
const FractureMapper& fractureMapper() const
{ return this->simulator().gridManager().fractureMapper(); }
{ return this->simulator().vanguard().fractureMapper(); }
/*!
* \brief Returns the width of the fracture.

View File

@ -28,7 +28,7 @@
#ifndef EWOMS_LENS_PROBLEM_HH
#define EWOMS_LENS_PROBLEM_HH
#include <ewoms/io/structuredgridmanager.hh>
#include <ewoms/io/structuredgridvanguard.hh>
#include <ewoms/models/immiscible/immiscibleproperties.hh>
#include <ewoms/disc/common/fvbaseadlocallinearizer.hh>
@ -55,7 +55,7 @@ template <class TypeTag>
class LensProblem;
namespace Properties {
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(StructuredGridManager));
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(StructuredGridVanguard));
// declare the properties specific for the lens problem
NEW_PROP_TAG(LensLowerLeftX);

View File

@ -29,7 +29,7 @@
#define EWOMS_POWER_INJECTION_PROBLEM_HH
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include <ewoms/io/cubegridmanager.hh>
#include <ewoms/io/cubegridvanguard.hh>
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
@ -64,9 +64,9 @@ NEW_TYPE_TAG(PowerInjectionBaseProblem);
// Set the grid implementation to be used
SET_TYPE_PROP(PowerInjectionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridManager property
SET_TYPE_PROP(PowerInjectionBaseProblem, GridManager,
Ewoms::CubeGridManager<TypeTag>);
// set the Vanguard property
SET_TYPE_PROP(PowerInjectionBaseProblem, Vanguard,
Ewoms::CubeGridVanguard<TypeTag>);
// Set the problem property
SET_TYPE_PROP(PowerInjectionBaseProblem, Problem,

View File

@ -45,7 +45,7 @@
// For the DUNE grid
#include <dune/grid/yaspgrid.hh> /*@\label{tutorial1:include-grid-manager}@*/
#include <ewoms/io/cubegridmanager.hh> /*@\label{tutorial1:include-grid-manager}@*/
#include <ewoms/io/cubegridvanguard.hh> /*@\label{tutorial1:include-grid-manager}@*/
// For Dune::FieldMatrix
#include <dune/common/fmatrix.hh>
@ -72,7 +72,7 @@ SET_TYPE_PROP(Tutorial1Problem, Problem,
// Set grid and the grid manager to be used
SET_TYPE_PROP(Tutorial1Problem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial1:set-grid}@*/
SET_TYPE_PROP(Tutorial1Problem, GridManager, Ewoms::CubeGridManager<TypeTag>); /*@\label{tutorial1:set-grid-manager}@*/
SET_TYPE_PROP(Tutorial1Problem, Vanguard, Ewoms::CubeGridVanguard<TypeTag>); /*@\label{tutorial1:set-grid-manager}@*/
// Set the wetting phase /*@\label{tutorial1:2p-system-start}@*/
SET_TYPE_PROP(Tutorial1Problem,

View File

@ -115,10 +115,10 @@ void test_summary()
const std::string casename = "summary_deck_non_constant_porosity";
auto simulator = initSimulator<TypeTag>(filename.data());
typedef typename GET_PROP_TYPE(TypeTag, GridManager) GridManager;
typedef typename GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Ewoms::CollectDataToIORank< GridManager > CollectDataToIORankType;
CollectDataToIORankType collectToIORank(simulator->gridManager());
typedef Ewoms::CollectDataToIORank< Vanguard > CollectDataToIORankType;
CollectDataToIORankType collectToIORank(simulator->vanguard());
Ewoms::EclOutputBlackOilModule<TypeTag> eclOutputModule(*simulator, collectToIORank);
typedef Ewoms::EclWriter<TypeTag> EclWriterType;

View File

@ -231,13 +231,13 @@ void test_PhasePressure()
std::make_shared<Ewoms::EQUIL::Miscibility::NoMixing>(),
0);
std::vector<int> cells(simulator->gridManager().grid().size(0));
std::vector<int> cells(simulator->vanguard().grid().size(0));
std::iota(cells.begin(), cells.end(), 0);
const double grav = 10;
const PPress ppress = Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->gridManager().grid(), region, cells, grav);
const PPress ppress = Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->vanguard().grid(), region, cells, grav);
const int first = 0, last = simulator->gridManager().grid().size(0) - 1;
const int first = 0, last = simulator->vanguard().grid().size(0) - 1;
const double reltol = 1.0e-8;
CHECK_CLOSE(ppress[0][first] , 90e3 , reltol);
CHECK_CLOSE(ppress[0][last ] , 180e3 , reltol);
@ -253,7 +253,7 @@ void test_CellSubset()
typedef TTAG(TestEquilTypeTag) TypeTag;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
auto simulator = initSimulator<TypeTag>("data/equil_base.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
initDefaultFluidSystem<TypeTag>();
@ -289,7 +289,7 @@ void test_CellSubset()
for (std::size_t d = 1; d < 3; ++d) { ncoarse *= cdim[d]; }
std::vector< std::vector<int> > cells(ncoarse);
for (int c = 0; c < simulator->gridManager().grid().size(0); ++c) {
for (int c = 0; c < simulator->vanguard().grid().size(0); ++c) {
int ci = c;
const int i = ci % grid.cartdims[0]; ci /= grid.cartdims[0];
const int j = ci % grid.cartdims[1];
@ -304,7 +304,7 @@ void test_CellSubset()
cells[ix].push_back(c);
}
PPress ppress(2, PVal(simulator->gridManager().grid().size(0), 0));
PPress ppress(2, PVal(simulator->vanguard().grid().size(0), 0));
for (std::vector< std::vector<int> >::const_iterator
r = cells.begin(), e = cells.end();
r != e; ++r)
@ -312,7 +312,7 @@ void test_CellSubset()
const int rno = int(r - cells.begin());
const double grav = 10;
const PPress p =
Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->gridManager().grid(), region[rno], *r, grav);
Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->vanguard().grid(), region[rno], *r, grav);
PVal::size_type i = 0;
for (std::vector<int>::const_iterator
@ -326,7 +326,7 @@ void test_CellSubset()
}
}
const int first = 0, last = simulator->gridManager().grid().size(0) - 1;
const int first = 0, last = simulator->vanguard().grid().size(0) - 1;
const double reltol = 1.0e-8;
CHECK_CLOSE(ppress[0][first] , 105e3 , reltol);
CHECK_CLOSE(ppress[0][last ] , 195e3 , reltol);
@ -370,7 +370,7 @@ void test_RegMapping()
0)
};
std::vector<int> eqlnum(simulator->gridManager().grid().size(0));
std::vector<int> eqlnum(simulator->vanguard().grid().size(0));
// [ 0 1; 2 3]
{
for (int i = 0; i < 5; ++i) {
@ -393,14 +393,14 @@ void test_RegMapping()
Ewoms::RegionMapping<> eqlmap(eqlnum);
PPress ppress(2, PVal(simulator->gridManager().grid().size(0), 0));
PPress ppress(2, PVal(simulator->vanguard().grid().size(0), 0));
for (const auto& r : eqlmap.activeRegions()) {
const auto& rng = eqlmap.cells(r);
const int rno = r;
const double grav = 10;
const PPress p =
Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->gridManager().grid(), region[rno], rng, grav);
Ewoms::EQUIL::phasePressures<FluidSystem>(simulator->vanguard().grid(), region[rno], rng, grav);
PVal::size_type i = 0;
for (const auto& c : rng) {
@ -413,7 +413,7 @@ void test_RegMapping()
}
}
const int first = 0, last = simulator->gridManager().grid().size(0) - 1;
const int first = 0, last = simulator->vanguard().grid().size(0) - 1;
const double reltol = 1.0e-8;
CHECK_CLOSE(ppress[0][first] , 105e3 , reltol);
CHECK_CLOSE(ppress[0][last ] , 195e3 , reltol);
@ -425,11 +425,11 @@ void test_DeckAllDead()
{
typedef TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_deadfluids.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 10.0);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 10.0);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -500,11 +500,11 @@ void test_DeckWithCapillary()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_capillary.DATA");
auto& eclipseState = simulator->gridManager().eclState();
auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 10.0);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 10.0);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
@ -538,11 +538,11 @@ void test_DeckWithCapillaryOverlap()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_capillary_overlap.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.80665);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.80665);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -597,12 +597,12 @@ void test_DeckWithLiveOil()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_liveoil.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
// Initialize the fluid system
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.80665);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.80665);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -674,11 +674,11 @@ void test_DeckWithLiveGas()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_livegas.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.80665);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.80665);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -754,11 +754,11 @@ void test_DeckWithRSVDAndRVVD()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_rsvd_and_rvvd.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.80665);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.80665);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -854,11 +854,11 @@ void test_DeckWithPBVDAndPDVD()
{
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_pbvd_and_pdvd.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.80665);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> comp(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.80665);
const auto& pressures = comp.press();
REQUIRE(pressures.size() == 3);
REQUIRE(int(pressures[0].size()) == grid.number_of_cells);
@ -945,7 +945,7 @@ void test_DeckWithSwatinit()
#if 0
typedef typename TTAG(TestEquilTypeTag) TypeTag;
auto simulator = initSimulator<TypeTag>("data/equil_capillary_swatinit.DATA");
const auto& eclipseState = simulator->gridManager().eclState();
const auto& eclipseState = simulator->vanguard().eclState();
Opm::GridManager gm(eclipseState.getInputGrid());
const UnstructuredGrid& grid = *(gm.c_grid());
@ -1029,9 +1029,9 @@ void test_DeckWithSwatinit()
// compute the initial state
// apply swatinit
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> compScaled(materialLawManagerScaled, eclipseState, simulator->gridManager().grid(), 9.81, true);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> compScaled(materialLawManagerScaled, eclipseState, simulator->vanguard().grid(), 9.81, true);
// don't apply swatinit
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> compUnscaled(*simulator->problem().materialLawManager(), eclipseState, simulator->gridManager().grid(), 9.81, false);
Ewoms::EQUIL::DeckDependent::InitialStateComputer<TypeTag> compUnscaled(*simulator->problem().materialLawManager(), eclipseState, simulator->vanguard().grid(), 9.81, false);
// compute pc
std::vector<double> pc_scaled(numCells * FluidSystem::numPhases);