mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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>)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user