mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Adapt code to dune-cornerpoint -> opm-grid renaming.
This commit is contained in:
parent
6f1cec4eec
commit
37c4bd16b1
@ -87,7 +87,7 @@ macro (prereqs_hook)
|
|||||||
endmacro (prereqs_hook)
|
endmacro (prereqs_hook)
|
||||||
|
|
||||||
macro (sources_hook)
|
macro (sources_hook)
|
||||||
if(DUNE_CORNERPOINT_FOUND OR dune-cornerpoint_FOUND)
|
if(OPM_GRID_FOUND OR opm-grid_FOUND)
|
||||||
list (APPEND examples_SOURCES
|
list (APPEND examples_SOURCES
|
||||||
${PROJECT_SOURCE_DIR}/examples/flow_mpi.cpp
|
${PROJECT_SOURCE_DIR}/examples/flow_mpi.cpp
|
||||||
${PROJECT_SOURCE_DIR}/examples/flow_multisegment_mpi.cpp
|
${PROJECT_SOURCE_DIR}/examples/flow_multisegment_mpi.cpp
|
||||||
|
@ -54,7 +54,7 @@ namespace Opm
|
|||||||
init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
/// Constructor wrapping an opm-core black oil interface.
|
/// Constructor wrapping an opm-core black oil interface.
|
||||||
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck,
|
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
@ -95,7 +95,7 @@ namespace Opm
|
|||||||
init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
/// Constructor wrapping an opm-core black oil interface.
|
/// Constructor wrapping an opm-core black oil interface.
|
||||||
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck,
|
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||||
#include <dune/grid/CpGrid.hpp>
|
#include <dune/grid/CpGrid.hpp>
|
||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
@ -91,7 +91,7 @@ namespace Opm
|
|||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const bool init_rock = true );
|
const bool init_rock = true );
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
/// Constructor to create a blackoil properties from an ECL deck.
|
/// Constructor to create a blackoil properties from an ECL deck.
|
||||||
///
|
///
|
||||||
/// The materialLawManager parameter represents the object from opm-material
|
/// The materialLawManager parameter represents the object from opm-material
|
||||||
@ -125,7 +125,7 @@ namespace Opm
|
|||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const bool init_rock = true );
|
const bool init_rock = true );
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
/// Constructor to create a blackoil properties from an ECL deck.
|
/// Constructor to create a blackoil properties from an ECL deck.
|
||||||
///
|
///
|
||||||
/// \param deck The unprocessed ECL deck from opm-parser
|
/// \param deck The unprocessed ECL deck from opm-parser
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <dune/common/shared_ptr.hh>
|
#include <dune/common/shared_ptr.hh>
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
#if defined(HAVE_DUNE_CORNERPOINT)
|
#if defined(HAVE_OPM_GRID)
|
||||||
#if defined(HAVE_MPI) && defined(HAVE_DUNE_ISTL) && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
#if defined(HAVE_MPI) && defined(HAVE_DUNE_ISTL) && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
||||||
// Extracts the information about the data decomposition from the grid for dune-istl
|
// Extracts the information about the data decomposition from the grid for dune-istl
|
||||||
void extractParallelGridInformationToISTL(const Dune::CpGrid& grid, boost::any& anyComm)
|
void extractParallelGridInformationToISTL(const Dune::CpGrid& grid, boost::any& anyComm)
|
||||||
@ -45,5 +45,5 @@ void extractParallelGridInformationToISTL(const Dune::CpGrid& grid, boost::any&
|
|||||||
void extractParallelGridInformationToISTL(const Dune::CpGrid&, boost::any&)
|
void extractParallelGridInformationToISTL(const Dune::CpGrid&, boost::any&)
|
||||||
{}
|
{}
|
||||||
#endif //defined(HAVE_MPI) && defined(HAVE_DUNE_ISTL) && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
#endif //defined(HAVE_MPI) && defined(HAVE_DUNE_ISTL) && DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
|
||||||
#endif //defined(HAVE_DUNE_CORNERPOINT)
|
#endif //defined(HAVE_OPM_GRID)
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
#ifndef OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
||||||
#define OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
#define OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
|
|
||||||
#include<dune/grid/CpGrid.hpp>
|
#include<dune/grid/CpGrid.hpp>
|
||||||
#include<boost/any.hpp>
|
#include<boost/any.hpp>
|
||||||
@ -40,5 +40,5 @@ namespace Opm
|
|||||||
void extractParallelGridInformationToISTL(const Dune::CpGrid& grid, boost::any& anyComm);
|
void extractParallelGridInformationToISTL(const Dune::CpGrid& grid, boost::any& anyComm);
|
||||||
|
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
#endif //defined(HAVE_DUNE_CORNERPOINT)
|
#endif //defined(HAVE_OPM_GRID)
|
||||||
#endif // OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
#endif // OPM_EXTRACTPARALLELGRIDINFORMATIONTOISTL_HEADER_INCLUDED
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
#include <dune/common/version.hh>
|
#include <dune/common/version.hh>
|
||||||
#include <dune/grid/CpGrid.hpp>
|
#include <dune/grid/CpGrid.hpp>
|
||||||
#include <dune/grid/common/mcmgmapper.hh>
|
#include <dune/grid/common/mcmgmapper.hh>
|
||||||
@ -432,7 +432,7 @@ namespace Opm
|
|||||||
const int dim = Opm::UgGridHelpers::dimensions(grid);
|
const int dim = Opm::UgGridHelpers::dimensions(grid);
|
||||||
|
|
||||||
const double* faceNormal = Opm::UgGridHelpers::faceNormal(grid, faceIdx);
|
const double* faceNormal = Opm::UgGridHelpers::faceNormal(grid, faceIdx);
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
assert( dim <= 3 );
|
assert( dim <= 3 );
|
||||||
Dune::FieldVector< double, 3 > scaledFaceNormal( 0 );
|
Dune::FieldVector< double, 3 > scaledFaceNormal( 0 );
|
||||||
for (int indx = 0; indx < dim; ++indx) {
|
for (int indx = 0; indx < dim; ++indx) {
|
||||||
|
@ -77,7 +77,7 @@ void extractInternalFaces(const UnstructuredGrid& grid,
|
|||||||
}
|
}
|
||||||
} // end namespace AutoDiffGrid
|
} // end namespace AutoDiffGrid
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
|
|
||||||
namespace AutoDiffGrid
|
namespace AutoDiffGrid
|
||||||
{
|
{
|
||||||
@ -131,5 +131,5 @@ void extractInternalFaces(const Dune::CpGrid& grid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace AutoDiffGrid
|
} // end namespace AutoDiffGrid
|
||||||
#endif // HAVE_DUNE_CORNERPOINT
|
#endif // HAVE_OPM_GRID
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <boost/range/iterator_range.hpp>
|
#include <boost/range/iterator_range.hpp>
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
#include <dune/grid/CpGrid.hpp>
|
#include <dune/grid/CpGrid.hpp>
|
||||||
#include <dune/grid/cpgrid/GridHelpers.hpp>
|
#include <dune/grid/cpgrid/GridHelpers.hpp>
|
||||||
#include <dune/grid/polyhedralgrid.hh>
|
#include <dune/grid/polyhedralgrid.hh>
|
||||||
@ -78,7 +78,7 @@ void extractInternalFaces(const UnstructuredGrid& grid,
|
|||||||
} // end namespace AutoDiffGrid
|
} // end namespace AutoDiffGrid
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ struct ADFaceCellTraits<UnstructuredGrid>
|
|||||||
typedef Eigen::Array<int, Eigen::Dynamic, 2, Eigen::RowMajor> Type;
|
typedef Eigen::Array<int, Eigen::Dynamic, 2, Eigen::RowMajor> Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
// specialization for PolyhedralGrid as a fallback to UnstructuredGrid
|
// specialization for PolyhedralGrid as a fallback to UnstructuredGrid
|
||||||
template< int dim, int dimworld >
|
template< int dim, int dimworld >
|
||||||
struct ADFaceCellTraits< Dune::PolyhedralGrid< dim, dimworld > >
|
struct ADFaceCellTraits< Dune::PolyhedralGrid< dim, dimworld > >
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/core/grid/GridManager.hpp>
|
#include <opm/core/grid/GridManager.hpp>
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
#include <dune/grid/CpGrid.hpp>
|
#include <dune/grid/CpGrid.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ namespace Opm
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
/// Specialization for CpGrid.
|
/// Specialization for CpGrid.
|
||||||
template <>
|
template <>
|
||||||
class GridInit<Dune::CpGrid>
|
class GridInit<Dune::CpGrid>
|
||||||
@ -86,7 +86,7 @@ namespace Opm
|
|||||||
private:
|
private:
|
||||||
Dune::CpGrid grid_;
|
Dune::CpGrid grid_;
|
||||||
};
|
};
|
||||||
#endif // HAVE_DUNE_CORNERPOINT
|
#endif // HAVE_OPM_GRID
|
||||||
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
||||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
#include <dune/grid/common/p2pcommunicator.hh>
|
#include <dune/grid/common/p2pcommunicator.hh>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ namespace Opm
|
|||||||
virtual const int* globalCell() const { return grid_.global_cell; }
|
virtual const int* globalCell() const { return grid_.global_cell; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
template <>
|
template <>
|
||||||
class ParallelDebugOutput< Dune::CpGrid> : public ParallelDebugOutputInterface
|
class ParallelDebugOutput< Dune::CpGrid> : public ParallelDebugOutputInterface
|
||||||
{
|
{
|
||||||
@ -583,7 +583,7 @@ namespace Opm
|
|||||||
// true if we are on I/O rank
|
// true if we are on I/O rank
|
||||||
const bool isIORank_;
|
const bool isIORank_;
|
||||||
};
|
};
|
||||||
#endif // #if HAVE_DUNE_CORNERPOINT
|
#endif // #if HAVE_OPM_GRID
|
||||||
|
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,7 +46,7 @@ inline void distributeGridAndData( Grid& ,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT && HAVE_MPI
|
#if HAVE_OPM_GRID && HAVE_MPI
|
||||||
/// \brief a data handle to distribute the threshold pressures
|
/// \brief a data handle to distribute the threshold pressures
|
||||||
class ThresholdPressureDataHandle
|
class ThresholdPressureDataHandle
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
#include <opm/common/utility/platform_dependent/disable_warnings.h>
|
||||||
#include <dune/common/version.hh>
|
#include <dune/common/version.hh>
|
||||||
#include <dune/grid/io/file/vtk/vtkwriter.hh>
|
#include <dune/grid/io/file/vtk/vtkwriter.hh>
|
||||||
@ -203,7 +203,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
void outputStateVtk(const Dune::CpGrid& grid,
|
void outputStateVtk(const Dune::CpGrid& grid,
|
||||||
const Opm::SimulationDataContainer& state,
|
const Opm::SimulationDataContainer& state,
|
||||||
const int step,
|
const int step,
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
#include <dune/grid/CpGrid.hpp>
|
#include <dune/grid/CpGrid.hpp>
|
||||||
#endif
|
#endif
|
||||||
namespace Opm
|
namespace Opm
|
||||||
@ -69,7 +69,7 @@ namespace Opm
|
|||||||
void outputWellStateMatlab(const Opm::WellState& well_state,
|
void outputWellStateMatlab(const Opm::WellState& well_state,
|
||||||
const int step,
|
const int step,
|
||||||
const std::string& output_dir);
|
const std::string& output_dir);
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_OPM_GRID
|
||||||
void outputStateVtk(const Dune::CpGrid& grid,
|
void outputStateVtk(const Dune::CpGrid& grid,
|
||||||
const Opm::SimulationDataContainer& state,
|
const Opm::SimulationDataContainer& state,
|
||||||
const int step,
|
const int step,
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
#include <dune/common/version.hh>
|
#include <dune/common/version.hh>
|
||||||
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,3)
|
#if DUNE_VERSION_NEWER(DUNE_GRID, 2,3)
|
||||||
#include <dune/common/parallel/mpihelper.hh>
|
#include <dune/common/parallel/mpihelper.hh>
|
||||||
@ -261,7 +261,7 @@ void checkTransmissibilityValues(const G& grid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_DUNE_CORNERPOINT
|
#if HAVE_OPM_GRID
|
||||||
BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
BOOST_AUTO_TEST_CASE(TransmissibilityMultipliersCpGrid)
|
||||||
{
|
{
|
||||||
int argc = 1;
|
int argc = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user