Skip to content
Snippets Groups Projects
Commit cc4dc2b4 authored by Ned Coltman's avatar Ned Coltman
Browse files

[parameters][mpfa] capitalize parameter group MPFA and deprecate

parent 469d07eb
No related branches found
No related tags found
2 merge requests!2152WIP add default fluxcache properties,!2022Cleanup/parametercompare
......@@ -331,7 +331,8 @@ private:
defaultParams["Vtk.AddProcessRank"] = "true";
// parameters in the mpfa group
defaultParams["Mpfa.Q"] = "0.0";
defaultParams["Mpfa.Q"] = "0.0"; // DEPRECATED, REMOVE AFTER 3.2
defaultParams["MPFA.Q"] = "0.0";
// merge the global default tree but do not overwrite if the parameter already exists
mergeTree_(params, defaultParams, false);
......
......@@ -343,7 +343,22 @@ private:
const auto& neighborVolVarIndices = gridGeometry().neighborVolVarIndices(eIdx);
// the quadrature point parameterizaion to be used on scvfs
static const auto q = getParam<CoordScalar>("Mpfa.Q");
static const auto q = []{ // REMOVE deprecated version after release 3.2
CoordScalar q = 0.0;
bool hasOldParamName = hasParam("Mpfa.Q");
if (hasOldParamName) {
std::cerr << "Deprecation warning: Parameter Mpfa.Q is deprecated, use MPFA.Q (uppercase MPFA)" << std::endl;
q = getParam<CoordScalar>("Mpfa.Q");
}
bool hasNewParamName = hasParam("MPFA.Q");
if (hasNewParamName) {
q = getParam<CoordScalar>("MPFA.Q");
}
if (hasOldParamName | hasNewParamName)
return q;
else
return getParam<CoordScalar>("MPFA.Q");
}();
// reserve memory for the scv faces
const auto numLocalScvf = scvFaceIndices.size();
......@@ -430,7 +445,22 @@ private:
const auto& neighborVolVarIndices = gridGeometry().neighborVolVarIndices(eIdxGlobal);
// the quadrature point parameterizaion to be used on scvfs
static const auto q = getParam<CoordScalar>("Mpfa.Q");
static const auto q = []{ // REMOVE deprecated version after release 3.2
CoordScalar q = 0.0;
bool hasOldParamName = hasParam("Mpfa.Q");
if (hasOldParamName) {
std::cerr << "Deprecation warning: Parameter Mpfa.Q is deprecated, use MPFA.Q (uppercase MPFA)" << std::endl;
q = getParam<CoordScalar>("Mpfa.Q");
}
bool hasNewParamName = hasParam("MPFA.Q");
if (hasNewParamName) {
q = getParam<CoordScalar>("MPFA.Q");
}
if (hasOldParamName | hasNewParamName)
return q;
else
return getParam<CoordScalar>("MPFA.Q");
}();
// for network grids we only want to do one scvf per half facet
// this approach assumes conforming grids at branching facets
......
......@@ -278,7 +278,22 @@ public:
secondaryInteractionVolumeVertices_[vIdxGlobal] = true;
// the quadrature point parameterizarion to be used on scvfs
static const auto q = getParam<CoordScalar>("Mpfa.Q");
static const auto q = []{ // REMOVE deprecated version after release 3.2
CoordScalar q = 0.0;
bool hasOldParamName = hasParam("Mpfa.Q");
if (hasOldParamName) {
std::cerr << "Deprecation warning: Parameter Mpfa.Q is deprecated, use MPFA.Q (uppercase MPFA)" << std::endl;
q = getParam<CoordScalar>("Mpfa.Q");
}
bool hasNewParamName = hasParam("MPFA.Q");
if (hasNewParamName) {
q = getParam<CoordScalar>("MPFA.Q");
}
if (hasOldParamName | hasNewParamName)
return q;
else
return getParam<CoordScalar>("MPFA.Q");
}();
// make the scv face (for non-boundary scvfs on network grids, use precalculated outside indices)
const auto& outsideScvIndices = [&] ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment