mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5898 from akva2/janitoring_sca
janitoring: quell static analyzer issues
This commit is contained in:
@@ -235,7 +235,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
Co2InjectionProblem(Simulator& simulator)
|
||||
explicit Co2InjectionProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
CuvetteProblem(Simulator& simulator)
|
||||
explicit CuvetteProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, eps_(1e-6)
|
||||
{ }
|
||||
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
DiffusionProblem(Simulator& simulator)
|
||||
explicit DiffusionProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
FingerProblem(Simulator& simulator)
|
||||
explicit FingerProblem(Simulator& simulator)
|
||||
: ParentType(simulator),
|
||||
materialParams_( simulator.vanguard().grid(), codim )
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
FractureProblem(Simulator& simulator)
|
||||
explicit FractureProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
GroundWaterProblem(Simulator& simulator)
|
||||
explicit GroundWaterProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
InfiltrationProblem(Simulator& simulator)
|
||||
explicit InfiltrationProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, eps_(1e-6)
|
||||
{ }
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
LensProblem(Simulator& simulator)
|
||||
explicit LensProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
ObstacleProblem(Simulator& simulator)
|
||||
explicit ObstacleProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
OutflowProblem(Simulator& simulator)
|
||||
explicit OutflowProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, eps_(1e-6)
|
||||
{ }
|
||||
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
PowerInjectionProblem(Simulator& simulator)
|
||||
explicit PowerInjectionProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
ReservoirProblem(Simulator& simulator)
|
||||
explicit ReservoirProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
RichardsLensProblem(Simulator& simulator)
|
||||
explicit RichardsLensProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, pnRef_(1e5)
|
||||
{
|
||||
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Doxygen::defaultProblemConstructor
|
||||
*/
|
||||
WaterAirProblem(Simulator& simulator)
|
||||
explicit WaterAirProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class Tutorial1Problem
|
||||
public:
|
||||
//! The constructor of the problem. This only _allocates_ the memory required by the
|
||||
//! problem. The constructor is supposed to _never ever_ throw an exception.
|
||||
Tutorial1Problem(Simulator& simulator)
|
||||
explicit Tutorial1Problem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, eps_(3e-6)
|
||||
{ }
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// it is use for the development when some facility class are not ready
|
||||
|
||||
#include <opm/output/data/Aquifer.hpp>
|
||||
#include <opm/output/data/Groups.hpp>
|
||||
#include <opm/output/data/Wells.hpp>
|
||||
|
||||
#include <opm/models/discretization/common/baseauxiliarymodule.hh>
|
||||
@@ -39,7 +40,7 @@ class EmptyModel : public BaseAuxiliaryModule<TypeTag>
|
||||
|
||||
public:
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
EmptyModel(Simulator& /*simulator*/)
|
||||
explicit EmptyModel(Simulator& /*simulator*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -48,9 +49,9 @@ public:
|
||||
void init(Something /*A*/){}
|
||||
void prepareTracerBatches(){};
|
||||
using NeighborSet = std::set<unsigned>;
|
||||
void linearize(SparseMatrixAdapter& /*matrix*/, GlobalEqVector& /*residual*/){};
|
||||
unsigned numDofs() const{return 0;};
|
||||
void addNeighbors(std::vector<NeighborSet>& /*neighbors*/) const{};
|
||||
void linearize(SparseMatrixAdapter& /*matrix*/, GlobalEqVector& /*residual*/) override {}
|
||||
unsigned numDofs() const override { return 0; }
|
||||
void addNeighbors(std::vector<NeighborSet>& /*neighbors*/) const override {}
|
||||
//void applyInitial(){};
|
||||
void initialSolutionApplied(){};
|
||||
//void initFromRestart(const data::Aquifers& aquiferSoln);
|
||||
@@ -73,7 +74,7 @@ public:
|
||||
void endIteration()const{};
|
||||
void endTimeStep(){};
|
||||
void endEpisode(){};
|
||||
void applyInitial(){};
|
||||
void applyInitial() override {}
|
||||
template<class RateType>
|
||||
void computeTotalRatesForDof(RateType& /*rate*/, unsigned /*globalIdx*/) const{};
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class FlowExpProblem : public FlowProblemBlackoil<TypeTag> //, public FvBaseProb
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
|
||||
public:
|
||||
void writeOutput(bool verbose = true)
|
||||
void writeOutput(bool verbose = true) override
|
||||
{
|
||||
OPM_TIMEBLOCK(problemWriteOutput);
|
||||
// use the generic code to prepare the output fields and to
|
||||
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
|
||||
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
|
||||
|
||||
BlackOilModel(Simulator& simulator)
|
||||
explicit BlackOilModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
eqWeights_.resize(numEq, 1.0);
|
||||
|
||||
@@ -71,7 +71,7 @@ class BlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
|
||||
static constexpr bool enableSaltPrecipitation = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>();
|
||||
|
||||
public:
|
||||
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
explicit BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{
|
||||
bparams_.read();
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
/*!
|
||||
* \copydoc ImmisciblePrimaryVariables::ImmisciblePrimaryVariables(Scalar)
|
||||
*/
|
||||
BlackOilPrimaryVariables(Scalar value)
|
||||
explicit BlackOilPrimaryVariables(Scalar value)
|
||||
: ParentType(value)
|
||||
{
|
||||
Valgrind::SetUndefined(primaryVarsMeaningWater_);
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
*
|
||||
* \param simulator The manager object of the simulation
|
||||
*/
|
||||
BlackOilProblem(Simulator& simulator)
|
||||
explicit BlackOilProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class MultiPhaseBaseModel : public GetPropType<TypeTag, Properties::Discretizati
|
||||
enum { numComponents = FluidSystem::numComponents };
|
||||
|
||||
public:
|
||||
MultiPhaseBaseModel(Simulator& simulator)
|
||||
explicit MultiPhaseBaseModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Problem::FvBaseProblem(Simulator& )
|
||||
*/
|
||||
MultiPhaseBaseProblem(Simulator& simulator)
|
||||
explicit MultiPhaseBaseProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ init_(); }
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
TemperatureCallback(const ElementContext& elemCtx)
|
||||
explicit TemperatureCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{}
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
PressureCallback(const ElementContext& elemCtx)
|
||||
explicit PressureCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{ Valgrind::SetUndefined(phaseIdx_); }
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
DensityCallback(const ElementContext& elemCtx)
|
||||
explicit DensityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{ Valgrind::SetUndefined(phaseIdx_); }
|
||||
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
using ResultType = decltype(std::declval<IQFluidState>().molarDensity(0));
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
MolarDensityCallback(const ElementContext& elemCtx)
|
||||
explicit MolarDensityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{ Valgrind::SetUndefined(phaseIdx_); }
|
||||
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
ViscosityCallback(const ElementContext& elemCtx)
|
||||
explicit ViscosityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{ Valgrind::SetUndefined(phaseIdx_); }
|
||||
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
using ResultFieldType = typename ResultType::field_type;
|
||||
using ResultFieldValueType = typename MathToolbox<ResultFieldType>::ValueType;
|
||||
|
||||
VelocityCallback(const ElementContext& elemCtx)
|
||||
explicit VelocityCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{}
|
||||
|
||||
@@ -384,7 +384,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
VelocityComponentCallback(const ElementContext& elemCtx)
|
||||
explicit VelocityComponentCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{ Valgrind::SetUndefined(dimIdx_); }
|
||||
|
||||
@@ -433,7 +433,7 @@ public:
|
||||
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
|
||||
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
|
||||
|
||||
MoleFractionCallback(const ElementContext& elemCtx)
|
||||
explicit MoleFractionCallback(const ElementContext& elemCtx)
|
||||
: elemCtx_(elemCtx)
|
||||
{
|
||||
Valgrind::SetUndefined(phaseIdx_);
|
||||
|
||||
@@ -121,7 +121,7 @@ class DiscreteFractureModel : public ImmiscibleModel<TypeTag>
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
public:
|
||||
DiscreteFractureModel(Simulator& simulator)
|
||||
explicit DiscreteFractureModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if (Parameters::Get<Parameters::EnableIntensiveQuantityCache>()) {
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
/*!
|
||||
* \copydoc Problem::FvBaseProblem(Simulator& )
|
||||
*/
|
||||
DiscreteFractureProblem(Simulator& simulator)
|
||||
explicit DiscreteFractureProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
// this constructor required to be explicitly specified because
|
||||
// we've defined a constructor above which deletes all implicitly
|
||||
// generated constructors in C++.
|
||||
FvBaseDiscretization(Simulator& simulator)
|
||||
explicit FvBaseDiscretization(Simulator& simulator)
|
||||
: simulator_(simulator)
|
||||
, gridView_(simulator.gridView())
|
||||
, elementMapper_(gridView_, Dune::mcmgElementLayout())
|
||||
@@ -1962,7 +1962,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
FvBaseDiscretizationNoAdapt(Simulator& simulator)
|
||||
explicit FvBaseDiscretizationNoAdapt(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if (this->enableGridAdaptation_) {
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
FvBaseDiscretizationFemAdapt(Simulator& simulator)
|
||||
explicit FvBaseDiscretizationFemAdapt(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, space_(simulator.vanguard().gridPart())
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ class FvBaseNewtonConvergenceWriter
|
||||
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
|
||||
|
||||
public:
|
||||
FvBaseNewtonConvergenceWriter(NewtonMethod& nm)
|
||||
explicit FvBaseNewtonConvergenceWriter(NewtonMethod& nm)
|
||||
: newtonMethod_(nm)
|
||||
{
|
||||
timeStepIdx_ = 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ class FvBaseNewtonMethod : public NewtonMethod<TypeTag>
|
||||
|
||||
|
||||
public:
|
||||
FvBaseNewtonMethod(Simulator& simulator)
|
||||
explicit FvBaseNewtonMethod(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
* \param gridView The view on the DUNE grid which ought to be
|
||||
* used (normally the leaf grid view)
|
||||
*/
|
||||
FvBaseProblem(Simulator& simulator)
|
||||
explicit FvBaseProblem(Simulator& simulator)
|
||||
: nextTimeStepSize_(0.0)
|
||||
, gridView_(simulator.gridView())
|
||||
, elementMapper_(gridView_, Dune::mcmgElementLayout())
|
||||
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
template <class TypeTag>
|
||||
struct DummySpaceEcfv {
|
||||
using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>;
|
||||
DummySpaceEcfv(const DiscreteFunctionSpace&) {};
|
||||
DummySpaceEcfv(const int&) {};
|
||||
explicit DummySpaceEcfv(const DiscreteFunctionSpace&) {};
|
||||
explicit DummySpaceEcfv(const int&) {};
|
||||
};
|
||||
|
||||
template <class TypeTag>
|
||||
@@ -154,7 +154,7 @@ class EcfvDiscretization : public GetPropType<TypeTag, Properties::BaseDiscretiz
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
public:
|
||||
EcfvDiscretization(Simulator& simulator)
|
||||
explicit EcfvDiscretization(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
SubControlVolume()
|
||||
{}
|
||||
|
||||
SubControlVolume(const Element& element)
|
||||
explicit SubControlVolume(const Element& element)
|
||||
: element_(element)
|
||||
{ update(); }
|
||||
|
||||
|
||||
@@ -114,8 +114,8 @@ public:
|
||||
template <class TypeTag>
|
||||
struct DummySpaceVcfv {
|
||||
using DiscreteFunctionSpace = GetPropType<TypeTag, Properties::DiscreteFunctionSpace>;
|
||||
DummySpaceVcfv(const DiscreteFunctionSpace&) {};
|
||||
DummySpaceVcfv(const int&) {};
|
||||
explicit DummySpaceVcfv(const DiscreteFunctionSpace&) {};
|
||||
explicit DummySpaceVcfv(const int&) {};
|
||||
};
|
||||
|
||||
template <class TypeTag>
|
||||
@@ -162,7 +162,7 @@ class VcfvDiscretization : public GetPropType<TypeTag, Properties::BaseDiscretiz
|
||||
enum { dim = GridView::dimension };
|
||||
|
||||
public:
|
||||
VcfvDiscretization(Simulator& simulator)
|
||||
explicit VcfvDiscretization(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ class FlashModel
|
||||
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
FlashModel(Simulator& simulator)
|
||||
explicit FlashModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
/*!
|
||||
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
|
||||
*/
|
||||
FlashRateVector(const Evaluation& value) : ParentType(value)
|
||||
explicit FlashRateVector(const Evaluation& value) : ParentType(value)
|
||||
{}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -226,7 +226,7 @@ class ImmiscibleModel
|
||||
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
ImmiscibleModel(Simulator& simulator)
|
||||
explicit ImmiscibleModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
*
|
||||
* \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)
|
||||
{}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class BaseVanguard
|
||||
#endif
|
||||
|
||||
public:
|
||||
BaseVanguard(Simulator& simulator)
|
||||
explicit BaseVanguard(Simulator& simulator)
|
||||
: simulator_(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
/*!
|
||||
* \brief Create the grid
|
||||
*/
|
||||
CubeGridVanguard(Simulator& simulator)
|
||||
explicit CubeGridVanguard(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
std::array<unsigned int, dim> cellRes;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
/*!
|
||||
* \brief Load the grid from the file.
|
||||
*/
|
||||
DgfVanguard(Simulator& simulator)
|
||||
explicit DgfVanguard(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
const std::string dgfFileName = Parameters::Get<Parameters::GridFile>();
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
/*!
|
||||
* \brief Create the grid for the lens problem
|
||||
*/
|
||||
StructuredGridVanguard(Simulator& simulator)
|
||||
explicit StructuredGridVanguard(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
Dune::FieldVector<int, dim> cellRes;
|
||||
|
||||
@@ -71,7 +71,7 @@ class VtkBlackOilEnergyModule : public BaseOutputModule<TypeTag>
|
||||
using PhaseBuffer = typename ParentType::PhaseBuffer;
|
||||
|
||||
public:
|
||||
VtkBlackOilEnergyModule(const Simulator& simulator)
|
||||
explicit VtkBlackOilEnergyModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if constexpr (enableEnergy) {
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if constexpr (enableEnergy) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if constexpr (enableEnergy) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
if constexpr (enableEnergy) {
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
|
||||
@@ -67,7 +67,7 @@ class VtkBlackOilMICPModule : public BaseOutputModule<TypeTag>
|
||||
using ScalarBuffer = typename ParentType::ScalarBuffer;
|
||||
|
||||
public:
|
||||
VtkBlackOilMICPModule(const Simulator& simulator)
|
||||
explicit VtkBlackOilMICPModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if constexpr (enableMICP) {
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if constexpr (enableMICP) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if constexpr (enableMICP) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
if constexpr (enableMICP) {
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
|
||||
@@ -75,7 +75,7 @@ class VtkBlackOilModule : public BaseOutputModule<TypeTag>
|
||||
using ScalarBuffer = typename ParentType::ScalarBuffer;
|
||||
|
||||
public:
|
||||
VtkBlackOilModule(const Simulator& simulator)
|
||||
explicit VtkBlackOilModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.gasDissolutionFactorOutput_) {
|
||||
this->resizeScalarBuffer_(gasDissolutionFactor_);
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter *vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class VtkBlackOilPolymerModule : public BaseOutputModule<TypeTag>
|
||||
using ScalarBuffer = typename ParentType::ScalarBuffer;
|
||||
|
||||
public:
|
||||
VtkBlackOilPolymerModule(const Simulator& simulator)
|
||||
explicit VtkBlackOilPolymerModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if constexpr (enablePolymer) {
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if constexpr (enablePolymer) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if constexpr (enablePolymer) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
if constexpr (enablePolymer) {
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
|
||||
@@ -68,7 +68,7 @@ class VtkBlackOilSolventModule : public BaseOutputModule<TypeTag>
|
||||
using ScalarBuffer = typename ParentType::ScalarBuffer;
|
||||
|
||||
public:
|
||||
VtkBlackOilSolventModule(const Simulator& simulator)
|
||||
explicit VtkBlackOilSolventModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
if constexpr (enableSolvent) {
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if constexpr (enableSolvent) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if constexpr (enableSolvent) {
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
if constexpr (enableSolvent) {
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
|
||||
@@ -74,7 +74,7 @@ class VtkCompositionModule : public BaseOutputModule<TypeTag>
|
||||
using PhaseComponentBuffer = typename ParentType::PhaseComponentBuffer;
|
||||
|
||||
public:
|
||||
VtkCompositionModule(const Simulator& simulator)
|
||||
explicit VtkCompositionModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.moleFracOutput_) {
|
||||
this->resizePhaseComponentBuffer_(moleFrac_);
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -75,7 +75,7 @@ class VtkDiffusionModule : public BaseOutputModule<TypeTag>
|
||||
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
|
||||
|
||||
public:
|
||||
VtkDiffusionModule(const Simulator& simulator)
|
||||
explicit VtkDiffusionModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.tortuosityOutput_) {
|
||||
this->resizePhaseBuffer_(tortuosity_);
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quanties relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -84,7 +84,7 @@ class VtkDiscreteFractureModule : public BaseOutputModule<TypeTag>
|
||||
using PhaseVectorBuffer = typename ParentType::PhaseVectorBuffer;
|
||||
|
||||
public:
|
||||
VtkDiscreteFractureModule(const Simulator& simulator)
|
||||
explicit VtkDiscreteFractureModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.saturationOutput_) {
|
||||
this->resizePhaseBuffer_(fractureSaturation_);
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -74,7 +74,7 @@ class VtkEnergyModule : public BaseOutputModule<TypeTag>
|
||||
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
|
||||
|
||||
public:
|
||||
VtkEnergyModule(const Simulator& simulator)
|
||||
explicit VtkEnergyModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.enthalpyOutput_) {
|
||||
this->resizePhaseBuffer_(enthalpy_);
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quanties relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -92,7 +92,7 @@ class VtkMultiPhaseModule : public BaseOutputModule<TypeTag>
|
||||
using PhaseVectorBuffer = std::array<VectorBuffer, numPhases>;
|
||||
|
||||
public:
|
||||
VtkMultiPhaseModule(const Simulator& simulator)
|
||||
explicit VtkMultiPhaseModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.extrusionFactorOutput_) {
|
||||
this->resizeScalarBuffer_(extrusionFactor_);
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities seen on
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -67,7 +67,7 @@ class VtkMultiWriter : public BaseOutputWriter
|
||||
class WriteDataTasklet : public TaskletInterface
|
||||
{
|
||||
public:
|
||||
WriteDataTasklet(VtkMultiWriter& multiWriter)
|
||||
explicit WriteDataTasklet(VtkMultiWriter& multiWriter)
|
||||
: multiWriter_(multiWriter)
|
||||
{ }
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
commSize_ = gridView.comm().size();
|
||||
}
|
||||
|
||||
~VtkMultiWriter()
|
||||
~VtkMultiWriter() override
|
||||
{
|
||||
taskletRunner_.barrier();
|
||||
releaseBuffers_();
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
/*!
|
||||
* \brief Called whenever a new time step must be written.
|
||||
*/
|
||||
void beginWrite(double t)
|
||||
void beginWrite(double t) override
|
||||
{
|
||||
if (!multiFile_.is_open()) {
|
||||
startMultiFile_(multiFileName_);
|
||||
|
||||
@@ -60,7 +60,7 @@ class VtkPhasePresenceModule : public BaseOutputModule<TypeTag>
|
||||
|
||||
|
||||
public:
|
||||
VtkPhasePresenceModule(const Simulator& simulator)
|
||||
explicit VtkPhasePresenceModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.phasePresenceOutput_) {
|
||||
this->resizeScalarBuffer_(phasePresence_);
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quanties relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -61,7 +61,7 @@ class VtkPrimaryVarsModule : public BaseOutputModule<TypeTag>
|
||||
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
|
||||
|
||||
public:
|
||||
VtkPrimaryVarsModule(const Simulator& simulator)
|
||||
explicit VtkPrimaryVarsModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.primaryVarsOutput_) {
|
||||
this->resizeEqBuffer_(primaryVars_);
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.LOutput_) {
|
||||
this->resizeScalarBuffer_(L_);
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
auto* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -63,7 +63,7 @@ class VtkTemperatureModule : public BaseOutputModule<TypeTag>
|
||||
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
|
||||
|
||||
public:
|
||||
VtkTemperatureModule(const Simulator& simulator)
|
||||
explicit VtkTemperatureModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
params_.read();
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (params_.temperatureOutput_) {
|
||||
this->resizeScalarBuffer_(temperature_);
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant
|
||||
* for an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
using Toolbox = MathToolbox<Evaluation>;
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter* vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter) {
|
||||
|
||||
@@ -250,7 +250,7 @@ class NcpModel
|
||||
using DiffusionModule = Opm::DiffusionModule<TypeTag, enableDiffusion>;
|
||||
|
||||
public:
|
||||
NcpModel(Simulator& simulator)
|
||||
explicit NcpModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
/*!
|
||||
* \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& )
|
||||
*/
|
||||
NcpNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
explicit NcpNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
/*!
|
||||
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
|
||||
*/
|
||||
NcpRateVector(const Evaluation& value)
|
||||
explicit NcpRateVector(const Evaluation& value)
|
||||
: ParentType(value)
|
||||
{}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class NewtonMethod
|
||||
using CollectiveCommunication = typename Dune::Communication<typename Dune::MPIHelper::MPICommunicator>;
|
||||
|
||||
public:
|
||||
NewtonMethod(Simulator& simulator)
|
||||
explicit NewtonMethod(Simulator& simulator)
|
||||
: simulator_(simulator)
|
||||
, endIterMsgStream_(std::ostringstream::out)
|
||||
, linearSolver_(simulator)
|
||||
|
||||
@@ -55,7 +55,7 @@ class NullConvergenceWriter
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
|
||||
public:
|
||||
NullConvergenceWriter(NewtonMethod&)
|
||||
explicit NullConvergenceWriter(NewtonMethod&)
|
||||
{}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
updateMpiDataSize_();
|
||||
}
|
||||
|
||||
MpiBuffer(size_t size)
|
||||
explicit MpiBuffer(size_t size)
|
||||
{
|
||||
data_ = new DataType[size];
|
||||
dataSize_ = size;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Opm {
|
||||
class TaskletInterface
|
||||
{
|
||||
public:
|
||||
TaskletInterface(int refCount = 1)
|
||||
explicit TaskletInterface(int refCount = 1)
|
||||
: referenceCount_(refCount)
|
||||
{}
|
||||
virtual ~TaskletInterface() {}
|
||||
@@ -92,9 +92,9 @@ class TaskletRunner
|
||||
class BarrierTasklet : public TaskletInterface
|
||||
{
|
||||
public:
|
||||
BarrierTasklet(unsigned numWorkers);
|
||||
explicit BarrierTasklet(unsigned numWorkers);
|
||||
|
||||
void run();
|
||||
void run() override;
|
||||
|
||||
void wait();
|
||||
|
||||
@@ -111,10 +111,10 @@ class TaskletRunner
|
||||
class TerminateThreadTasklet : public TaskletInterface
|
||||
{
|
||||
public:
|
||||
void run()
|
||||
void run() override
|
||||
{ }
|
||||
|
||||
bool isEndMarker() const
|
||||
bool isEndMarker() const override
|
||||
{ return true; }
|
||||
};
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
* The number of worker threads may be 0. In this case, all work is done by the main
|
||||
* thread (synchronous mode).
|
||||
*/
|
||||
TaskletRunner(unsigned numWorkers);
|
||||
explicit TaskletRunner(unsigned numWorkers);
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
|
||||
@@ -44,7 +44,7 @@ class ThreadedEntityIterator
|
||||
using Entity = typename GridView::template Codim<codim>::Entity;
|
||||
using EntityIterator = typename GridView::template Codim<codim>::Iterator;
|
||||
public:
|
||||
ThreadedEntityIterator(const GridView& gridView)
|
||||
explicit ThreadedEntityIterator(const GridView& gridView)
|
||||
: sequentialIt_(gridView.template begin<codim>())
|
||||
, sequentialEnd_(gridView.template end<codim>())
|
||||
{ }
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
/*!
|
||||
* \copydoc FvBaseNewtonMethod::FvBaseNewtonMethod(Problem& )
|
||||
*/
|
||||
FlashNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
explicit FlashNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -285,7 +285,7 @@ class PvsModel
|
||||
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
|
||||
|
||||
public:
|
||||
PvsModel(Simulator& simulator)
|
||||
explicit PvsModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
verbosity_ = Parameters::Get<Parameters::PvsVerbosity>();
|
||||
|
||||
@@ -66,7 +66,7 @@ class PvsNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonMethod
|
||||
enum { switch0Idx = Indices::switch0Idx };
|
||||
|
||||
public:
|
||||
PvsNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
explicit PvsNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
/*!
|
||||
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
|
||||
*/
|
||||
PvsRateVector(const Evaluation& value)
|
||||
explicit PvsRateVector(const Evaluation& value)
|
||||
: ParentType(value)
|
||||
{}
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ class RichardsModel
|
||||
"The liquid and the gas components must be different");
|
||||
|
||||
public:
|
||||
RichardsModel(Simulator& simulator)
|
||||
explicit RichardsModel(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
// the liquid phase must be liquid, the gas phase must be
|
||||
|
||||
@@ -64,7 +64,7 @@ class RichardsNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
|
||||
using PhaseVector = Dune::FieldVector<Scalar, numPhases>;
|
||||
|
||||
public:
|
||||
RichardsNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
explicit RichardsNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||
{}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
/*!
|
||||
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)
|
||||
*/
|
||||
RichardsRateVector(const Evaluation& value)
|
||||
explicit RichardsRateVector(const Evaluation& value)
|
||||
: ParentType(value)
|
||||
{}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ template <class Callback>
|
||||
class GenericGuard
|
||||
{
|
||||
public:
|
||||
GenericGuard(Callback& callback)
|
||||
explicit GenericGuard(Callback& callback)
|
||||
: callback_(callback)
|
||||
, isEnabled_(true)
|
||||
{ }
|
||||
|
||||
@@ -103,12 +103,12 @@ public:
|
||||
// do not allow to copy simulators around
|
||||
Simulator(const Simulator& ) = delete;
|
||||
|
||||
Simulator(bool verbose = true)
|
||||
explicit Simulator(bool verbose = true)
|
||||
:Simulator(Communication(), verbose)
|
||||
{
|
||||
}
|
||||
|
||||
Simulator(Communication comm, bool verbose = true)
|
||||
explicit Simulator(Communication comm, bool verbose = true)
|
||||
{
|
||||
TimerGuard setupTimerGuard(setupTimer_);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Opm {
|
||||
class TimerGuard
|
||||
{
|
||||
public:
|
||||
TimerGuard(Timer& timer)
|
||||
explicit TimerGuard(Timer& timer)
|
||||
: timer_(timer)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -97,10 +97,6 @@ public:
|
||||
this->initializeConnectionMappings();
|
||||
}
|
||||
|
||||
// Destructor
|
||||
virtual ~AquiferAnalytical()
|
||||
{}
|
||||
|
||||
void computeFaceAreaFraction(const std::vector<Scalar>& total_face_area) override
|
||||
{
|
||||
assert (total_face_area.size() >= static_cast<typename std::vector<Scalar>::size_type>(this->aquiferID()));
|
||||
|
||||
@@ -67,8 +67,6 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
virtual ~AquiferConstantFlux() = default;
|
||||
|
||||
void computeFaceAreaFraction(const std::vector<Scalar>& total_face_area) override
|
||||
{
|
||||
assert (total_face_area.size() >= static_cast<typename std::vector<Scalar>::size_type>(this->aquiferID()));
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Opm {
|
||||
|
||||
template<class Grid>
|
||||
struct IsNumericalAquiferCell {
|
||||
IsNumericalAquiferCell(const Grid&)
|
||||
explicit IsNumericalAquiferCell(const Grid&)
|
||||
{}
|
||||
|
||||
template<class T>
|
||||
@@ -42,7 +42,7 @@ struct IsNumericalAquiferCell {
|
||||
|
||||
template<>
|
||||
struct IsNumericalAquiferCell<Dune::CpGrid> {
|
||||
IsNumericalAquiferCell(const Dune::CpGrid& grid)
|
||||
explicit IsNumericalAquiferCell(const Dune::CpGrid& grid)
|
||||
: grid_(grid)
|
||||
{}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
static constexpr int dimension = Grid::dimension;
|
||||
static constexpr int dimensionworld = Grid::dimensionworld;
|
||||
|
||||
AluGridVanguard(Simulator& simulator)
|
||||
explicit AluGridVanguard(Simulator& simulator)
|
||||
: FlowBaseVanguard<TypeTag>(simulator)
|
||||
{
|
||||
this->mpiRank = FlowGenericVanguard::comm().rank();
|
||||
|
||||
@@ -52,7 +52,7 @@ class BaseAquiferModel
|
||||
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
|
||||
|
||||
public:
|
||||
BaseAquiferModel(Simulator& simulator)
|
||||
explicit BaseAquiferModel(Simulator& simulator)
|
||||
: simulator_(simulator)
|
||||
{}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
//! \param model BlackOil model to solve for
|
||||
//! \param param param Model parameters
|
||||
//! \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())
|
||||
{
|
||||
// Create partitions.
|
||||
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
|
||||
public:
|
||||
CpGridVanguard(Simulator& simulator)
|
||||
explicit CpGridVanguard(Simulator& simulator)
|
||||
: FlowBaseVanguard<TypeTag>(simulator)
|
||||
{
|
||||
this->checkConsistency();
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
// The Simulator object should preferably have been const - the
|
||||
// only reason that is not the case is due to the SummaryState
|
||||
// object owned deep down by the vanguard.
|
||||
DamarisWriter(Simulator& simulator)
|
||||
explicit DamarisWriter(Simulator& simulator)
|
||||
: BaseType(simulator.vanguard().schedule(),
|
||||
simulator.vanguard().eclState(),
|
||||
simulator.vanguard().summaryConfig(),
|
||||
|
||||
@@ -173,7 +173,7 @@ struct EclWriteTasklet : public Opm::TaskletInterface
|
||||
{}
|
||||
|
||||
// callback to eclIO serial writeTimeStep method
|
||||
void run()
|
||||
void run() override
|
||||
{
|
||||
this->eclIO_.writeTimeStep(this->actionState_,
|
||||
this->wtestState_,
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
// The Simulator object should preferably have been const - the
|
||||
// only reason that is not the case is due to the SummaryState
|
||||
// object owned deep down by the vanguard.
|
||||
EclWriter(Simulator& simulator)
|
||||
explicit EclWriter(Simulator& simulator)
|
||||
: BaseType(simulator.vanguard().schedule(),
|
||||
simulator.vanguard().eclState(),
|
||||
simulator.vanguard().summaryConfig(),
|
||||
|
||||
@@ -70,7 +70,7 @@ class FIBlackOilModel : public BlackOilModel<TypeTag>
|
||||
static constexpr bool gridIsUnchanging = std::is_same_v<GetPropType<TypeTag, Properties::Grid>, Dune::CpGrid>;
|
||||
|
||||
public:
|
||||
FIBlackOilModel(Simulator& simulator)
|
||||
explicit FIBlackOilModel(Simulator& simulator)
|
||||
: BlackOilModel<TypeTag>(simulator)
|
||||
{
|
||||
if constexpr (gridIsUnchanging) {
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
* This is the file format used by the commercial ECLiPSE simulator. Usually it uses
|
||||
* a cornerpoint description of the grid.
|
||||
*/
|
||||
FlowBaseVanguard(Simulator& simulator)
|
||||
explicit FlowBaseVanguard(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
|
||||
@@ -70,7 +70,7 @@ class FlowThresholdPressure : public GenericThresholdPressure<GetPropType<TypeTa
|
||||
enum { numPhases = FluidSystem::numPhases };
|
||||
|
||||
public:
|
||||
FlowThresholdPressure(const Simulator& simulator)
|
||||
explicit FlowThresholdPressure(const Simulator& simulator)
|
||||
: BaseType(simulator.vanguard().cartesianIndexMapper(),
|
||||
simulator.vanguard().gridView(),
|
||||
simulator.model().elementMapper(),
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
Main(int argc, char** argv, bool ownMPI = true);
|
||||
|
||||
// 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
|
||||
// already parsed a deck
|
||||
|
||||
@@ -47,7 +47,7 @@ class MixingRateControls
|
||||
public:
|
||||
using Scalar = typename FluidSystem::Scalar;
|
||||
|
||||
MixingRateControls(const Schedule& schedule);
|
||||
explicit MixingRateControls(const Schedule& schedule);
|
||||
MixingRateControls(const MixingRateControls& rhs);
|
||||
|
||||
static MixingRateControls serializationTestObject(const Schedule& schedule);
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
using TransmissibilityType = Transmissibility<Grid, GridView, ElementMapper,
|
||||
CartesianIndexMapper, Scalar>;
|
||||
|
||||
PolyhedralGridVanguard(Simulator& simulator)
|
||||
explicit PolyhedralGridVanguard(Simulator& simulator)
|
||||
: FlowBaseVanguard<TypeTag>(simulator)
|
||||
, simulator_(simulator)
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~SimulatorFullyImplicitBlackoil()
|
||||
~SimulatorFullyImplicitBlackoil() override
|
||||
{
|
||||
// Safe to call on all ranks, not just the I/O rank.
|
||||
convergence_output_.endThread();
|
||||
|
||||
@@ -94,7 +94,7 @@ class TracerModel : public GenericTracerModel<GetPropType<TypeTag, Properties::G
|
||||
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
|
||||
|
||||
public:
|
||||
TracerModel(Simulator& simulator)
|
||||
explicit TracerModel(Simulator& simulator)
|
||||
: BaseType(simulator.vanguard().gridView(),
|
||||
simulator.vanguard().eclState(),
|
||||
simulator.vanguard().cartesianIndexMapper(),
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Opm {
|
||||
using ScalarBuffer = typename ParentType::ScalarBuffer;
|
||||
|
||||
public:
|
||||
VtkTracerModule(const Simulator& simulator)
|
||||
explicit VtkTracerModule(const Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
{ }
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Opm {
|
||||
* \brief Allocate memory for the scalar fields we would like to
|
||||
* write to the VTK file.
|
||||
*/
|
||||
void allocBuffers()
|
||||
void allocBuffers() override
|
||||
{
|
||||
if (eclTracerConcentrationOutput_()){
|
||||
const auto& tracerModel = this->simulator_.problem().tracerModel();
|
||||
@@ -111,7 +111,7 @@ namespace Opm {
|
||||
* \brief Modify the internal buffers according to the intensive quantities relevant for
|
||||
* an element
|
||||
*/
|
||||
void processElement(const ElementContext& elemCtx)
|
||||
void processElement(const ElementContext& elemCtx) override
|
||||
{
|
||||
if (!Parameters::Get<Parameters::EnableVtkOutput>()) {
|
||||
return;
|
||||
@@ -141,7 +141,7 @@ namespace Opm {
|
||||
/*!
|
||||
* \brief Add all buffers to the VTK output writer.
|
||||
*/
|
||||
void commitBuffers(BaseOutputWriter& baseWriter)
|
||||
void commitBuffers(BaseOutputWriter& baseWriter) override
|
||||
{
|
||||
VtkMultiWriter *vtkWriter = dynamic_cast<VtkMultiWriter*>(&baseWriter);
|
||||
if (!vtkWriter)
|
||||
|
||||
@@ -131,8 +131,6 @@ template<class Scalar>
|
||||
class NoMixing : public RsFunction<Scalar>
|
||||
{
|
||||
public:
|
||||
virtual ~NoMixing() = default;
|
||||
|
||||
/**
|
||||
* Function call.
|
||||
*
|
||||
@@ -181,8 +179,6 @@ public:
|
||||
const std::vector<Scalar>& depth,
|
||||
const std::vector<Scalar>& rs);
|
||||
|
||||
virtual ~RsVD() = default;
|
||||
|
||||
/**
|
||||
* Function call.
|
||||
*
|
||||
@@ -234,8 +230,6 @@ public:
|
||||
const std::vector<Scalar>& depth,
|
||||
const std::vector<Scalar>& pbub);
|
||||
|
||||
virtual ~PBVD() = default;
|
||||
|
||||
/**
|
||||
* Function call.
|
||||
*
|
||||
@@ -286,8 +280,6 @@ public:
|
||||
const std::vector<Scalar>& depth,
|
||||
const std::vector<Scalar>& pdew);
|
||||
|
||||
virtual ~PDVD() = default;
|
||||
|
||||
/**
|
||||
* Function call.
|
||||
*
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
/*! \brief Constructor gets all parameters to operate the prec.
|
||||
\param A The matrix to operate on.
|
||||
*/
|
||||
MultithreadDILU(const M& A)
|
||||
explicit MultithreadDILU(const M& A)
|
||||
: A_(A)
|
||||
{
|
||||
OPM_TIMEBLOCK(prec_construct);
|
||||
|
||||
@@ -74,7 +74,7 @@ struct Reorderer
|
||||
|
||||
struct NoReorderer : public Reorderer
|
||||
{
|
||||
virtual std::size_t operator[](std::size_t i) const
|
||||
std::size_t operator[](std::size_t i) const override
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@@ -82,13 +82,15 @@ struct NoReorderer : 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)
|
||||
{}
|
||||
virtual std::size_t operator[](std::size_t i) const
|
||||
|
||||
std::size_t operator[](std::size_t i) const override
|
||||
{
|
||||
return (*ordering_)[i];
|
||||
}
|
||||
|
||||
const std::vector<std::size_t>* ordering_;
|
||||
};
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
/// \brief Constructs an empty parallel information object using a communicator.
|
||||
/// \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.
|
||||
/// \param indexSet The parallel index set to use.
|
||||
@@ -234,7 +234,7 @@ private:
|
||||
typename std::remove_const<typename BinaryOperator::result_type>::type
|
||||
>::type Result;
|
||||
|
||||
MaskToMinOperator(BinaryOperator b)
|
||||
explicit MaskToMinOperator(BinaryOperator b)
|
||||
: b_(b)
|
||||
{}
|
||||
/// \brief Apply the underlying binary operator according to the mask.
|
||||
@@ -298,7 +298,7 @@ private:
|
||||
typename std::remove_reference<typename BinaryOperator::result_type>::type
|
||||
>::type Result;
|
||||
|
||||
MaskToMaxOperator(BinaryOperator b)
|
||||
explicit MaskToMaxOperator(BinaryOperator b)
|
||||
: b_(b)
|
||||
{}
|
||||
/// \brief Apply the underlying binary operator according to the mask.
|
||||
|
||||
@@ -41,7 +41,7 @@ class ParallelOverlappingILU0Args
|
||||
: public Dune::Amg::DefaultSmootherArgs<F>
|
||||
{
|
||||
public:
|
||||
ParallelOverlappingILU0Args(MILU_VARIANT milu = MILU_VARIANT::ILU )
|
||||
explicit ParallelOverlappingILU0Args(MILU_VARIANT milu = MILU_VARIANT::ILU )
|
||||
: milu_(milu), n_(0)
|
||||
{}
|
||||
void setMilu(MILU_VARIANT milu)
|
||||
|
||||
@@ -43,7 +43,7 @@ class DummyUpdatePreconditioner : public PreconditionerWithUpdate<typename Origi
|
||||
{
|
||||
public:
|
||||
template <class... Args>
|
||||
DummyUpdatePreconditioner(Args&&... args)
|
||||
explicit DummyUpdatePreconditioner(Args&&... args)
|
||||
: orig_precond_(std::forward<Args>(args)...)
|
||||
{
|
||||
}
|
||||
@@ -109,10 +109,11 @@ template <class OriginalPreconditioner, class... Args>
|
||||
struct PreconditionerMaker : public GeneralPreconditionerMaker<OriginalPreconditioner> {
|
||||
using GenericPreconditioner = Preconditioner<typename OriginalPreconditioner::domain_type, typename OriginalPreconditioner::range_type>;
|
||||
|
||||
PreconditionerMaker(Args&&... args)
|
||||
explicit PreconditionerMaker(Args&&... args)
|
||||
: args_(args...)
|
||||
{
|
||||
}
|
||||
|
||||
std::unique_ptr<GenericPreconditioner>
|
||||
make() override
|
||||
{
|
||||
@@ -122,7 +123,7 @@ struct PreconditionerMaker : public GeneralPreconditionerMaker<OriginalPrecondit
|
||||
return std::make_unique<OriginalPreconditioner>(std::forward<Args>(args)...);
|
||||
}, args_);
|
||||
}
|
||||
~PreconditionerMaker(){}
|
||||
|
||||
std::tuple<Args...> args_;
|
||||
};
|
||||
|
||||
@@ -134,7 +135,7 @@ class RebuildOnUpdatePreconditioner : public PreconditionerWithUpdate<typename O
|
||||
{
|
||||
public:
|
||||
template<class... Args>
|
||||
RebuildOnUpdatePreconditioner(Args... args)
|
||||
explicit RebuildOnUpdatePreconditioner(Args... args)
|
||||
: preconditioner_maker_(std::make_unique<PreconditionerMaker<OriginalPreconditioner, Args...>>(std::forward<Args>(args)...))
|
||||
{
|
||||
update();
|
||||
@@ -143,22 +144,22 @@ public:
|
||||
using X = typename OriginalPreconditioner::domain_type;
|
||||
using Y = typename OriginalPreconditioner::range_type;
|
||||
|
||||
virtual void pre(X& x, Y& b) override
|
||||
void pre(X& x, Y& b) override
|
||||
{
|
||||
orig_precond_->pre(x, b);
|
||||
}
|
||||
|
||||
virtual void apply(X& v, const Y& d) override
|
||||
void apply(X& v, const Y& d) override
|
||||
{
|
||||
orig_precond_->apply(v, d);
|
||||
}
|
||||
|
||||
virtual void post(X& x) override
|
||||
void post(X& x) override
|
||||
{
|
||||
orig_precond_->post(x);
|
||||
}
|
||||
|
||||
virtual SolverCategory::Category category() const override
|
||||
SolverCategory::Category category() const override
|
||||
{
|
||||
return orig_precond_->category();
|
||||
}
|
||||
@@ -169,7 +170,8 @@ public:
|
||||
orig_precond_ = preconditioner_maker_->make();
|
||||
}
|
||||
|
||||
virtual bool hasPerfectUpdate() const override {
|
||||
bool hasPerfectUpdate() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user