mark constructors explicit

This commit is contained in:
Arne Morten Kvarving 2025-01-21 10:54:54 +01:00
parent 990c3f0248
commit 6d964c1370
145 changed files with 184 additions and 181 deletions

View File

@ -235,7 +235,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
Co2InjectionProblem(Simulator& simulator) explicit Co2InjectionProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -184,7 +184,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
CuvetteProblem(Simulator& simulator) explicit CuvetteProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, eps_(1e-6) , eps_(1e-6)
{ } { }

View File

@ -164,7 +164,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
DiffusionProblem(Simulator& simulator) explicit DiffusionProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -215,7 +215,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
FingerProblem(Simulator& simulator) explicit FingerProblem(Simulator& simulator)
: ParentType(simulator), : ParentType(simulator),
materialParams_( simulator.vanguard().grid(), codim ) materialParams_( simulator.vanguard().grid(), codim )
{ {

View File

@ -224,7 +224,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
FractureProblem(Simulator& simulator) explicit FractureProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -168,7 +168,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
GroundWaterProblem(Simulator& simulator) explicit GroundWaterProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -166,7 +166,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
InfiltrationProblem(Simulator& simulator) explicit InfiltrationProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, eps_(1e-6) , eps_(1e-6)
{ } { }

View File

@ -217,7 +217,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
LensProblem(Simulator& simulator) explicit LensProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -180,7 +180,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
ObstacleProblem(Simulator& simulator) explicit ObstacleProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -129,7 +129,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
OutflowProblem(Simulator& simulator) explicit OutflowProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, eps_(1e-6) , eps_(1e-6)
{ } { }

View File

@ -179,7 +179,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
PowerInjectionProblem(Simulator& simulator) explicit PowerInjectionProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -205,7 +205,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
ReservoirProblem(Simulator& simulator) explicit ReservoirProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -162,7 +162,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
RichardsLensProblem(Simulator& simulator) explicit RichardsLensProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, pnRef_(1e5) , pnRef_(1e5)
{ {

View File

@ -221,7 +221,7 @@ public:
/*! /*!
* \copydoc Doxygen::defaultProblemConstructor * \copydoc Doxygen::defaultProblemConstructor
*/ */
WaterAirProblem(Simulator& simulator) explicit WaterAirProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -164,7 +164,7 @@ class Tutorial1Problem
public: public:
//! The constructor of the problem. This only _allocates_ the memory required by the //! The constructor of the problem. This only _allocates_ the memory required by the
//! problem. The constructor is supposed to _never ever_ throw an exception. //! problem. The constructor is supposed to _never ever_ throw an exception.
Tutorial1Problem(Simulator& simulator) explicit Tutorial1Problem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, eps_(3e-6) , eps_(3e-6)
{ } { }

View File

@ -39,7 +39,7 @@ class EmptyModel : public BaseAuxiliaryModule<TypeTag>
public: public:
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
EmptyModel(Simulator& /*simulator*/) explicit EmptyModel(Simulator& /*simulator*/)
{ {
} }

View File

@ -307,7 +307,7 @@ public:
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>; using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
BlackOilModel(Simulator& simulator) explicit BlackOilModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
eqWeights_.resize(numEq, 1.0); eqWeights_.resize(numEq, 1.0);

View File

@ -71,7 +71,7 @@ class BlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
static constexpr bool enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>(); static constexpr bool enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>();
public: public:
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator) explicit BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
{ {
bparams_.read(); bparams_.read();
} }

View File

@ -166,7 +166,7 @@ public:
/*! /*!
* \copydoc ImmisciblePrimaryVariables::ImmisciblePrimaryVariables(Scalar) * \copydoc ImmisciblePrimaryVariables::ImmisciblePrimaryVariables(Scalar)
*/ */
BlackOilPrimaryVariables(Scalar value) explicit BlackOilPrimaryVariables(Scalar value)
: ParentType(value) : ParentType(value)
{ {
Valgrind::SetUndefined(primaryVarsMeaningWater_); Valgrind::SetUndefined(primaryVarsMeaningWater_);

View File

@ -54,7 +54,7 @@ public:
* *
* \param simulator The manager object of the simulation * \param simulator The manager object of the simulation
*/ */
BlackOilProblem(Simulator& simulator) explicit BlackOilProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{} {}

View File

@ -169,7 +169,7 @@ class MultiPhaseBaseModel : public GetPropType<TypeTag, Properties::Discretizati
enum { numComponents = FluidSystem::numComponents }; enum { numComponents = FluidSystem::numComponents };
public: public:
MultiPhaseBaseModel(Simulator& simulator) explicit MultiPhaseBaseModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -82,7 +82,7 @@ public:
/*! /*!
* \copydoc Problem::FvBaseProblem(Simulator& ) * \copydoc Problem::FvBaseProblem(Simulator& )
*/ */
MultiPhaseBaseProblem(Simulator& simulator) explicit MultiPhaseBaseProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ init_(); } { init_(); }

View File

@ -56,7 +56,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
TemperatureCallback(const ElementContext& elemCtx) explicit TemperatureCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{} {}
@ -92,7 +92,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
PressureCallback(const ElementContext& elemCtx) explicit PressureCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ Valgrind::SetUndefined(phaseIdx_); } { Valgrind::SetUndefined(phaseIdx_); }
@ -203,7 +203,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
DensityCallback(const ElementContext& elemCtx) explicit DensityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ Valgrind::SetUndefined(phaseIdx_); } { Valgrind::SetUndefined(phaseIdx_); }
@ -251,7 +251,7 @@ public:
using ResultType = decltype(std::declval<IQFluidState>().molarDensity(0)); using ResultType = decltype(std::declval<IQFluidState>().molarDensity(0));
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
MolarDensityCallback(const ElementContext& elemCtx) explicit MolarDensityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ Valgrind::SetUndefined(phaseIdx_); } { Valgrind::SetUndefined(phaseIdx_); }
@ -300,7 +300,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
ViscosityCallback(const ElementContext& elemCtx) explicit ViscosityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ Valgrind::SetUndefined(phaseIdx_); } { Valgrind::SetUndefined(phaseIdx_); }
@ -352,7 +352,7 @@ public:
using ResultFieldType = typename ResultType::field_type; using ResultFieldType = typename ResultType::field_type;
using ResultFieldValueType = typename MathToolbox<ResultFieldType>::ValueType; using ResultFieldValueType = typename MathToolbox<ResultFieldType>::ValueType;
VelocityCallback(const ElementContext& elemCtx) explicit VelocityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{} {}
@ -384,7 +384,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
VelocityComponentCallback(const ElementContext& elemCtx) explicit VelocityComponentCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ Valgrind::SetUndefined(dimIdx_); } { Valgrind::SetUndefined(dimIdx_); }
@ -433,7 +433,7 @@ public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type; using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename MathToolbox<ResultType>::ValueType; using ResultValueType = typename MathToolbox<ResultType>::ValueType;
MoleFractionCallback(const ElementContext& elemCtx) explicit MoleFractionCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx) : elemCtx_(elemCtx)
{ {
Valgrind::SetUndefined(phaseIdx_); Valgrind::SetUndefined(phaseIdx_);

View File

@ -121,7 +121,7 @@ class DiscreteFractureModel : public ImmiscibleModel<TypeTag>
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
public: public:
DiscreteFractureModel(Simulator& simulator) explicit DiscreteFractureModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if (Parameters::Get<Parameters::EnableIntensiveQuantityCache>()) { if (Parameters::Get<Parameters::EnableIntensiveQuantityCache>()) {

View File

@ -62,7 +62,7 @@ public:
/*! /*!
* \copydoc Problem::FvBaseProblem(Simulator& ) * \copydoc Problem::FvBaseProblem(Simulator& )
*/ */
DiscreteFractureProblem(Simulator& simulator) explicit DiscreteFractureProblem(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{} {}

View File

@ -389,7 +389,7 @@ public:
// this constructor required to be explicitly specified because // this constructor required to be explicitly specified because
// we've defined a constructor above which deletes all implicitly // we've defined a constructor above which deletes all implicitly
// generated constructors in C++. // generated constructors in C++.
FvBaseDiscretization(Simulator& simulator) explicit FvBaseDiscretization(Simulator& simulator)
: simulator_(simulator) : simulator_(simulator)
, gridView_(simulator.gridView()) , gridView_(simulator.gridView())
, elementMapper_(gridView_, Dune::mcmgElementLayout()) , elementMapper_(gridView_, Dune::mcmgElementLayout())
@ -1962,7 +1962,7 @@ public:
} }
}; };
FvBaseDiscretizationNoAdapt(Simulator& simulator) explicit FvBaseDiscretizationNoAdapt(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if (this->enableGridAdaptation_) { if (this->enableGridAdaptation_) {

View File

@ -101,7 +101,7 @@ public:
} }
}; };
FvBaseDiscretizationFemAdapt(Simulator& simulator) explicit FvBaseDiscretizationFemAdapt(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
, space_(simulator.vanguard().gridPart()) , space_(simulator.vanguard().gridPart())
{ {

View File

@ -69,7 +69,7 @@ class FvBaseNewtonConvergenceWriter
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>; using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
public: public:
FvBaseNewtonConvergenceWriter(NewtonMethod& nm) explicit FvBaseNewtonConvergenceWriter(NewtonMethod& nm)
: newtonMethod_(nm) : newtonMethod_(nm)
{ {
timeStepIdx_ = 0; timeStepIdx_ = 0;

View File

@ -96,7 +96,7 @@ class FvBaseNewtonMethod : public NewtonMethod<TypeTag>
public: public:
FvBaseNewtonMethod(Simulator& simulator) explicit FvBaseNewtonMethod(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -114,7 +114,7 @@ public:
* \param gridView The view on the DUNE grid which ought to be * \param gridView The view on the DUNE grid which ought to be
* used (normally the leaf grid view) * used (normally the leaf grid view)
*/ */
FvBaseProblem(Simulator& simulator) explicit FvBaseProblem(Simulator& simulator)
: nextTimeStepSize_(0.0) : nextTimeStepSize_(0.0)
, gridView_(simulator.gridView()) , gridView_(simulator.gridView())
, elementMapper_(gridView_, Dune::mcmgElementLayout()) , elementMapper_(gridView_, Dune::mcmgElementLayout())

View File

@ -102,8 +102,8 @@ public:
template <class TypeTag> template <class TypeTag>
struct DummySpaceEcfv { struct DummySpaceEcfv {
using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>; using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>;
DummySpaceEcfv(const DiscreteFunctionSpace&) {}; explicit DummySpaceEcfv(const DiscreteFunctionSpace&) {};
DummySpaceEcfv(const int&) {}; explicit DummySpaceEcfv(const int&) {};
}; };
template <class TypeTag> template <class TypeTag>
@ -154,7 +154,7 @@ class EcfvDiscretization : public GetPropType<TypeTag, Properties::BaseDiscretiz
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
public: public:
EcfvDiscretization(Simulator& simulator) explicit EcfvDiscretization(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -93,7 +93,7 @@ public:
SubControlVolume() SubControlVolume()
{} {}
SubControlVolume(const Element& element) explicit SubControlVolume(const Element& element)
: element_(element) : element_(element)
{ update(); } { update(); }

View File

@ -114,8 +114,8 @@ public:
template <class TypeTag> template <class TypeTag>
struct DummySpaceVcfv { struct DummySpaceVcfv {
using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>; using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>;
DummySpaceVcfv(const DiscreteFunctionSpace&) {}; explicit DummySpaceVcfv(const DiscreteFunctionSpace&) {};
DummySpaceVcfv(const int&) {}; explicit DummySpaceVcfv(const int&) {};
}; };
template <class TypeTag> template <class TypeTag>
@ -162,7 +162,7 @@ class VcfvDiscretization : public GetPropType<TypeTag, Properties::BaseDiscretiz
enum { dim = GridView::dimension }; enum { dim = GridView::dimension };
public: public:
VcfvDiscretization(Simulator& simulator) explicit VcfvDiscretization(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -196,7 +196,7 @@ class FlashModel
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>; using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
public: public:
FlashModel(Simulator& simulator) explicit FlashModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{} {}

View File

@ -65,7 +65,7 @@ public:
/*! /*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar) * \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
*/ */
FlashRateVector(const Evaluation& value) : ParentType(value) explicit FlashRateVector(const Evaluation& value) : ParentType(value)
{} {}
/*! /*!

View File

@ -226,7 +226,7 @@ class ImmiscibleModel
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>; using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
public: public:
ImmiscibleModel(Simulator& simulator) explicit ImmiscibleModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{} {}

View File

@ -74,7 +74,7 @@ public:
* *
* \param value The scalar value to which all entries of the vector will be set. * \param value The scalar value to which all entries of the vector will be set.
*/ */
ImmiscibleRateVector(const Evaluation& value) explicit ImmiscibleRateVector(const Evaluation& value)
: ParentType(value) : ParentType(value)
{} {}

View File

@ -57,7 +57,7 @@ class BaseVanguard
#endif #endif
public: public:
BaseVanguard(Simulator& simulator) explicit BaseVanguard(Simulator& simulator)
: simulator_(simulator) : simulator_(simulator)
{} {}

View File

@ -95,7 +95,7 @@ public:
/*! /*!
* \brief Create the grid * \brief Create the grid
*/ */
CubeGridVanguard(Simulator& simulator) explicit CubeGridVanguard(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
std::array<unsigned int, dim> cellRes; std::array<unsigned int, dim> cellRes;

View File

@ -72,7 +72,7 @@ public:
/*! /*!
* \brief Load the grid from the file. * \brief Load the grid from the file.
*/ */
DgfVanguard(Simulator& simulator) explicit DgfVanguard(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
const std::string dgfFileName = Parameters::Get<Parameters::GridFile>(); const std::string dgfFileName = Parameters::Get<Parameters::GridFile>();

View File

@ -132,7 +132,7 @@ public:
/*! /*!
* \brief Create the grid for the lens problem * \brief Create the grid for the lens problem
*/ */
StructuredGridVanguard(Simulator& simulator) explicit StructuredGridVanguard(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
Dune::FieldVector<int, dim> cellRes; Dune::FieldVector<int, dim> cellRes;

View File

@ -71,7 +71,7 @@ class VtkBlackOilEnergyModule : public BaseOutputModule<TypeTag>
using PhaseBuffer = typename ParentType::PhaseBuffer; using PhaseBuffer = typename ParentType::PhaseBuffer;
public: public:
VtkBlackOilEnergyModule(const Simulator& simulator) explicit VtkBlackOilEnergyModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if constexpr (enableEnergy) { if constexpr (enableEnergy) {

View File

@ -67,7 +67,7 @@ class VtkBlackOilMICPModule : public BaseOutputModule<TypeTag>
using ScalarBuffer = typename ParentType::ScalarBuffer; using ScalarBuffer = typename ParentType::ScalarBuffer;
public: public:
VtkBlackOilMICPModule(const Simulator& simulator) explicit VtkBlackOilMICPModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if constexpr (enableMICP) { if constexpr (enableMICP) {

View File

@ -75,7 +75,7 @@ class VtkBlackOilModule : public BaseOutputModule<TypeTag>
using ScalarBuffer = typename ParentType::ScalarBuffer; using ScalarBuffer = typename ParentType::ScalarBuffer;
public: public:
VtkBlackOilModule(const Simulator& simulator) explicit VtkBlackOilModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -75,7 +75,7 @@ class VtkBlackOilPolymerModule : public BaseOutputModule<TypeTag>
using ScalarBuffer = typename ParentType::ScalarBuffer; using ScalarBuffer = typename ParentType::ScalarBuffer;
public: public:
VtkBlackOilPolymerModule(const Simulator& simulator) explicit VtkBlackOilPolymerModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if constexpr (enablePolymer) { if constexpr (enablePolymer) {

View File

@ -68,7 +68,7 @@ class VtkBlackOilSolventModule : public BaseOutputModule<TypeTag>
using ScalarBuffer = typename ParentType::ScalarBuffer; using ScalarBuffer = typename ParentType::ScalarBuffer;
public: public:
VtkBlackOilSolventModule(const Simulator& simulator) explicit VtkBlackOilSolventModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
if constexpr (enableSolvent) { if constexpr (enableSolvent) {

View File

@ -74,7 +74,7 @@ class VtkCompositionModule : public BaseOutputModule<TypeTag>
using PhaseComponentBuffer = typename ParentType::PhaseComponentBuffer; using PhaseComponentBuffer = typename ParentType::PhaseComponentBuffer;
public: public:
VtkCompositionModule(const Simulator& simulator) explicit VtkCompositionModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -75,7 +75,7 @@ class VtkDiffusionModule : public BaseOutputModule<TypeTag>
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() }; enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
public: public:
VtkDiffusionModule(const Simulator& simulator) explicit VtkDiffusionModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -84,7 +84,7 @@ class VtkDiscreteFractureModule : public BaseOutputModule<TypeTag>
using PhaseVectorBuffer = typename ParentType::PhaseVectorBuffer; using PhaseVectorBuffer = typename ParentType::PhaseVectorBuffer;
public: public:
VtkDiscreteFractureModule(const Simulator& simulator) explicit VtkDiscreteFractureModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -74,7 +74,7 @@ class VtkEnergyModule : public BaseOutputModule<TypeTag>
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>; using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
public: public:
VtkEnergyModule(const Simulator& simulator) explicit VtkEnergyModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -92,7 +92,7 @@ class VtkMultiPhaseModule : public BaseOutputModule<TypeTag>
using PhaseVectorBuffer = std::array<VectorBuffer, numPhases>; using PhaseVectorBuffer = std::array<VectorBuffer, numPhases>;
public: public:
VtkMultiPhaseModule(const Simulator& simulator) explicit VtkMultiPhaseModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -67,7 +67,7 @@ class VtkMultiWriter : public BaseOutputWriter
class WriteDataTasklet : public TaskletInterface class WriteDataTasklet : public TaskletInterface
{ {
public: public:
WriteDataTasklet(VtkMultiWriter& multiWriter) explicit WriteDataTasklet(VtkMultiWriter& multiWriter)
: multiWriter_(multiWriter) : multiWriter_(multiWriter)
{ } { }

View File

@ -60,7 +60,7 @@ class VtkPhasePresenceModule : public BaseOutputModule<TypeTag>
public: public:
VtkPhasePresenceModule(const Simulator& simulator) explicit VtkPhasePresenceModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -61,7 +61,7 @@ class VtkPrimaryVarsModule : public BaseOutputModule<TypeTag>
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() }; enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
public: public:
VtkPrimaryVarsModule(const Simulator& simulator) explicit VtkPrimaryVarsModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -63,7 +63,7 @@ class VtkTemperatureModule : public BaseOutputModule<TypeTag>
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>; using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
public: public:
VtkTemperatureModule(const Simulator& simulator) explicit VtkTemperatureModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
params_.read(); params_.read();

View File

@ -250,7 +250,7 @@ class NcpModel
using DiffusionModule = Opm::DiffusionModule<TypeTag, enableDiffusion>; using DiffusionModule = Opm::DiffusionModule<TypeTag, enableDiffusion>;
public: public:
NcpModel(Simulator& simulator) explicit NcpModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{} {}

View File

@ -75,7 +75,7 @@ public:
/*! /*!
* \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& ) * \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& )
*/ */
NcpNewtonMethod(Simulator& simulator) : ParentType(simulator) explicit NcpNewtonMethod(Simulator& simulator) : ParentType(simulator)
{} {}
protected: protected:

View File

@ -71,7 +71,7 @@ public:
/*! /*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar) * \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
*/ */
NcpRateVector(const Evaluation& value) explicit NcpRateVector(const Evaluation& value)
: ParentType(value) : ParentType(value)
{} {}

View File

@ -109,7 +109,7 @@ class NewtonMethod
using CollectiveCommunication = typename Dune::Communication<typename Dune::MPIHelper::MPICommunicator>; using CollectiveCommunication = typename Dune::Communication<typename Dune::MPIHelper::MPICommunicator>;
public: public:
NewtonMethod(Simulator& simulator) explicit NewtonMethod(Simulator& simulator)
: simulator_(simulator) : simulator_(simulator)
, endIterMsgStream_(std::ostringstream::out) , endIterMsgStream_(std::ostringstream::out)
, linearSolver_(simulator) , linearSolver_(simulator)

View File

@ -55,7 +55,7 @@ class NullConvergenceWriter
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>; using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
public: public:
NullConvergenceWriter(NewtonMethod&) explicit NullConvergenceWriter(NewtonMethod&)
{} {}
/*! /*!

View File

@ -54,7 +54,7 @@ public:
updateMpiDataSize_(); updateMpiDataSize_();
} }
MpiBuffer(size_t size) explicit MpiBuffer(size_t size)
{ {
data_ = new DataType[size]; data_ = new DataType[size];
dataSize_ = size; dataSize_ = size;

View File

@ -43,7 +43,7 @@ namespace Opm {
class TaskletInterface class TaskletInterface
{ {
public: public:
TaskletInterface(int refCount = 1) explicit TaskletInterface(int refCount = 1)
: referenceCount_(refCount) : referenceCount_(refCount)
{} {}
virtual ~TaskletInterface() {} virtual ~TaskletInterface() {}
@ -92,7 +92,7 @@ class TaskletRunner
class BarrierTasklet : public TaskletInterface class BarrierTasklet : public TaskletInterface
{ {
public: public:
BarrierTasklet(unsigned numWorkers); explicit BarrierTasklet(unsigned numWorkers);
void run(); void run();
@ -128,7 +128,7 @@ public:
* The number of worker threads may be 0. In this case, all work is done by the main * The number of worker threads may be 0. In this case, all work is done by the main
* thread (synchronous mode). * thread (synchronous mode).
*/ */
TaskletRunner(unsigned numWorkers); explicit TaskletRunner(unsigned numWorkers);
/*! /*!
* \brief Destructor * \brief Destructor

View File

@ -44,7 +44,7 @@ class ThreadedEntityIterator
using Entity = typename GridView::template Codim<codim>::Entity; using Entity = typename GridView::template Codim<codim>::Entity;
using EntityIterator = typename GridView::template Codim<codim>::Iterator; using EntityIterator = typename GridView::template Codim<codim>::Iterator;
public: public:
ThreadedEntityIterator(const GridView& gridView) explicit ThreadedEntityIterator(const GridView& gridView)
: sequentialIt_(gridView.template begin<codim>()) : sequentialIt_(gridView.template begin<codim>())
, sequentialEnd_(gridView.template end<codim>()) , sequentialEnd_(gridView.template end<codim>())
{ } { }

View File

@ -67,7 +67,7 @@ public:
/*! /*!
* \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& ) * \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& )
*/ */
FlashNewtonMethod(Simulator& simulator) : ParentType(simulator) explicit FlashNewtonMethod(Simulator& simulator) : ParentType(simulator)
{} {}
protected: protected:

View File

@ -285,7 +285,7 @@ class PvsModel
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>; using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
public: public:
PvsModel(Simulator& simulator) explicit PvsModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
verbosity_ = Parameters::Get<Parameters::PvsVerbosity>(); verbosity_ = Parameters::Get<Parameters::PvsVerbosity>();

View File

@ -66,7 +66,7 @@ class PvsNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonMethod
enum { switch0Idx = Indices::switch0Idx }; enum { switch0Idx = Indices::switch0Idx };
public: public:
PvsNewtonMethod(Simulator& simulator) : ParentType(simulator) explicit PvsNewtonMethod(Simulator& simulator) : ParentType(simulator)
{} {}
protected: protected:

View File

@ -71,7 +71,7 @@ public:
/*! /*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar) * \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
*/ */
PvsRateVector(const Evaluation& value) explicit PvsRateVector(const Evaluation& value)
: ParentType(value) : ParentType(value)
{} {}

View File

@ -277,7 +277,7 @@ class RichardsModel
"The liquid and the gas components must be different"); "The liquid and the gas components must be different");
public: public:
RichardsModel(Simulator& simulator) explicit RichardsModel(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
// the liquid phase must be liquid, the gas phase must be // the liquid phase must be liquid, the gas phase must be

View File

@ -64,7 +64,7 @@ class RichardsNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
using PhaseVector = Dune::FieldVector<Scalar, numPhases>; using PhaseVector = Dune::FieldVector<Scalar, numPhases>;
public: public:
RichardsNewtonMethod(Simulator& simulator) : ParentType(simulator) explicit RichardsNewtonMethod(Simulator& simulator) : ParentType(simulator)
{} {}
protected: protected:

View File

@ -69,7 +69,7 @@ public:
/*! /*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar) * \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
*/ */
RichardsRateVector(const Evaluation& value) explicit RichardsRateVector(const Evaluation& value)
: ParentType(value) : ParentType(value)
{} {}

View File

@ -42,7 +42,7 @@ template <class Callback>
class GenericGuard class GenericGuard
{ {
public: public:
GenericGuard(Callback& callback) explicit GenericGuard(Callback& callback)
: callback_(callback) : callback_(callback)
, isEnabled_(true) , isEnabled_(true)
{ } { }

View File

@ -103,12 +103,12 @@ public:
// do not allow to copy simulators around // do not allow to copy simulators around
Simulator(const Simulator& ) = delete; Simulator(const Simulator& ) = delete;
Simulator(bool verbose = true) explicit Simulator(bool verbose = true)
:Simulator(Communication(), verbose) :Simulator(Communication(), verbose)
{ {
} }
Simulator(Communication comm, bool verbose = true) explicit Simulator(Communication comm, bool verbose = true)
{ {
TimerGuard setupTimerGuard(setupTimer_); TimerGuard setupTimerGuard(setupTimer_);

View File

@ -40,7 +40,7 @@ namespace Opm {
class TimerGuard class TimerGuard
{ {
public: public:
TimerGuard(Timer& timer) explicit TimerGuard(Timer& timer)
: timer_(timer) : timer_(timer)
{ } { }

View File

@ -33,7 +33,7 @@ namespace Opm {
template<class Grid> template<class Grid>
struct IsNumericalAquiferCell { struct IsNumericalAquiferCell {
IsNumericalAquiferCell(const Grid&) explicit IsNumericalAquiferCell(const Grid&)
{} {}
template<class T> template<class T>
@ -42,7 +42,7 @@ struct IsNumericalAquiferCell {
template<> template<>
struct IsNumericalAquiferCell<Dune::CpGrid> { struct IsNumericalAquiferCell<Dune::CpGrid> {
IsNumericalAquiferCell(const Dune::CpGrid& grid) explicit IsNumericalAquiferCell(const Dune::CpGrid& grid)
: grid_(grid) : grid_(grid)
{} {}

View File

@ -116,7 +116,7 @@ public:
static constexpr int dimension = Grid::dimension; static constexpr int dimension = Grid::dimension;
static constexpr int dimensionworld = Grid::dimensionworld; static constexpr int dimensionworld = Grid::dimensionworld;
AluGridVanguard(Simulator& simulator) explicit AluGridVanguard(Simulator& simulator)
: FlowBaseVanguard<TypeTag>(simulator) : FlowBaseVanguard<TypeTag>(simulator)
{ {
this->mpiRank = FlowGenericVanguard::comm().rank(); this->mpiRank = FlowGenericVanguard::comm().rank();

View File

@ -52,7 +52,7 @@ class BaseAquiferModel
using RateVector = GetPropType<TypeTag, Properties::RateVector>; using RateVector = GetPropType<TypeTag, Properties::RateVector>;
public: public:
BaseAquiferModel(Simulator& simulator) explicit BaseAquiferModel(Simulator& simulator)
: simulator_(simulator) : simulator_(simulator)
{} {}

View File

@ -97,7 +97,7 @@ public:
//! \param model BlackOil model to solve for //! \param model BlackOil model to solve for
//! \param param param Model parameters //! \param param param Model parameters
//! \param compNames Names of the solution components //! \param compNames Names of the solution components
BlackoilModelNldd(BlackoilModel<TypeTag>& model) explicit BlackoilModelNldd(BlackoilModel<TypeTag>& model)
: model_(model), rank_(model_.simulator().vanguard().grid().comm().rank()) : model_(model), rank_(model_.simulator().vanguard().grid().comm().rank())
{ {
// Create partitions. // Create partitions.

View File

@ -110,7 +110,7 @@ private:
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
public: public:
CpGridVanguard(Simulator& simulator) explicit CpGridVanguard(Simulator& simulator)
: FlowBaseVanguard<TypeTag>(simulator) : FlowBaseVanguard<TypeTag>(simulator)
{ {
this->checkConsistency(); this->checkConsistency();

View File

@ -111,7 +111,7 @@ public:
// The Simulator object should preferably have been const - the // The Simulator object should preferably have been const - the
// only reason that is not the case is due to the SummaryState // only reason that is not the case is due to the SummaryState
// object owned deep down by the vanguard. // object owned deep down by the vanguard.
DamarisWriter(Simulator& simulator) explicit DamarisWriter(Simulator& simulator)
: BaseType(simulator.vanguard().schedule(), : BaseType(simulator.vanguard().schedule(),
simulator.vanguard().eclState(), simulator.vanguard().eclState(),
simulator.vanguard().summaryConfig(), simulator.vanguard().summaryConfig(),

View File

@ -148,7 +148,7 @@ public:
// The Simulator object should preferably have been const - the // The Simulator object should preferably have been const - the
// only reason that is not the case is due to the SummaryState // only reason that is not the case is due to the SummaryState
// object owned deep down by the vanguard. // object owned deep down by the vanguard.
EclWriter(Simulator& simulator) explicit EclWriter(Simulator& simulator)
: BaseType(simulator.vanguard().schedule(), : BaseType(simulator.vanguard().schedule(),
simulator.vanguard().eclState(), simulator.vanguard().eclState(),
simulator.vanguard().summaryConfig(), simulator.vanguard().summaryConfig(),

View File

@ -70,7 +70,7 @@ class FIBlackOilModel : public BlackOilModel<TypeTag>
static constexpr bool gridIsUnchanging = std::is_same_v<GetPropType<TypeTag, Properties::Grid>, Dune::CpGrid>; static constexpr bool gridIsUnchanging = std::is_same_v<GetPropType<TypeTag, Properties::Grid>, Dune::CpGrid>;
public: public:
FIBlackOilModel(Simulator& simulator) explicit FIBlackOilModel(Simulator& simulator)
: BlackOilModel<TypeTag>(simulator) : BlackOilModel<TypeTag>(simulator)
{ {
if constexpr (gridIsUnchanging) { if constexpr (gridIsUnchanging) {

View File

@ -114,7 +114,7 @@ public:
* This is the file format used by the commercial ECLiPSE simulator. Usually it uses * This is the file format used by the commercial ECLiPSE simulator. Usually it uses
* a cornerpoint description of the grid. * a cornerpoint description of the grid.
*/ */
FlowBaseVanguard(Simulator& simulator) explicit FlowBaseVanguard(Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ {
#if HAVE_MPI #if HAVE_MPI

View File

@ -70,7 +70,7 @@ class FlowThresholdPressure : public GenericThresholdPressure<GetPropType<TypeTa
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
public: public:
FlowThresholdPressure(const Simulator& simulator) explicit FlowThresholdPressure(const Simulator& simulator)
: BaseType(simulator.vanguard().cartesianIndexMapper(), : BaseType(simulator.vanguard().cartesianIndexMapper(),
simulator.vanguard().gridView(), simulator.vanguard().gridView(),
simulator.model().elementMapper(), simulator.model().elementMapper(),

View File

@ -136,7 +136,7 @@ public:
Main(int argc, char** argv, bool ownMPI = true); Main(int argc, char** argv, bool ownMPI = true);
// This constructor can be called from Python // This constructor can be called from Python
Main(const std::string& filename, bool mpi_init = true, bool mpi_finalize = true); explicit Main(const std::string& filename, bool mpi_init = true, bool mpi_finalize = true);
// This constructor can be called from Python when Python has // This constructor can be called from Python when Python has
// already parsed a deck // already parsed a deck

View File

@ -47,7 +47,7 @@ class MixingRateControls
public: public:
using Scalar = typename FluidSystem::Scalar; using Scalar = typename FluidSystem::Scalar;
MixingRateControls(const Schedule& schedule); explicit MixingRateControls(const Schedule& schedule);
MixingRateControls(const MixingRateControls& rhs); MixingRateControls(const MixingRateControls& rhs);
static MixingRateControls serializationTestObject(const Schedule& schedule); static MixingRateControls serializationTestObject(const Schedule& schedule);

View File

@ -107,7 +107,7 @@ public:
using TransmissibilityType = Transmissibility<Grid, GridView, ElementMapper, using TransmissibilityType = Transmissibility<Grid, GridView, ElementMapper,
CartesianIndexMapper, Scalar>; CartesianIndexMapper, Scalar>;
PolyhedralGridVanguard(Simulator& simulator) explicit PolyhedralGridVanguard(Simulator& simulator)
: FlowBaseVanguard<TypeTag>(simulator) : FlowBaseVanguard<TypeTag>(simulator)
, simulator_(simulator) , simulator_(simulator)
{ {

View File

@ -94,7 +94,7 @@ class TracerModel : public GenericTracerModel<GetPropType<TypeTag, Properties::G
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx }; enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
public: public:
TracerModel(Simulator& simulator) explicit TracerModel(Simulator& simulator)
: BaseType(simulator.vanguard().gridView(), : BaseType(simulator.vanguard().gridView(),
simulator.vanguard().eclState(), simulator.vanguard().eclState(),
simulator.vanguard().cartesianIndexMapper(), simulator.vanguard().cartesianIndexMapper(),

View File

@ -72,7 +72,7 @@ namespace Opm {
using ScalarBuffer = typename ParentType::ScalarBuffer; using ScalarBuffer = typename ParentType::ScalarBuffer;
public: public:
VtkTracerModule(const Simulator& simulator) explicit VtkTracerModule(const Simulator& simulator)
: ParentType(simulator) : ParentType(simulator)
{ } { }

View File

@ -65,7 +65,7 @@ public:
/*! \brief Constructor gets all parameters to operate the prec. /*! \brief Constructor gets all parameters to operate the prec.
\param A The matrix to operate on. \param A The matrix to operate on.
*/ */
MultithreadDILU(const M& A) explicit MultithreadDILU(const M& A)
: A_(A) : A_(A)
{ {
OPM_TIMEBLOCK(prec_construct); OPM_TIMEBLOCK(prec_construct);

View File

@ -82,7 +82,7 @@ struct NoReorderer : public Reorderer
struct RealReorderer : public Reorderer struct RealReorderer : public Reorderer
{ {
RealReorderer(const std::vector<std::size_t>& ordering) explicit RealReorderer(const std::vector<std::size_t>& ordering)
: ordering_(&ordering) : ordering_(&ordering)
{} {}
virtual std::size_t operator[](std::size_t i) const virtual std::size_t operator[](std::size_t i) const

View File

@ -53,7 +53,7 @@ public:
/// \brief Constructs an empty parallel information object using a communicator. /// \brief Constructs an empty parallel information object using a communicator.
/// \param communicator The communicator to use. /// \param communicator The communicator to use.
ParallelISTLInformation(MPI_Comm communicator); explicit ParallelISTLInformation(MPI_Comm communicator);
/// \brief Constructs a parallel information object from the specified information. /// \brief Constructs a parallel information object from the specified information.
/// \param indexSet The parallel index set to use. /// \param indexSet The parallel index set to use.
@ -234,7 +234,7 @@ private:
typename std::remove_const<typename BinaryOperator::result_type>::type typename std::remove_const<typename BinaryOperator::result_type>::type
>::type Result; >::type Result;
MaskToMinOperator(BinaryOperator b) explicit MaskToMinOperator(BinaryOperator b)
: b_(b) : b_(b)
{} {}
/// \brief Apply the underlying binary operator according to the mask. /// \brief Apply the underlying binary operator according to the mask.
@ -298,7 +298,7 @@ private:
typename std::remove_reference<typename BinaryOperator::result_type>::type typename std::remove_reference<typename BinaryOperator::result_type>::type
>::type Result; >::type Result;
MaskToMaxOperator(BinaryOperator b) explicit MaskToMaxOperator(BinaryOperator b)
: b_(b) : b_(b)
{} {}
/// \brief Apply the underlying binary operator according to the mask. /// \brief Apply the underlying binary operator according to the mask.

View File

@ -41,7 +41,7 @@ class ParallelOverlappingILU0Args
: public Dune::Amg::DefaultSmootherArgs<F> : public Dune::Amg::DefaultSmootherArgs<F>
{ {
public: public:
ParallelOverlappingILU0Args(MILU_VARIANT milu = MILU_VARIANT::ILU ) explicit ParallelOverlappingILU0Args(MILU_VARIANT milu = MILU_VARIANT::ILU )
: milu_(milu), n_(0) : milu_(milu), n_(0)
{} {}
void setMilu(MILU_VARIANT milu) void setMilu(MILU_VARIANT milu)

View File

@ -43,7 +43,7 @@ class DummyUpdatePreconditioner : public PreconditionerWithUpdate<typename Origi
{ {
public: public:
template <class... Args> template <class... Args>
DummyUpdatePreconditioner(Args&&... args) explicit DummyUpdatePreconditioner(Args&&... args)
: orig_precond_(std::forward<Args>(args)...) : orig_precond_(std::forward<Args>(args)...)
{ {
} }
@ -109,7 +109,7 @@ template <class OriginalPreconditioner, class... Args>
struct PreconditionerMaker : public GeneralPreconditionerMaker<OriginalPreconditioner> { struct PreconditionerMaker : public GeneralPreconditionerMaker<OriginalPreconditioner> {
using GenericPreconditioner = Preconditioner<typename OriginalPreconditioner::domain_type, typename OriginalPreconditioner::range_type>; using GenericPreconditioner = Preconditioner<typename OriginalPreconditioner::domain_type, typename OriginalPreconditioner::range_type>;
PreconditionerMaker(Args&&... args) explicit PreconditionerMaker(Args&&... args)
: args_(args...) : args_(args...)
{ {
} }
@ -134,7 +134,7 @@ class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate<typename O
{ {
public: public:
template<class... Args> template<class... Args>
RebuildOnUpdatePreconditioner(Args... args) explicit RebuildOnUpdatePreconditioner(Args... args)
: preconditioner_maker_(std::make_unique<PreconditionerMaker<OriginalPreconditioner, Args...>>(std::forward<Args>(args)...)) : preconditioner_maker_(std::make_unique<PreconditionerMaker<OriginalPreconditioner, Args...>>(std::forward<Args>(args)...))
{ {
update(); update();

View File

@ -37,7 +37,7 @@ namespace Opm
class PropertyTree { class PropertyTree {
public: public:
PropertyTree(); PropertyTree();
PropertyTree(const std::string& jsonFile); explicit PropertyTree(const std::string& jsonFile);
PropertyTree(const PropertyTree& tree); PropertyTree(const PropertyTree& tree);
~PropertyTree(); ~PropertyTree();

View File

@ -58,14 +58,14 @@ class CombinedCriterion : public ConvergenceCriterion<Vector>
using BlockType = typename Vector::block_type; using BlockType = typename Vector::block_type;
public: public:
CombinedCriterion(const CollectiveCommunication& comm) explicit CombinedCriterion(const CollectiveCommunication& comm)
: comm_(comm) : comm_(comm)
{} {}
CombinedCriterion(const CollectiveCommunication& comm, CombinedCriterion(const CollectiveCommunication& comm,
Scalar residualReductionTolerance, Scalar residualReductionTolerance,
Scalar absResidualTolerance = 0.0, Scalar absResidualTolerance = 0.0,
Scalar maxResidual = 0.0) Scalar maxResidual = 0.0)
: comm_(comm), : comm_(comm),
residualReductionTolerance_(residualReductionTolerance), residualReductionTolerance_(residualReductionTolerance),
absResidualTolerance_(absResidualTolerance), absResidualTolerance_(absResidualTolerance),

View File

@ -60,7 +60,7 @@ class GlobalIndices
using DomesticToGlobalMap = std::map<Index, Index>; using DomesticToGlobalMap = std::map<Index, Index>;
public: public:
GlobalIndices(const ForeignOverlap& foreignOverlap) explicit GlobalIndices(const ForeignOverlap& foreignOverlap)
: foreignOverlap_(foreignOverlap) : foreignOverlap_(foreignOverlap)
{ {
myRank_ = 0; myRank_ = 0;

View File

@ -117,7 +117,7 @@ class GPUObliviousMPISender : public GPUSender<field_type, OwnerOverlapCopyCommu
public: public:
using X = GpuVector<field_type>; using X = GpuVector<field_type>;
GPUObliviousMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy) explicit GPUObliviousMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy)
: GPUSender<field_type, OwnerOverlapCopyCommunicationType>(cpuOwnerOverlapCopy) : GPUSender<field_type, OwnerOverlapCopyCommunicationType>(cpuOwnerOverlapCopy)
{ {
} }
@ -172,7 +172,7 @@ class GPUAwareMPISender : public GPUSender<field_type, OwnerOverlapCopyCommunica
public: public:
using X = GpuVector<field_type>; using X = GpuVector<field_type>;
GPUAwareMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy) explicit GPUAwareMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy)
: GPUSender<field_type, OwnerOverlapCopyCommunicationType>(cpuOwnerOverlapCopy) : GPUSender<field_type, OwnerOverlapCopyCommunicationType>(cpuOwnerOverlapCopy)
{ {
} }
@ -385,7 +385,7 @@ class GpuOwnerOverlapCopy
public: public:
using X = GpuVector<field_type>; using X = GpuVector<field_type>;
GpuOwnerOverlapCopy(std::shared_ptr<GPUSender<field_type, OwnerOverlapCopyCommunicationType>> sender) : m_sender(sender){} explicit GpuOwnerOverlapCopy(std::shared_ptr<GPUSender<field_type, OwnerOverlapCopyCommunicationType>> sender) : m_sender(sender){}
void copyOwnerToAll(const X& source, X& dest) const { void copyOwnerToAll(const X& source, X& dest) const {
m_sender->copyOwnerToAll(source, dest); m_sender->copyOwnerToAll(source, dest);

View File

@ -66,7 +66,7 @@ public:
* \brief Constructor taking simulator and creating an empty matrix . * \brief Constructor taking simulator and creating an empty matrix .
*/ */
template <class Simulator> template <class Simulator>
IstlSparseMatrixAdapter(const Simulator& simulator) explicit IstlSparseMatrixAdapter(const Simulator& simulator)
: IstlSparseMatrixAdapter(simulator.model().numTotalDof(), simulator.model().numTotalDof()) : IstlSparseMatrixAdapter(simulator.model().numTotalDof(), simulator.model().numTotalDof())
{} {}

View File

@ -56,7 +56,7 @@ public:
* \brief Given a domestic overlap object, create an overlapping * \brief Given a domestic overlap object, create an overlapping
* block vector coherent to it. * block vector coherent to it.
*/ */
OverlappingBlockVector(const Overlap& overlap) explicit OverlappingBlockVector(const Overlap& overlap)
: ParentType(overlap.numDomestic()), overlap_(&overlap) : ParentType(overlap.numDomestic()), overlap_(&overlap)
{ createBuffers_(); } { createBuffers_(); }

View File

@ -47,7 +47,7 @@ public:
using domain_type = DomainVector; using domain_type = DomainVector;
using field_type = typename domain_type::field_type; using field_type = typename domain_type::field_type;
OverlappingOperator(const OverlappingMatrix& A) : A_(A) explicit OverlappingOperator(const OverlappingMatrix& A) : A_(A)
{} {}
//! the kind of computations supported by the operator. Either overlapping or non-overlapping //! the kind of computations supported by the operator. Either overlapping or non-overlapping

Some files were not shown because too many files have changed in this diff Show More