remove namespace qualifiers from symbols in Opm namespace

This commit is contained in:
Arne Morten Kvarving 2022-12-13 13:09:01 +01:00
parent 90df7fbe4b
commit 205ca849f6
3 changed files with 34 additions and 34 deletions

View File

@ -76,19 +76,19 @@ struct NcpModel { using InheritsFrom = std::tuple<VtkDiffusion,
//! Use the Ncp local jacobian operator for the compositional NCP model
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::NcpModel> { using type = Opm::NcpLocalResidual<TypeTag>; };
struct LocalResidual<TypeTag, TTag::NcpModel> { using type = NcpLocalResidual<TypeTag>; };
//! Use the Ncp specific newton method for the compositional NCP model
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::NcpModel> { using type = Opm::NcpNewtonMethod<TypeTag>; };
struct NewtonMethod<TypeTag, TTag::NcpModel> { using type = NcpNewtonMethod<TypeTag>; };
//! the Model property
template<class TypeTag>
struct Model<TypeTag, TTag::NcpModel> { using type = Opm::NcpModel<TypeTag>; };
struct Model<TypeTag, TTag::NcpModel> { using type = NcpModel<TypeTag>; };
//! The type of the base base class for actual problems
template<class TypeTag>
struct BaseProblem<TypeTag, TTag::NcpModel> { using type = Opm::MultiPhaseBaseProblem<TypeTag>; };
struct BaseProblem<TypeTag, TTag::NcpModel> { using type = MultiPhaseBaseProblem<TypeTag>; };
//! Disable the energy equation by default
template<class TypeTag>
@ -100,27 +100,27 @@ struct EnableDiffusion<TypeTag, TTag::NcpModel> { static constexpr bool value =
//! the RateVector property
template<class TypeTag>
struct RateVector<TypeTag, TTag::NcpModel> { using type = Opm::NcpRateVector<TypeTag>; };
struct RateVector<TypeTag, TTag::NcpModel> { using type = NcpRateVector<TypeTag>; };
//! the BoundaryRateVector property
template<class TypeTag>
struct BoundaryRateVector<TypeTag, TTag::NcpModel> { using type = Opm::NcpBoundaryRateVector<TypeTag>; };
struct BoundaryRateVector<TypeTag, TTag::NcpModel> { using type = NcpBoundaryRateVector<TypeTag>; };
//! the PrimaryVariables property
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::NcpModel> { using type = Opm::NcpPrimaryVariables<TypeTag>; };
struct PrimaryVariables<TypeTag, TTag::NcpModel> { using type = NcpPrimaryVariables<TypeTag>; };
//! the IntensiveQuantities property
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::NcpModel> { using type = Opm::NcpIntensiveQuantities<TypeTag>; };
struct IntensiveQuantities<TypeTag, TTag::NcpModel> { using type = NcpIntensiveQuantities<TypeTag>; };
//! the ExtensiveQuantities property
template<class TypeTag>
struct ExtensiveQuantities<TypeTag, TTag::NcpModel> { using type = Opm::NcpExtensiveQuantities<TypeTag>; };
struct ExtensiveQuantities<TypeTag, TTag::NcpModel> { using type = NcpExtensiveQuantities<TypeTag>; };
//! The indices required by the compositional NCP model
template<class TypeTag>
struct Indices<TypeTag, TTag::NcpModel> { using type = Opm::NcpIndices<TypeTag, 0>; };
struct Indices<TypeTag, TTag::NcpModel> { using type = NcpIndices<TypeTag, 0>; };
//! The unmodified weight for the pressure primary variable
template<class TypeTag>
@ -172,7 +172,7 @@ namespace Opm {
* changed to the Forchheimer approach by
* \code
* template<class TypeTag>
struct FluxModule<TypeTag, TTag::MyProblemTypeTag> { using type = Opm::ForchheimerFluxModule<TypeTag>; };
struct FluxModule<TypeTag, TTag::MyProblemTypeTag> { using type = ForchheimerFluxModule<TypeTag>; };
* \endcode
*
* The core of the model is the conservation mass of each component by
@ -247,7 +247,7 @@ class NcpModel
using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
using DiffusionModule = Opm::DiffusionModule<TypeTag, enableDiffusion>;
@ -268,13 +268,13 @@ public:
EnergyModule::registerParameters();
// register runtime parameters of the VTK output modules
Opm::VtkCompositionModule<TypeTag>::registerParameters();
VtkCompositionModule<TypeTag>::registerParameters();
if (enableDiffusion)
Opm::VtkDiffusionModule<TypeTag>::registerParameters();
VtkDiffusionModule<TypeTag>::registerParameters();
if (enableEnergy)
Opm::VtkEnergyModule<TypeTag>::registerParameters();
VtkEnergyModule<TypeTag>::registerParameters();
}
/*!
@ -378,7 +378,7 @@ public:
std::min(minActivityCoeff_[globalIdx][compIdx],
Toolbox::value(fs.fugacityCoefficient(phaseIdx, compIdx))
* Toolbox::value(fs.pressure(phaseIdx)));
Opm::Valgrind::CheckDefined(minActivityCoeff_[globalIdx][compIdx]);
Valgrind::CheckDefined(minActivityCoeff_[globalIdx][compIdx]);
}
if (minActivityCoeff_[globalIdx][compIdx] <= 0)
throw Opm::NumericalIssue("The minimum activity coefficient for component "+std::to_string(compIdx)
@ -402,7 +402,7 @@ public:
unsigned compIdx = pvIdx - fugacity0Idx;
assert(compIdx <= numComponents);
Opm::Valgrind::CheckDefined(minActivityCoeff_[globalDofIdx][compIdx]);
Valgrind::CheckDefined(minActivityCoeff_[globalDofIdx][compIdx]);
static const Scalar fugacityBaseWeight =
getPropValue<TypeTag, Properties::NcpFugacitiesBaseWeight>();
result = fugacityBaseWeight / minActivityCoeff_[globalDofIdx][compIdx];
@ -467,11 +467,11 @@ public:
{
ParentType::registerOutputModules_();
this->addOutputModule(new Opm::VtkCompositionModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkCompositionModule<TypeTag>(this->simulator_));
if (enableDiffusion)
this->addOutputModule(new Opm::VtkDiffusionModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkDiffusionModule<TypeTag>(this->simulator_));
if (enableEnergy)
this->addOutputModule(new Opm::VtkEnergyModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkEnergyModule<TypeTag>(this->simulator_));
}
mutable Scalar referencePressure_;

View File

@ -76,22 +76,22 @@ class PvsPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
using Toolbox = typename Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
using EnergyModule = Opm::EnergyModule<TypeTag, enableEnergy>;
using NcpFlash = Opm::NcpFlash<Scalar, FluidSystem>;
public:
PvsPrimaryVariables() : ParentType()
{ Opm::Valgrind::SetDefined(*this); }
{ Valgrind::SetDefined(*this); }
/*!
* \copydoc ImmisciblePrimaryVariables::ImmisciblePrimaryVariables(Scalar)
*/
explicit PvsPrimaryVariables(Scalar value) : ParentType(value)
{
Opm::Valgrind::CheckDefined(value);
Opm::Valgrind::SetDefined(*this);
Valgrind::CheckDefined(value);
Valgrind::SetDefined(*this);
phasePresence_ = 0;
}
@ -102,7 +102,7 @@ public:
*/
PvsPrimaryVariables(const PvsPrimaryVariables& value) : ParentType(value)
{
Opm::Valgrind::SetDefined(*this);
Valgrind::SetDefined(*this);
phasePresence_ = value.phasePresence_;
}
@ -132,7 +132,7 @@ public:
// use a flash calculation to calculate a fluid state in
// thermodynamic equilibrium
typename FluidSystem::template ParameterCache<Scalar> paramCache;
Opm::CompositionalFluidState<Scalar, FluidSystem> fsFlash;
CompositionalFluidState<Scalar, FluidSystem> fsFlash;
// use the externally given fluid state as initial value for
// the flash calculation
@ -276,7 +276,7 @@ public:
template <class FluidState>
void assignNaive(const FluidState& fluidState)
{
using FsToolbox = Opm::MathToolbox<typename FluidState::Scalar>;
using FsToolbox = MathToolbox<typename FluidState::Scalar>;
// assign the phase temperatures. this is out-sourced to
// the energy module
@ -284,7 +284,7 @@ public:
// set the pressure of the first phase
(*this)[pressure0Idx] = FsToolbox::value(fluidState.pressure(/*phaseIdx=*/0));
Opm::Valgrind::CheckDefined((*this)[pressure0Idx]);
Valgrind::CheckDefined((*this)[pressure0Idx]);
// determine the phase presence.
phasePresence_ = 0;
@ -316,12 +316,12 @@ public:
if (phaseIsPresent(phaseIdx)) {
(*this)[switch0Idx + switchIdx] = FsToolbox::value(fluidState.saturation(phaseIdx));
Opm::Valgrind::CheckDefined((*this)[switch0Idx + switchIdx]);
Valgrind::CheckDefined((*this)[switch0Idx + switchIdx]);
}
else {
(*this)[switch0Idx + switchIdx] =
FsToolbox::value(fluidState.moleFraction(lowestPhaseIdx, compIdx));
Opm::Valgrind::CheckDefined((*this)[switch0Idx + switchIdx]);
Valgrind::CheckDefined((*this)[switch0Idx + switchIdx]);
}
}
@ -330,7 +330,7 @@ public:
for (unsigned compIdx = numPhases - 1; compIdx < numComponents - 1; ++compIdx) {
(*this)[switch0Idx + compIdx] =
FsToolbox::value(fluidState.moleFraction(lowestPhaseIdx, compIdx + 1));
Opm::Valgrind::CheckDefined((*this)[switch0Idx + compIdx]);
Valgrind::CheckDefined((*this)[switch0Idx + compIdx]);
}
}

View File

@ -127,7 +127,7 @@ public:
// stopped in case exceptions are thrown as well as if the method returns
// regularly.)
report_.reset();
Opm::TimerGuard reportTimerGuard(report_.timer());
TimerGuard reportTimerGuard(report_.timer());
report_.timer().start();
// preconditioned stabilized biconjugate gradient method
@ -334,7 +334,7 @@ public:
convergenceCriterion_ = &crit;
}
const Opm::Linear::SolverReport& report() const
const SolverReport& report() const
{ return report_; }
private:
@ -344,7 +344,7 @@ private:
Preconditioner& preconditioner_;
ConvergenceCriterion& convergenceCriterion_;
Dune::ScalarProduct<Vector>& scalarProduct_;
Opm::Linear::SolverReport report_;
SolverReport report_;
unsigned maxIterations_;
unsigned verbosity_;