mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix Dune 2.3 related deprecation warnings
This commit is contained in:
parent
537bf6a1bd
commit
f1c516f1c9
@ -33,6 +33,7 @@
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#endif
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -321,7 +322,14 @@ public:
|
||||
*/
|
||||
static void makeGrid()
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2,3)
|
||||
std::bitset<FINGER_DIM> isPeriodic(false);
|
||||
std::array<int, FINGER_DIM> cellRes;
|
||||
#else
|
||||
Dune::FieldVector<bool, FINGER_DIM> isPeriodic(false);
|
||||
Dune::FieldVector<int, FINGER_DIM> cellRes;
|
||||
#endif
|
||||
|
||||
Dune::FieldVector<Scalar, FINGER_DIM> upperRight;
|
||||
Dune::FieldVector<Scalar, FINGER_DIM> lowerLeft;
|
||||
|
||||
@ -346,8 +354,8 @@ public:
|
||||
#endif
|
||||
upperRight, // upper right
|
||||
cellRes, // number of cells
|
||||
Dune::FieldVector<bool,FINGER_DIM>(false), // periodic
|
||||
0); // overlap
|
||||
isPeriodic,
|
||||
0); // overlap size
|
||||
grid_->globalRefine(numRefinments);
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#endif
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -326,7 +327,14 @@ public:
|
||||
*/
|
||||
static void makeGrid()
|
||||
{
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2,3)
|
||||
std::bitset<LENS_DIM> isPeriodic(false);
|
||||
std::array<int, LENS_DIM> cellRes;
|
||||
#else
|
||||
Dune::FieldVector<bool, LENS_DIM> isPeriodic(false);
|
||||
Dune::FieldVector<int, LENS_DIM> cellRes;
|
||||
#endif
|
||||
|
||||
Dune::FieldVector<Scalar, LENS_DIM> upperRight;
|
||||
Dune::FieldVector<Scalar, LENS_DIM> lowerLeft;
|
||||
|
||||
@ -351,7 +359,7 @@ public:
|
||||
#endif
|
||||
/*upperRightCorner=*/upperRight,
|
||||
/*numCells=*/cellRes,
|
||||
/*isPeriodic=*/Dune::FieldVector<bool,LENS_DIM>(false),
|
||||
isPeriodic,
|
||||
/*overlap=*/1);
|
||||
grid_->globalRefine(numRefinements);
|
||||
}
|
||||
|
@ -266,8 +266,16 @@ void testQuadrature()
|
||||
{
|
||||
std::cout << "testing SCV quadrature...\n";
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2,3)
|
||||
std::bitset<dim> isPeriodic(false);
|
||||
std::array<int, dim> cellRes;
|
||||
#else
|
||||
Dune::FieldVector<bool, dim> isPeriodic(false);
|
||||
Dune::FieldVector<int, dim> cellRes;
|
||||
#endif
|
||||
std::fill(cellRes.begin(), cellRes.end(), 10);
|
||||
|
||||
GlobalPosition upperRight(1.0);
|
||||
Dune::FieldVector<int, dim> cellRes(10);
|
||||
|
||||
typedef Dune::YaspGrid<dim> Grid;
|
||||
typedef Grid::LeafGridView GridView;
|
||||
@ -277,7 +285,7 @@ void testQuadrature()
|
||||
#endif
|
||||
upperRight, // upper right
|
||||
cellRes, // number of cells
|
||||
Dune::FieldVector<bool, dim>(false), // periodic
|
||||
isPeriodic,
|
||||
0); // overlap
|
||||
|
||||
// compute approximate integral
|
||||
|
Loading…
Reference in New Issue
Block a user