mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3273 from akva2/clang_cleanups
Quell various clang warnings
This commit is contained in:
commit
dee7030784
@ -52,6 +52,8 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>> externalLoadBalancer;
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::EclGenericCpGridVanguard()
|
||||
{
|
||||
@ -102,7 +104,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doLoadBalance_(Dun
|
||||
const auto& gridView = grid_->leafGridView();
|
||||
unsigned numFaces = grid_->numFaces();
|
||||
std::vector<double> faceTrans;
|
||||
int loadBalancerSet = externalLoadBalancer_.has_value();
|
||||
int loadBalancerSet = externalLoadBalancer.has_value();
|
||||
grid_->comm().broadcast(&loadBalancerSet, 1, 0);
|
||||
if (!loadBalancerSet){
|
||||
faceTrans.resize(numFaces, 0.0);
|
||||
@ -150,7 +152,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doLoadBalance_(Dun
|
||||
std::vector<int> parts;
|
||||
if (grid_->comm().rank() == 0)
|
||||
{
|
||||
parts = (*externalLoadBalancer_)(*grid_);
|
||||
parts = (*externalLoadBalancer)(*grid_);
|
||||
}
|
||||
parallelWells = std::get<1>(grid_->loadBalance(handle, parts, &wells, ownersFirst, false, 1));
|
||||
}
|
||||
@ -367,10 +369,6 @@ Scalar EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::computeCellThick
|
||||
return zz2-zz1;
|
||||
}
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>>
|
||||
EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::externalLoadBalancer_;
|
||||
|
||||
#if HAVE_DUNE_FEM
|
||||
template class EclGenericCpGridVanguard<Dune::MultipleCodimMultipleGeomTypeMapper<
|
||||
Dune::GridView<
|
||||
|
@ -34,6 +34,11 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
/// \brief optional functor returning external load balancing information
|
||||
///
|
||||
/// If it is set then this will be used during loadbalance.
|
||||
extern std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>> externalLoadBalancer;
|
||||
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
class EclGenericCpGridVanguard {
|
||||
protected:
|
||||
@ -43,6 +48,8 @@ protected:
|
||||
public:
|
||||
EclGenericCpGridVanguard();
|
||||
|
||||
virtual ~EclGenericCpGridVanguard() = default;
|
||||
|
||||
/*!
|
||||
* \brief Return a reference to the simulation grid.
|
||||
*/
|
||||
@ -80,7 +87,7 @@ public:
|
||||
/// The information is a vector of integers indication the partition index for each cell id.
|
||||
static void setExternalLoadBalancer(const std::function<std::vector<int> (const Dune::CpGrid&)>& loadBalancer)
|
||||
{
|
||||
externalLoadBalancer_ = loadBalancer;
|
||||
externalLoadBalancer = loadBalancer;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -129,10 +136,6 @@ protected:
|
||||
std::unique_ptr<CartesianIndexMapper> cartesianIndexMapper_;
|
||||
std::unique_ptr<CartesianIndexMapper> equilCartesianIndexMapper_;
|
||||
|
||||
/// \brief optional functor returning external load balancing information
|
||||
///
|
||||
/// If it is set then this will be used during loadbalance.
|
||||
static std::optional<std::function<std::vector<int> (const Dune::CpGrid&)>> externalLoadBalancer_;
|
||||
int mpiRank;
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ namespace Action { class State; }
|
||||
class Deck;
|
||||
class EclipseState;
|
||||
class ErrorGuard;
|
||||
class NumericalAquiferCell;
|
||||
struct NumericalAquiferCell;
|
||||
class ParseContext;
|
||||
class Schedule;
|
||||
class Python;
|
||||
|
@ -49,19 +49,19 @@ class RestartValue;
|
||||
|
||||
namespace data
|
||||
{
|
||||
class CellData;
|
||||
class Connection;
|
||||
class CurrentControl;
|
||||
struct CellData;
|
||||
struct Connection;
|
||||
struct CurrentControl;
|
||||
class GroupAndNetworkValues;
|
||||
class GroupConstraints;
|
||||
class GroupData;
|
||||
class GroupGuideRates;
|
||||
struct GroupConstraints;
|
||||
struct GroupData;
|
||||
struct GroupGuideRates;
|
||||
class GuideRateValue;
|
||||
class NodeData;
|
||||
struct NodeData;
|
||||
class Rates;
|
||||
class Segment;
|
||||
struct Segment;
|
||||
class Solution;
|
||||
class Well;
|
||||
struct Well;
|
||||
class WellRates;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Opm
|
||||
|
||||
class DeferredLogger;
|
||||
class GroupState;
|
||||
class PhaseUsage;
|
||||
struct PhaseUsage;
|
||||
|
||||
namespace WellGroupHelpers
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ class DeferredLogger;
|
||||
class Group;
|
||||
class GroupState;
|
||||
namespace Network { class ExtNetwork; }
|
||||
class PhaseUsage;
|
||||
struct PhaseUsage;
|
||||
class Schedule;
|
||||
class VFPProdProperties;
|
||||
class WellStateFullyImplicitBlackoil;
|
||||
|
Loading…
Reference in New Issue
Block a user