Commit 81ba6e28 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

This implements FS#194 "Misleading names including 'B/box' in general

fully-implicit models." In particular, it replaces 
OnePBoxModel -> OnePModel
OnePTwoCBoxModel -> OnePTwoCModel
boxGravity -> gravityAtPos
boxSDNeumann -> solDependentNeumann
boxSDSource -> solDependentSource
boxTemperature -> temperatureAtPos



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10741 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 77ec5d57
......@@ -281,7 +281,7 @@ protected:
const VolumeVariables &volVars = elemVolVars[scvIdx];
// retrieve the source term intrinsic to the problem
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......@@ -568,7 +568,7 @@ protected:
//destabilize source term
PrimaryVariables source(0.0);
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -200,7 +200,7 @@ protected:
const FVElementGeometry &fvGeometry,
const int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
DimVector velocity_;
......
......@@ -136,7 +136,7 @@ public:
*/
void computeSource(PrimaryVariables &source, const int scvIdx)
{
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -53,7 +53,7 @@ namespace Dumux
* The model supports compressible as well as incompressible fluids.
*/
template<class TypeTag >
class OnePBoxModel : public GET_PROP_TYPE(TypeTag, BaseModel)
class OnePModel : public GET_PROP_TYPE(TypeTag, BaseModel)
{
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
......@@ -73,7 +73,7 @@ public:
/*!
* \brief \copybrief Dumux::ImplicitModel::addOutputVtkFields
*
* Specialization for the OnePBoxModel, adding the pressure and
* Specialization for the OnePModel, adding the pressure and
* the process rank to the VTK writer.
*/
template<class MultiWriter>
......@@ -143,6 +143,15 @@ public:
writer.attachCellData(*rank, "process rank");
}
};
template<class TypeTag >
class OnePBoxModel : public OnePModel<TypeTag>
{
public:
DUNE_DEPRECATED_MSG("use the class OnePModel instead")
OnePBoxModel(){}
};
}
#include "1ppropertydefaults.hh"
......
......@@ -58,7 +58,7 @@ SET_TYPE_PROP(OneP,
OnePLocalResidual<TypeTag>);
//! the Model property
SET_TYPE_PROP(OneP, Model, OnePBoxModel<TypeTag>);
SET_TYPE_PROP(OneP, Model, OnePModel<TypeTag>);
//! the VolumeVariables property
SET_TYPE_PROP(OneP, VolumeVariables, OnePVolumeVariables<TypeTag>);
......
......@@ -173,7 +173,7 @@ protected:
const FVElementGeometry &fvGeometry,
const int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
/*!
......
......@@ -340,17 +340,14 @@ protected:
Scalar rhoJ = elemVolVars[face().j].density();
Scalar density = (rhoI + rhoJ)/2;
// estimate the gravitational acceleration at a given SCV face
// using the arithmetic mean
DimVector f(problem.boxGravity(element, fvGeometry_, face().i));
f += problem.boxGravity(element, fvGeometry_, face().j);
f /= 2;
// ask for the gravitational acceleration at the given SCV face
DimVector g(problem.gravityAtPos(face().ipGlobal));
// make it a force
f *= density;
g *= density;
// calculate the final potential gradient
potentialGrad_ -= f;
potentialGrad_ -= g;
}
}
......
......@@ -267,7 +267,7 @@ public:
*/
void computeSource(PrimaryVariables &source, const int scvIdx)
{
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -69,7 +69,7 @@ namespace Dumux
*/
template<class TypeTag >
class OnePTwoCBoxModel : public GET_PROP_TYPE(TypeTag, BaseModel)
class OnePTwoCModel : public GET_PROP_TYPE(TypeTag, BaseModel)
{
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
......@@ -97,16 +97,10 @@ class OnePTwoCBoxModel : public GET_PROP_TYPE(TypeTag, BaseModel)
enum { dofCodim = isBox ? dim : 0 };
public:
/*!
* \brief Constructor
*/
OnePTwoCBoxModel()
{}
/*!
* \brief \copybrief ImplicitModel::addOutputVtkFields
*
* Specialization for the OnePTwoCBoxModel, adding pressure,
* Specialization for the OnePTwoCModel, adding pressure,
* mass and mole fractions, and the process rank to the VTK writer.
*/
template<class MultiWriter>
......@@ -197,6 +191,15 @@ public:
writer.attachCellData(rank, "process rank");
}
};
template<class TypeTag >
class OnePTwoCBoxModel : public OnePTwoCModel<TypeTag>
{
public:
DUNE_DEPRECATED_MSG("use the class OnePTwoCModel instead")
OnePTwoCBoxModel(){}
};
}
#include "1p2cpropertydefaults.hh"
......
......@@ -58,7 +58,7 @@ SET_BOOL_PROP(OnePTwoC, UseMoles, false); //!< Define that mass fractions are us
SET_TYPE_PROP(OnePTwoC, LocalResidual, OnePTwoCLocalResidual<TypeTag>);
//! define the model
SET_TYPE_PROP(OnePTwoC, Model, OnePTwoCBoxModel<TypeTag>);
SET_TYPE_PROP(OnePTwoC, Model, OnePTwoCModel<TypeTag>);
//! define the VolumeVariables
SET_TYPE_PROP(OnePTwoC, VolumeVariables, OnePTwoCVolumeVariables<TypeTag>);
......
......@@ -251,7 +251,7 @@ protected:
const FVElementGeometry &fvGeometry,
const int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
/*!
......
......@@ -182,7 +182,7 @@ public:
void computeSource(PrimaryVariables &q, int scvIdx) const
{
// retrieve the source term intrinsic to the problem
this->problem_().boxSDSource(q,
this->problem_().solDependentSource(q,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -240,7 +240,7 @@ protected:
const FVElementGeometry &fvGeometry,
int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
template<class ParameterCache>
......
......@@ -299,7 +299,7 @@ class TwoPTwoCLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
*/
void computeSource(PrimaryVariables& source, const int scvIdx)
{
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -409,7 +409,7 @@ protected:
const FVElementGeometry &fvGeometry,
int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
template<class ParameterCache>
......
......@@ -309,7 +309,7 @@ public:
void computeSource(PrimaryVariables &source, int scvIdx) const
{
// retrieve the source term intrinsic to the problem
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -229,7 +229,7 @@ public:
*/
void computeSource(PrimaryVariables &source, const int scvIdx)
{
this->problem_().boxSDSource(source,
this->problem_().solDependentSource(source,
this->element_(),
this->fvGeometry_(),
scvIdx,
......
......@@ -692,7 +692,7 @@ protected:
const FVElementGeometry &fvGeometry,
const int scvIdx)
{
return problem.boxTemperature(element, fvGeometry, scvIdx);
return problem.temperatureAtPos(fvGeometry.subContVol[scvIdx].global);
}
/*!
......
......@@ -167,7 +167,7 @@ protected:
// deal with neumann boundaries
if (bcTypes.hasNeumann()) {
Valgrind::SetUndefined(neumannFlux);
this->problem_().boxSDNeumann(neumannFlux,
this->problem_().solDependentNeumann(neumannFlux,
this->element_(),
this->fvGeometry_(),
*isIt,
......
......@@ -117,7 +117,7 @@ protected:
Valgrind::SetUndefined(values);
unsigned bfIdx = isIt->indexInInside();
this->problem_().boxSDNeumann(values,
this->problem_().solDependentNeumann(values,
this->element_(),
this->fvGeometry_(),
*isIt,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment