mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
move ebos/eclgenericcpgridvanguard.[hh|cc] to opm/simulators/flow
This commit is contained in:
parent
04ed17ebd0
commit
9fe969378d
@ -23,7 +23,6 @@
|
||||
# originally generated with the command:
|
||||
# find opm -name '*.c*' -printf '\t%p\n' | sort
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
ebos/eclgenericcpgridvanguard.cc
|
||||
ebos/eclgenericproblem.cc
|
||||
ebos/eclgenericvanguard.cc
|
||||
ebos/ecltransmissibility.cc
|
||||
@ -38,6 +37,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/simulators/flow/EclGenericWriter.cpp
|
||||
opm/simulators/flow/ExtraConvergenceOutputThread.cpp
|
||||
opm/simulators/flow/FlowUtils.cpp
|
||||
opm/simulators/flow/GenericCpGridVanguard.cpp
|
||||
opm/simulators/flow/GenericOutputBlackoilModule.cpp
|
||||
opm/simulators/flow/GenericThresholdPressure.cpp
|
||||
opm/simulators/flow/GenericTracerModel.cpp
|
||||
@ -411,7 +411,6 @@ list (APPEND TEST_DATA_FILES
|
||||
list (APPEND PUBLIC_HEADER_FILES
|
||||
ebos/ebos.hh
|
||||
ebos/eclbasevanguard.hh
|
||||
ebos/eclgenericcpgridvanguard.hh
|
||||
ebos/eclgenericproblem.hh
|
||||
ebos/eclgenericproblem_impl.hh
|
||||
ebos/eclgenericvanguard.hh
|
||||
@ -445,6 +444,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/simulators/flow/FlowUtils.hpp
|
||||
opm/simulators/flow/FlowsData.hpp
|
||||
opm/simulators/flow/FlowThresholdPressure.hpp
|
||||
opm/simulators/flow/GenericCpGridVanguard.hpp
|
||||
opm/simulators/flow/GenericOutputBlackoilModule.hpp
|
||||
opm/simulators/flow/GenericThresholdPressure.hpp
|
||||
opm/simulators/flow/GenericThresholdPressure_impl.hpp
|
||||
|
@ -28,7 +28,6 @@
|
||||
#define OPM_CPGRID_VANGUARD_HPP
|
||||
|
||||
#include <ebos/eclbasevanguard.hh>
|
||||
#include <ebos/eclgenericcpgridvanguard.hh>
|
||||
#include <ebos/ecltransmissibility.hh>
|
||||
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
@ -37,6 +36,7 @@
|
||||
#include <opm/models/blackoil/blackoilproperties.hh>
|
||||
|
||||
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
||||
#include <opm/simulators/flow/GenericCpGridVanguard.hpp>
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
@ -85,9 +85,9 @@ namespace Opm {
|
||||
*/
|
||||
template <class TypeTag>
|
||||
class CpGridVanguard : public EclBaseVanguard<TypeTag>
|
||||
, public EclGenericCpGridVanguard<GetPropType<TypeTag, Properties::ElementMapper>,
|
||||
GetPropType<TypeTag, Properties::GridView>,
|
||||
GetPropType<TypeTag, Properties::Scalar>>
|
||||
, public GenericCpGridVanguard<GetPropType<TypeTag, Properties::ElementMapper>,
|
||||
GetPropType<TypeTag, Properties::GridView>,
|
||||
GetPropType<TypeTag, Properties::Scalar>>
|
||||
{
|
||||
friend class EclBaseVanguard<TypeTag>;
|
||||
using ParentType = EclBaseVanguard<TypeTag>;
|
||||
|
@ -22,29 +22,28 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/simulators/flow/GenericCpGridVanguard.hpp>
|
||||
|
||||
#include <ebos/eclgenericcpgridvanguard.hh>
|
||||
#include <dune/grid/common/mcmgmapper.hh>
|
||||
#include <dune/grid/common/partitionset.hh>
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
#if HAVE_MPI
|
||||
#include <opm/simulators/utils/MPISerializer.hpp>
|
||||
#endif
|
||||
|
||||
#include <opm/simulators/utils/ParallelEclipseState.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
#include <opm/simulators/utils/PropsDataHandle.hpp>
|
||||
#include <opm/simulators/utils/SetupZoltanParams.hpp>
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
#include <opm/common/utility/ActiveGridCells.hpp>
|
||||
|
||||
#include <opm/grid/cpgrid/GridHelpers.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/Well.hpp>
|
||||
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
#include <opm/common/utility/ActiveGridCells.hpp>
|
||||
#include <opm/simulators/utils/ParallelEclipseState.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
#include <opm/simulators/utils/PropsDataHandle.hpp>
|
||||
#include <opm/simulators/utils/SetupZoltanParams.hpp>
|
||||
|
||||
#include <dune/grid/common/mcmgmapper.hh>
|
||||
#include <dune/grid/common/partitionset.hh>
|
||||
#include <dune/common/version.hh>
|
||||
#if HAVE_MPI
|
||||
#include <opm/simulators/utils/MPISerializer.hpp>
|
||||
#endif
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
||||
@ -123,7 +122,7 @@ MPIPartitionFromFile::operator()(const Dune::CpGrid& grid) const
|
||||
std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>> externalLoadBalancer;
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::EclGenericCpGridVanguard()
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::GenericCpGridVanguard()
|
||||
{
|
||||
this->mpiRank = 0;
|
||||
|
||||
@ -133,7 +132,7 @@ EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::EclGenericCpGridVanguar
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::releaseEquilGrid()
|
||||
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::releaseEquilGrid()
|
||||
{
|
||||
this->equilGrid_.reset();
|
||||
this->equilCartesianIndexMapper_.reset();
|
||||
@ -141,7 +140,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::releaseEquilGrid()
|
||||
|
||||
#if HAVE_MPI
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
void GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const bool serialPartitioning,
|
||||
@ -219,7 +218,8 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::distributeFieldProps_(EclipseState& eclState1)
|
||||
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::
|
||||
distributeFieldProps_(EclipseState& eclState1)
|
||||
{
|
||||
OPM_TIMEBLOCK(distributeFProps);
|
||||
const auto mpiSize = this->grid_->comm().size();
|
||||
@ -250,7 +250,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::distributeFieldPro
|
||||
|
||||
template <class ElementMapper, class GridView, class Scalar>
|
||||
std::vector<double>
|
||||
EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
extractFaceTrans(const GridView& gridView) const
|
||||
{
|
||||
auto faceTrans = std::vector<double>(this->grid_->numFaces(), 0.0);
|
||||
@ -275,7 +275,7 @@ extractFaceTrans(const GridView& gridView) const
|
||||
|
||||
template <class ElementMapper, class GridView, class Scalar>
|
||||
void
|
||||
EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const bool serialPartitioning,
|
||||
@ -311,7 +311,7 @@ distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
|
||||
template <class ElementMapper, class GridView, class Scalar>
|
||||
void
|
||||
EclGenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
GenericCpGridVanguard<ElementMapper, GridView, Scalar>::
|
||||
distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
const bool ownersFirst,
|
||||
const bool serialPartitioning,
|
||||
@ -358,7 +358,7 @@ distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
#endif // HAVE_MPI
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(EclipseState& eclState)
|
||||
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(EclipseState& eclState)
|
||||
{
|
||||
const EclipseGrid* input_grid = nullptr;
|
||||
std::vector<double> global_porv;
|
||||
@ -462,7 +462,8 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(Ecl
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doFilterConnections_(Schedule& schedule)
|
||||
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::
|
||||
doFilterConnections_(Schedule& schedule)
|
||||
{
|
||||
// We only filter if we hold the global grid. Otherwise the filtering
|
||||
// is done after load balancing as in the future the other processes
|
||||
@ -493,7 +494,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doFilterConnection
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
const Dune::CpGrid&
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilGrid() const
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilGrid() const
|
||||
{
|
||||
assert(mpiRank == 0);
|
||||
return *equilGrid_;
|
||||
@ -501,14 +502,14 @@ EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilGrid() const
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
const Dune::CartesianIndexMapper<Dune::CpGrid>&
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::cartesianIndexMapper() const
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::cartesianIndexMapper() const
|
||||
{
|
||||
return *cartesianIndexMapper_;
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
const Dune::CartesianIndexMapper<Dune::CpGrid>&
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilCartesianIndexMapper() const
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilCartesianIndexMapper() const
|
||||
{
|
||||
assert(mpiRank == 0);
|
||||
assert(equilCartesianIndexMapper_);
|
||||
@ -517,7 +518,7 @@ EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::equilCartesianIndexMapp
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
Scalar
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::
|
||||
GenericCpGridVanguard<ElementMapper,GridView,Scalar>::
|
||||
computeCellThickness(const typename GridView::template Codim<0>::Entity& element) const
|
||||
{
|
||||
typedef typename Element::Geometry Geometry;
|
||||
@ -540,7 +541,7 @@ computeCellThickness(const typename GridView::template Codim<0>::Entity& element
|
||||
zz2 /=4;
|
||||
return zz2-zz1;
|
||||
}
|
||||
template class EclGenericCpGridVanguard<
|
||||
template class GenericCpGridVanguard<
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<
|
||||
Dune::GridView<
|
||||
Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>>,
|
||||
@ -549,7 +550,7 @@ template class EclGenericCpGridVanguard<
|
||||
double>;
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
template class EclGenericCpGridVanguard<
|
||||
template class GenericCpGridVanguard<
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<
|
||||
Dune::GridView<
|
||||
Dune::Fem::GridPart2GridViewTraits<
|
||||
@ -565,7 +566,7 @@ template class EclGenericCpGridVanguard<
|
||||
false>>>,
|
||||
double>;
|
||||
|
||||
template class EclGenericCpGridVanguard<
|
||||
template class GenericCpGridVanguard<
|
||||
Dune::MultipleCodimMultipleGeomTypeMapper<
|
||||
Dune::Fem::GridPart2GridViewImpl<
|
||||
Dune::Fem::AdaptiveLeafGridPart<
|
@ -22,10 +22,10 @@
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
* \copydoc Opm::EclCpGridVanguard
|
||||
* \copydoc Opm::CpGridVanguard
|
||||
*/
|
||||
#ifndef EWOMS_ECL_CP_GRID_GENERIC_VANGUARD_HH
|
||||
#define EWOMS_ECL_CP_GRID_GENERIC_VANGUARD_HH
|
||||
#ifndef OPM_GENERIC_CPGRID_VANGUARD_HPP
|
||||
#define OPM_GENERIC_CPGRID_VANGUARD_HPP
|
||||
|
||||
#include <ebos/eclgenericvanguard.hh>
|
||||
|
||||
@ -74,15 +74,15 @@ private:
|
||||
extern std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>> externalLoadBalancer;
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
class EclGenericCpGridVanguard {
|
||||
class GenericCpGridVanguard {
|
||||
protected:
|
||||
using CartesianIndexMapper = Dune::CartesianIndexMapper<Dune::CpGrid>;
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
|
||||
public:
|
||||
EclGenericCpGridVanguard();
|
||||
GenericCpGridVanguard();
|
||||
|
||||
virtual ~EclGenericCpGridVanguard() = default;
|
||||
virtual ~GenericCpGridVanguard() = default;
|
||||
|
||||
/*!
|
||||
* \brief Return a reference to the simulation grid.
|
||||
@ -213,4 +213,4 @@ protected:
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#endif
|
||||
#endif // OPM_GENERIC_CPGRID_VANGUARD_HPP
|
Loading…
Reference in New Issue
Block a user