mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-29 10:40:59 -06:00
Merge pull request #590 from akva2/bump_dune
bump required dune version to 2.6
This commit is contained in:
commit
2b3d2b1852
@ -38,7 +38,6 @@
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/PvtwsaltTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/BrineDensityTable.hpp>
|
||||
#endif
|
||||
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
@ -125,8 +124,7 @@ public:
|
||||
const auto& bdensityTable = bdensityTables[pvtRegionIdx];
|
||||
const auto& pvtwsaltTable = pvtwsaltTables[pvtRegionIdx];
|
||||
const auto& c = pvtwsaltTable.getSaltConcentrationColumn();
|
||||
const auto& density = bdensityTable.getBrineDensityColumn();
|
||||
bdensityTable_[pvtRegionIdx].setXYContainers(c, density);
|
||||
bdensityTable_[pvtRegionIdx].setXYContainers(c, bdensityTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,11 +67,7 @@
|
||||
#include <dune/istl/bvector.hh>
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#if DUNE_VERSION_NEWER(DUNE_FEM, 2,6)
|
||||
#include <dune/fem/space/common/adaptationmanager.hh>
|
||||
#else
|
||||
#include <dune/fem/space/common/adaptmanager.hh>
|
||||
#endif
|
||||
#include <dune/fem/space/common/restrictprolongtuple.hh>
|
||||
#include <dune/fem/function/blockvectorfunction.hh>
|
||||
#include <dune/fem/misc/capabilities.hh>
|
||||
@ -95,22 +91,12 @@ BEGIN_PROPERTIES
|
||||
SET_TYPE_PROP(FvBaseDiscretization, Simulator, Opm::Simulator<TypeTag>);
|
||||
|
||||
//! Mapper for the grid view's vertices.
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
SET_TYPE_PROP(FvBaseDiscretization, VertexMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, GridView)>);
|
||||
#else
|
||||
SET_TYPE_PROP(FvBaseDiscretization, VertexMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, GridView), Dune::MCMGVertexLayout>);
|
||||
#endif
|
||||
|
||||
//! Mapper for the grid view's elements.
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
SET_TYPE_PROP(FvBaseDiscretization, ElementMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, GridView)>);
|
||||
#else
|
||||
SET_TYPE_PROP(FvBaseDiscretization, ElementMapper,
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<typename GET_PROP_TYPE(TypeTag, GridView), Dune::MCMGElementLayout>);
|
||||
#endif
|
||||
|
||||
//! marks the border indices (required for the algebraic overlap stuff)
|
||||
SET_PROP(FvBaseDiscretization, BorderListCreator)
|
||||
@ -380,13 +366,8 @@ public:
|
||||
FvBaseDiscretization(Simulator& simulator)
|
||||
: simulator_(simulator)
|
||||
, gridView_(simulator.gridView())
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
, elementMapper_(gridView_, Dune::mcmgElementLayout())
|
||||
, vertexMapper_(gridView_, Dune::mcmgVertexLayout())
|
||||
#else
|
||||
, elementMapper_(gridView_)
|
||||
, vertexMapper_(gridView_)
|
||||
#endif
|
||||
, newtonMethod_(simulator)
|
||||
, localLinearizer_(ThreadManager::maxThreads())
|
||||
, linearizer_(new Linearizer())
|
||||
|
@ -191,15 +191,6 @@ public:
|
||||
linearize_();
|
||||
succeeded = 1;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (const Dune::Exception& e)
|
||||
{
|
||||
std::cout << "rank " << simulator_().gridView().comm().rank()
|
||||
<< " caught an exception while linearizing:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
succeeded = 0;
|
||||
}
|
||||
#endif
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "rank " << simulator_().gridView().comm().rank()
|
||||
@ -246,16 +237,6 @@ public:
|
||||
<< " caught an exception while linearizing:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (const Dune::Exception& e)
|
||||
{
|
||||
succeeded = false;
|
||||
|
||||
std::cout << "rank " << simulator_().gridView().comm().rank()
|
||||
<< " caught an exception while linearizing:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#endif
|
||||
|
||||
succeeded = comm.min(succeeded);
|
||||
|
||||
|
@ -111,13 +111,8 @@ public:
|
||||
FvBaseProblem(Simulator& simulator)
|
||||
: nextTimeStepSize_(0.0)
|
||||
, gridView_(simulator.gridView())
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
, elementMapper_(gridView_, Dune::mcmgElementLayout())
|
||||
, vertexMapper_(gridView_, Dune::mcmgVertexLayout())
|
||||
#else
|
||||
, elementMapper_(gridView_)
|
||||
, vertexMapper_(gridView_)
|
||||
#endif
|
||||
, boundingBoxMin_(std::numeric_limits<double>::max())
|
||||
, boundingBoxMax_(-std::numeric_limits<double>::max())
|
||||
, simulator_(simulator)
|
||||
|
@ -63,11 +63,7 @@ class EcfvStencil
|
||||
typedef typename GridView::Intersection Intersection;
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
|
||||
#else
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
||||
#endif
|
||||
|
||||
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
|
||||
|
||||
|
@ -724,11 +724,7 @@ private:
|
||||
|
||||
public:
|
||||
//! exported Mapper type
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> Mapper;
|
||||
#else
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> Mapper;
|
||||
#endif
|
||||
|
||||
class ScvGeometry
|
||||
{
|
||||
|
@ -156,13 +156,8 @@ protected:
|
||||
LevelGridView gridView = dgfPointer->levelGridView(/*level=*/0);
|
||||
const unsigned edgeCodim = Grid::dimension - 1;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<LevelGridView> VertexMapper;
|
||||
VertexMapper vertexMapper(gridView, Dune::mcmgVertexLayout());
|
||||
#else
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<LevelGridView, Dune::MCMGVertexLayout> VertexMapper;
|
||||
VertexMapper vertexMapper(gridView);
|
||||
#endif
|
||||
|
||||
// first create a map of the dune to ART vertex indices
|
||||
auto eIt = gridView.template begin</*codim=*/0>();
|
||||
|
@ -96,13 +96,8 @@ class VtkMultiWriter : public BaseOutputWriter
|
||||
|
||||
enum { dim = GridView::dimension };
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> VertexMapper;
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
|
||||
#else
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout> VertexMapper;
|
||||
#endif
|
||||
|
||||
public:
|
||||
typedef BaseOutputWriter::Scalar Scalar;
|
||||
@ -113,11 +108,7 @@ public:
|
||||
typedef BaseOutputWriter::TensorBuffer TensorBuffer;
|
||||
|
||||
typedef Dune::VTKWriter<GridView> VtkWriter;
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,5)
|
||||
typedef std::shared_ptr< Dune::VTKFunction< GridView > > FunctionPtr;
|
||||
#else
|
||||
typedef typename VtkWriter::VTKFunctionPtr FunctionPtr;
|
||||
#endif
|
||||
|
||||
VtkMultiWriter(bool asyncWriting,
|
||||
const GridView& gridView,
|
||||
@ -125,13 +116,8 @@ public:
|
||||
const std::string& simName = "",
|
||||
std::string multiFileName = "")
|
||||
: gridView_(gridView)
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
, elementMapper_(gridView, Dune::mcmgElementLayout())
|
||||
, vertexMapper_(gridView, Dune::mcmgVertexLayout())
|
||||
#else
|
||||
, elementMapper_(gridView)
|
||||
, vertexMapper_(gridView)
|
||||
#endif
|
||||
, curWriter_(nullptr)
|
||||
, curWriterNum_(0)
|
||||
, taskletRunner_(/*numThreads=*/asyncWriting?1:0)
|
||||
|
@ -628,16 +628,6 @@ protected:
|
||||
<< " caught an exception while pre-processing the problem:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (const Dune::Exception& e)
|
||||
{
|
||||
succeeded = false;
|
||||
|
||||
std::cout << "rank " << simulator_.gridView().comm().rank()
|
||||
<< " caught an exception while pre-processing the problem:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#endif
|
||||
|
||||
succeeded = comm.min(succeeded);
|
||||
|
||||
@ -733,16 +723,6 @@ protected:
|
||||
<< " caught an exception while post processing an auxiliary module:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (const Dune::Exception& e)
|
||||
{
|
||||
succeeded = false;
|
||||
|
||||
std::cout << "rank " << simulator_.gridView().comm().rank()
|
||||
<< " caught an exception while post processing an auxiliary module:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#endif
|
||||
|
||||
succeeded = comm.min(succeeded);
|
||||
|
||||
@ -872,16 +852,6 @@ protected:
|
||||
<< " caught an exception while letting the problem post-process:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (const Dune::Exception& e)
|
||||
{
|
||||
succeeded = false;
|
||||
|
||||
std::cout << "rank " << simulator_.gridView().comm().rank()
|
||||
<< " caught an exception while letting the problem post process:" << e.what()
|
||||
<< "\n" << std::flush;
|
||||
}
|
||||
#endif
|
||||
|
||||
succeeded = comm.min(succeeded);
|
||||
|
||||
|
@ -49,20 +49,12 @@ class PffGridVector
|
||||
{
|
||||
typedef typename GridView::template Codim<0>::Entity Element;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
|
||||
#else
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout> ElementMapper;
|
||||
#endif
|
||||
|
||||
public:
|
||||
PffGridVector(const GridView& gridView, const DofMapper& dofMapper)
|
||||
: gridView_(gridView)
|
||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,6)
|
||||
, elementMapper_(gridView_, Dune::mcmgElementLayout())
|
||||
#else
|
||||
, elementMapper_(gridView_)
|
||||
#endif
|
||||
, dofMapper_(dofMapper)
|
||||
{ }
|
||||
|
||||
|
@ -401,19 +401,6 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2,5)
|
||||
catch (Dune::Exception& e)
|
||||
{
|
||||
if (myRank == 0) {
|
||||
std::cout << "Dune reported an error: " << e.what() << std::endl << std::flush;
|
||||
|
||||
std::cout << "Trying to reset TTY.\n";
|
||||
resetTerminal_();
|
||||
}
|
||||
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
catch (std::exception& e)
|
||||
{
|
||||
if (myRank == 0) {
|
||||
|
@ -50,14 +50,9 @@ public:
|
||||
OverlappingOperator(const OverlappingMatrix& A) : A_(A)
|
||||
{}
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6)
|
||||
//! the kind of computations supported by the operator. Either overlapping or non-overlapping
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{ return Dune::SolverCategory::overlapping; }
|
||||
#else
|
||||
// redefine the category
|
||||
enum { category = Dune::SolverCategory::overlapping };
|
||||
#endif
|
||||
|
||||
//! apply operator to x: \f$ y = A(x) \f$
|
||||
virtual void apply(const DomainVector& x, RangeVector& y) const override
|
||||
|
@ -50,14 +50,9 @@ public:
|
||||
typedef typename SeqPreCond::domain_type domain_type;
|
||||
typedef typename SeqPreCond::range_type range_type;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6)
|
||||
//! the kind of computations supported by the operator. Either overlapping or non-overlapping
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{ return Dune::SolverCategory::overlapping; }
|
||||
#else
|
||||
// redefine the category
|
||||
enum { category = Dune::SolverCategory::overlapping };
|
||||
#endif
|
||||
|
||||
OverlappingPreconditioner(SeqPreCond& seqPreCond, const Overlap& overlap)
|
||||
: seqPreCond_(seqPreCond), overlap_(&overlap)
|
||||
|
@ -45,20 +45,11 @@ public:
|
||||
typedef typename OverlappingBlockVector::field_type field_type;
|
||||
typedef typename Dune::CollectiveCommunication<typename Dune::MPIHelper::MPICommunicator> CollectiveCommunication;
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 5)
|
||||
typedef typename Dune::ScalarProduct<OverlappingBlockVector>::real_type real_type;
|
||||
#else
|
||||
typedef double real_type;
|
||||
#endif
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2,6)
|
||||
//! the kind of computations supported by the operator. Either overlapping or non-overlapping
|
||||
Dune::SolverCategory::Category category() const override
|
||||
{ return Dune::SolverCategory::overlapping; }
|
||||
#else
|
||||
// redefine the category
|
||||
enum { category = Dune::SolverCategory::overlapping };
|
||||
#endif
|
||||
|
||||
OverlappingScalarProduct(const Overlap& overlap)
|
||||
: overlap_(overlap), comm_( Dune::MPIHelper::getCollectiveCommunication() )
|
||||
|
Loading…
Reference in New Issue
Block a user