mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add ownersFirst arguments. Change loadBalance to match change in opm-grid.
This commit is contained in:
parent
5b457cbbd6
commit
1fb0860712
@ -78,6 +78,7 @@ NEW_PROP_TAG(EclOutputInterval);
|
||||
NEW_PROP_TAG(IgnoreKeywords);
|
||||
NEW_PROP_TAG(EnableExperiments);
|
||||
NEW_PROP_TAG(EdgeWeightsMethod);
|
||||
NEW_PROP_TAG(OwnersFirst);
|
||||
|
||||
SET_STRING_PROP(EclBaseVanguard, IgnoreKeywords, "");
|
||||
SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, "");
|
||||
@ -86,6 +87,7 @@ SET_BOOL_PROP(EclBaseVanguard, EnableOpmRstFile, false);
|
||||
SET_BOOL_PROP(EclBaseVanguard, EclStrictParsing, false);
|
||||
SET_BOOL_PROP(EclBaseVanguard, SchedRestart, true);
|
||||
SET_INT_PROP(EclBaseVanguard, EdgeWeightsMethod, 1);
|
||||
SET_BOOL_PROP(EclBaseVanguard, OwnersFirst, false);
|
||||
|
||||
END_PROPERTIES
|
||||
|
||||
@ -133,6 +135,8 @@ public:
|
||||
"When restarting: should we try to initialize wells and groups from historical SCHEDULE section.");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, int, EdgeWeightsMethod,
|
||||
"Choose edge-weighing strategy: 0=uniform, 1=trans, 2=log(trans).");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, OwnersFirst,
|
||||
"Order cells owned by rank before ghost/overlap cells.");
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -265,6 +269,7 @@ public:
|
||||
|
||||
std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
|
||||
edgeWeightsMethod_ = Dune::EdgeWeightMethod(EWOMS_GET_PARAM(TypeTag, int, EdgeWeightsMethod));
|
||||
ownersFirst_ = EWOMS_GET_PARAM(TypeTag, bool, OwnersFirst);
|
||||
|
||||
// Skip processing of filename if external deck already exists.
|
||||
if (!externalDeck_)
|
||||
@ -451,6 +456,13 @@ public:
|
||||
*/
|
||||
Dune::EdgeWeightMethod edgeWeightsMethod() const
|
||||
{ return edgeWeightsMethod_; }
|
||||
|
||||
/*!
|
||||
* \brief Parameter that decide if cells owned by rank are ordered before ghost cells.
|
||||
*/
|
||||
bool ownersFirst() const
|
||||
{ return ownersFirst_; }
|
||||
|
||||
/*!
|
||||
* \brief Returns the name of the case.
|
||||
*
|
||||
@ -619,6 +631,7 @@ private:
|
||||
Opm::SummaryConfig* eclSummaryConfig_;
|
||||
|
||||
Dune::EdgeWeightMethod edgeWeightsMethod_;
|
||||
bool ownersFirst_;
|
||||
|
||||
protected:
|
||||
/*! \brief The cell centroids after loadbalance was called.
|
||||
|
@ -159,6 +159,7 @@ public:
|
||||
}
|
||||
|
||||
Dune::EdgeWeightMethod edgeWeightsMethod = this->edgeWeightsMethod();
|
||||
bool ownersFirst = this->ownersFirst();
|
||||
|
||||
// convert to transmissibility for faces
|
||||
// TODO: grid_->numFaces() is not generic. use grid_->size(1) instead? (might
|
||||
@ -192,6 +193,9 @@ public:
|
||||
{
|
||||
const auto wells = this->schedule().getWellsatEnd();
|
||||
|
||||
auto& eclState = static_cast<ParallelEclipseState&>(this->eclState());
|
||||
const EclipseGrid* eclGrid = nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
auto& eclState = dynamic_cast<ParallelEclipseState&>(this->eclState());
|
||||
@ -205,6 +209,7 @@ public:
|
||||
PropsCentroidsDataHandle<Dune::CpGrid> handle(*grid_, eclState, eclGrid, this->centroids_,
|
||||
cartesianIndexMapper());
|
||||
defunctWellNames_ = std::get<1>(grid_->loadBalance(handle, edgeWeightsMethod, &wells, faceTrans.data()));
|
||||
//defunctWellNames_ = std::get<1>(grid_->loadBalance(edgeWeightsMethod, ownersFirst, &wells, faceTrans.data()));
|
||||
}
|
||||
catch(const std::bad_cast& e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user