Adds a constructor to BlackoilPropsAdFromDeck that allows copy the grid independant part.

In the parallel simulator we will have to be able adress only poperties on
some part of the global grid. To create thos properties we need to be able
to copy the grid independant data of the properties object and resize the rest.
This commit adds a construct taking a properties object for reading and a
new number of cells to accomplish this.
This commit is contained in:
Markus Blatt
2015-02-03 16:42:09 +01:00
parent 15aa7ec2ab
commit fc137afcd5
3 changed files with 67 additions and 2 deletions

View File

@@ -27,6 +27,7 @@
#define BOOST_TEST_MODULE FluidPropertiesTest
#include <opm/autodiff/BlackoilPropsAd.hpp>
#include <opm/autodiff/BlackoilPropsAdFromDeck.hpp>
#include <boost/test/unit_test.hpp>
@@ -82,13 +83,35 @@ struct TestFixture : public Setup
Opm::BlackoilPropertiesFromDeck props;
};
template <class Setup>
struct TestFixtureAd : public Setup
{
TestFixtureAd()
: Setup()
, grid (deck)
, props(deck, eclState, *grid.c_grid(),
param.getDefault("init_rock", false))
{
}
using Setup::param;
using Setup::deck;
using Setup::eclState;
Opm::GridManager grid;
Opm::BlackoilPropsAdFromDeck props;
};
BOOST_FIXTURE_TEST_CASE(Construction, TestFixture<SetupSimple>)
{
Opm::BlackoilPropsAd boprops_ad(props);
}
BOOST_FIXTURE_TEST_CASE(SubgridConstruction, TestFixtureAd<SetupSimple>)
{
Opm::BlackoilPropsAdFromDeck subgrid_props(props);
}
BOOST_FIXTURE_TEST_CASE(SurfaceDensity, TestFixture<SetupSimple>)
{