Merge pull request #3258 from akva2/janitoring

quell warnings in serial build
This commit is contained in:
Bård Skaflestad 2021-05-14 00:23:13 +02:00 committed by GitHub
commit 9b936390bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 11 deletions

View File

@ -131,18 +131,23 @@ public:
*/
void loadBalance()
{
#if HAVE_MPI
this->doLoadBalance_(this->edgeWeightsMethod(), this->ownersFirst(),
this->serialPartitioning(), this->enableDistributedWells(),
this->zoltanImbalanceTol(), this->gridView(),
this->schedule(), this->centroids_,
this->eclState(), this->parallelWells_);
#endif
this->allocCartMapper();
this->updateGridView_();
this->updateCartesianToCompressedMapping_();
this->updateCellDepths_();
this->updateCellThickness_();
#if HAVE_MPI
this->distributeFieldProps_(this->eclState());
#endif
}

View File

@ -69,16 +69,19 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::releaseEquilGrid()
equilCartesianIndexMapper_.reset();
}
#if HAVE_MPI
template<class ElementMapper, class GridView, class Scalar>
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doLoadBalance_(Dune::EdgeWeightMethod edgeWeightsMethod,
bool ownersFirst, bool serialPartitioning,
bool enableDistributedWells, double zoltanImbalanceTol,
const GridView& gridv, const Schedule& schedule,
bool ownersFirst,
bool serialPartitioning,
bool enableDistributedWells,
double zoltanImbalanceTol,
const GridView& gridv,
const Schedule& schedule,
std::vector<double>& centroids,
EclipseState& eclState1,
EclGenericVanguard::ParallelWellStruct& parallelWells)
{
#if HAVE_MPI
int mpiSize = 1;
MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
@ -177,15 +180,11 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doLoadBalance_(Dun
// But we need all connections to figure out the first cell of a well (e.g. for
// pressure). Hence this is now skipped. Rank 0 had everything even before.
}
#endif
this->cartesianIndexMapper_.reset(new CartesianIndexMapper(this->grid()));
}
template<class ElementMapper, class GridView, class Scalar>
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::distributeFieldProps_(EclipseState& eclState1)
{
#if HAVE_MPI
int mpiSize = 1;
MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
@ -206,9 +205,14 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::distributeFieldPro
std::rethrow_exception(std::current_exception());
}
}
#endif
}
#endif
template<class ElementMapper, class GridView, class Scalar>
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::allocCartMapper()
{
this->cartesianIndexMapper_.reset(new CartesianIndexMapper(this->grid()));
}
template<class ElementMapper, class GridView, class Scalar>
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(EclipseState& eclState)

View File

@ -100,6 +100,7 @@ protected:
*
* (For parallel simulation runs.)
*/
#if HAVE_MPI
void doLoadBalance_(Dune::EdgeWeightMethod edgeWeightsMethod,
bool ownersFirst, bool serialPartitioning,
bool enableDistributedWells, double zoltanImbalanceTol,
@ -108,9 +109,12 @@ protected:
EclipseState& eclState,
EclGenericVanguard::ParallelWellStruct& parallelWells);
void doCreateGrids_(EclipseState& eclState);
void distributeFieldProps_(EclipseState& eclState);
#endif
void allocCartMapper();
void doCreateGrids_(EclipseState& eclState);
virtual void allocTrans() = 0;
virtual double getTransmissibility(unsigned I, unsigned J) = 0;