Commit 5f889806 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

implicit branch: deprecate numFAP and numSCV and replace by numFap and numScv.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/branches/implicit@9830 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent db914f1c
......@@ -95,7 +95,7 @@ public:
fvGeometry.update(this->gridView_(), *elemIt);
elemBcTypes.update(this->problem_(), *elemIt, fvGeometry);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......
......@@ -267,7 +267,7 @@ protected:
// use finite-element gradients
tmp = 0.0;
for (int idx = 0;
idx < fvGeometry_.numFAP;
idx < fvGeometry_.numFap;
idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
......
......@@ -171,7 +171,7 @@ public:
fvGeometry.update(this->gridView_(), *elemIt);
elemBcTypes.update(this->problem_(), *elemIt, fvGeometry);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......
......@@ -171,7 +171,7 @@ public:
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......@@ -276,7 +276,7 @@ public:
= elemIt->geometry().jacobianTransposed(localPos);
// transform vertex velocities from local to global coordinates
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
// calculate the subcontrolvolume velocity by the Piola transformation
......
......@@ -109,7 +109,7 @@ protected:
// calculate densities at the integration points of the face
DimVector tmp(0.0);
for (int idx = 0;
idx < this->fvGeometry_.numFAP;
idx < this->fvGeometry_.numFap;
idx++) // loop over adjacent vertices
{
// index for the element volume variables
......@@ -135,7 +135,7 @@ protected:
// calculate gradients
DimVector tmp(0.0);
for (int idx = 0;
idx < this->fvGeometry_.numFAP;
idx < this->fvGeometry_.numFap;
idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
......
......@@ -105,7 +105,7 @@ class TwoPTwoCLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
ElementVolumeVariables elemVolVars;
elemVolVars.update(this->problem_(), element, fvGeometry, false);
this->storageTerm_.resize(fvGeometry.numSCV);
this->storageTerm_.resize(fvGeometry.numScv);
this->storageTerm_ = 0;
this->elemPtr_ = &element;
......@@ -310,7 +310,7 @@ class TwoPTwoCLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
void evalPhaseStorage_(const int phaseIdx)
{
// evaluate the storage terms of a single phase
for (int i=0; i < this->fvGeometry_().numSCV; i++) {
for (int i=0; i < this->fvGeometry_().numScv; i++) {
PrimaryVariables &storage = this->storageTerm_[i];
const ElementVolumeVariables &elemVolVars = this->curVolVars_();
const VolumeVariables &volVars = elemVolVars[i];
......
......@@ -346,7 +346,7 @@ public:
(*rank)[idx] = this->gridView_().comm().rank();
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......@@ -461,7 +461,7 @@ public:
elemIt->geometry().jacobianTransposed(localPos);
// transform vertex velocities from local to global coordinates
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
// calculate the subcontrolvolume velocity by the Piola transformation
......@@ -584,7 +584,7 @@ public:
for (; elemIt != elemEndIt; ++elemIt)
{
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......
......@@ -103,7 +103,7 @@ protected:
// gradients
temperatureGrad_ = 0;
DimVector tmp(0.0);
for (int idx = 0; idx < this->fvGeometry_.numFAP; idx++)
for (int idx = 0; idx < this->fvGeometry_.numFap; idx++)
{
tmp = this->face().grad[idx];
......
......@@ -199,7 +199,7 @@ private:
int faceIdx)
{
// calculate gradients, loop over adjacent vertices
for (int idx = 0; idx < this->fvGeometry_.numFAP; idx++)
for (int idx = 0; idx < this->fvGeometry_.numFap; idx++)
{
int i = this->face().i;
int j = this->face().j;
......
......@@ -86,7 +86,7 @@ public:
// calculate temperature gradient using finite element
// gradients
Vector temperatureGrad(0);
for (int idx = 0; idx < fvGeometry.numFAP; idx++)
for (int idx = 0; idx < fvGeometry.numFap; idx++)
{
Vector feGrad = this->face().grad[idx];
......
......@@ -126,7 +126,7 @@ private:
// calculate gradients
DimVector tmp(0.0);
for (int idx = 0;
idx < this->fvGeometry_.numFAP;
idx < this->fvGeometry_.numFap;
idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
......
......@@ -321,7 +321,7 @@ public:
(*rank)[idx] = this->gridView_().comm().rank();
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......@@ -450,7 +450,7 @@ public:
for (; elemIt != elemEndIt; ++elemIt)
{
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......
......@@ -89,7 +89,7 @@ public:
// gradients
DimVector temperatureGrad(0);
DimVector tmp(0.0);
for (int vertIdx = 0; vertIdx < fvGeometry.numFAP; vertIdx++)
for (int vertIdx = 0; vertIdx < fvGeometry.numFap; vertIdx++)
{
tmp = this->face().grad[vertIdx];
......
......@@ -586,9 +586,11 @@ public:
int numVertices; //!< number of verts
int numEdges; //!< number of edges
int numFaces; //!< number of faces (0 in < 3D)
int numSCV; //!< number of subcontrol volumes
int numScv; //!< number of subcontrol volumes
int numSCV; //!< \deprecated number of subcontrol volumes
int numNeighbors; //!< needed for compatibility with cc models
int numFAP; //!< number of flux approximation points
int numFap; //!< number of flux approximation points
int numFAP; //!< \deprecated number of flux approximation points
std::vector<ElementPointer> neighbors; //!< needed for compatibility with cc models
const LocalFiniteElementCache feCache_;
......@@ -614,15 +616,17 @@ public:
numVertices = referenceElement.size(dim);
numEdges = referenceElement.size(dim-1);
numFaces = (dim<3)?0:referenceElement.size(1);
numSCV = numVertices;
numScv = numVertices;
numSCV = numScv;
numNeighbors = 0;
bool useTwoPointFlux
= GET_PARAM_FROM_GROUP(TypeTag, bool, Implicit, UseTwoPointFlux);
if (useTwoPointFlux)
numFAP = 2;
numFap = 2;
else
numFAP = numVertices;
numFap = numVertices;
numFAP = numFap;
// corners:
for (int vert = 0; vert < numVertices; vert++) {
......
......@@ -110,24 +110,28 @@ public:
int numVertices; //!< number of verts
int numEdges; //!< number of edges
int numFaces; //!< number of faces (0 in < 3D)
int numSCV; //!< number of subcontrol volumes
int numScv; //!< number of subcontrol volumes
int numSCV; //!< \deprecated number of subcontrol volumes
int numNeighbors; //!< number of neighboring elements including the element itself
int numFAP; //!< number of flux approximation points
int numFap; //!< number of flux approximation points
int numFAP; //!< \deprecated number of flux approximation points
std::vector<ElementPointer> neighbors; //!< stores pointers for the neighboring elements
void updateInner(const Element& e)
void updateInner(const Element& element)
{
const Geometry& geometry = e.geometry();
const Geometry& geometry = element.geometry();
elementVolume = geometry.volume();
elementGlobal = geometry.center();
elementLocal = geometry.local(elementGlobal);
numVertices = e.template count<dim>();
numEdges = e.template count<dim-1>();
numFaces = (dim<3)? 0 : e.template count<1>();
numSCV = 1;
numFAP = 2;
numVertices = element.template count<dim>();
numEdges = element.template count<dim-1>();
numFaces = (dim<3)? 0 : element.template count<1>();
numScv = 1;
numSCV = numScv;
numFap = 2;
numFAP = numFap;
subContVol[0].local = elementLocal;
subContVol[0].global = elementGlobal;
......@@ -138,19 +142,19 @@ public:
numNeighbors = 1;
neighbors.clear();
neighbors.reserve(maxNE);
ElementPointer elementPointer(e);
ElementPointer elementPointer(element);
neighbors.push_back(elementPointer);
}
void update(const GridView& gridView, const Element& e)
void update(const GridView& gridView, const Element& element)
{
updateInner(e);
updateInner(element);
const Geometry& geometry = e.geometry();
const Geometry& geometry = element.geometry();
// fill neighbor information and control volume face data:
IntersectionIterator endit = gridView.iend(e);
for (IntersectionIterator it = gridView.ibegin(e); it != endit; ++it)
IntersectionIterator endit = gridView.iend(element);
for (IntersectionIterator it = gridView.ibegin(element); it != endit; ++it)
{
// neighbor information and inner cvf data:
if (it->neighbor())
......
......@@ -127,7 +127,7 @@ public:
for (; elemIt != elemEndIt; ++elemIt)
{
fvGeometry.update(this->gridView_(), *elemIt);
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; ++scvIdx)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
{
int globalIdx = this->dofMapper().map(*elemIt, scvIdx, dofCodim);
......
......@@ -183,7 +183,7 @@ protected:
{
gradPotential_[phaseIdx]= 0.0 ;
for (int idx = 0;
idx < fvGeometry_.numFAP;
idx < fvGeometry_.numFap;
idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
......
......@@ -545,7 +545,7 @@ protected:
}
}
for (int i = 0; i < fvElemGeom_.numSCV; i++)
for (int i = 0; i < fvElemGeom_.numScv; i++)
{
// Green vertices are not to be changed!
if (!isBox || jacAsm_().vertexColor(element_(), i) != Green) {
......
......@@ -178,7 +178,7 @@ public:
ElementBoundaryTypes bcTypes;
bcTypes.update(problem_(), element, fvGeometry_());
residual_.resize(fvGeometry_().numSCV);
residual_.resize(fvGeometry_().numScv);
residual_ = 0;
bcTypesPtr_ = &bcTypes;
......@@ -226,9 +226,9 @@ public:
curVolVarsPtr_ = &curVolVars;
// resize the vectors for all terms
int numSCV = fvGeometry_().numSCV;
residual_.resize(numSCV);
storageTerm_.resize(numSCV);
int numScv = fvGeometry_().numScv;
residual_.resize(numScv);
storageTerm_.resize(numScv);
residual_ = 0.0;
storageTerm_ = 0.0;
......@@ -236,14 +236,14 @@ public:
asImp_().evalFluxes_();
#if !defined NDEBUG && HAVE_VALGRIND
for (int i=0; i < fvGeometry_().numSCV; i++)
for (int i=0; i < fvGeometry_().numScv; i++)
Valgrind::CheckDefined(residual_[i]);
#endif // HAVE_VALGRIND
asImp_().evalVolumeTerms_();
#if !defined NDEBUG && HAVE_VALGRIND
for (int i=0; i < fvGeometry_().numSCV; i++) {
for (int i=0; i < fvGeometry_().numScv; i++) {
Valgrind::CheckDefined(residual_[i]);
}
#endif // HAVE_VALGRIND
......@@ -252,7 +252,7 @@ public:
asImp_().evalBoundary_();
#if !defined NDEBUG && HAVE_VALGRIND
for (int i=0; i < fvGeometry_().numSCV; i++)
for (int i=0; i < fvGeometry_().numScv; i++)
Valgrind::CheckDefined(residual_[i]);
#endif // HAVE_VALGRIND
}
......@@ -310,7 +310,7 @@ protected:
if (bcTypes_().hasNeumann() || bcTypes_().hasOutflow())
asImp_().evalBoundaryFluxes_();
#if !defined NDEBUG && HAVE_VALGRIND
for (int i=0; i < fvGeometry_().numSCV; i++)
for (int i=0; i < fvGeometry_().numScv; i++)
Valgrind::CheckDefined(residual_[i]);
#endif // HAVE_VALGRIND
......@@ -324,12 +324,12 @@ protected:
*/
void evalStorage_()
{
storageTerm_.resize(fvGeometry_().numSCV);
storageTerm_.resize(fvGeometry_().numScv);
storageTerm_ = 0;
// calculate the amount of conservation each quantity inside
// all sub control volumes
for (int scvIdx = 0; scvIdx < fvGeometry_().numSCV; scvIdx++) {
for (int scvIdx = 0; scvIdx < fvGeometry_().numScv; scvIdx++) {
Valgrind::SetUndefined(storageTerm_[scvIdx]);
asImp_().computeStorage(storageTerm_[scvIdx], scvIdx, /*isOldSol=*/false);
storageTerm_[scvIdx] *=
......@@ -347,7 +347,7 @@ protected:
void evalVolumeTerms_()
{
// evaluate the volume terms (storage + source terms)
for (int scvIdx = 0; scvIdx < fvGeometry_().numSCV; scvIdx++)
for (int scvIdx = 0; scvIdx < fvGeometry_().numScv; scvIdx++)
{
Scalar extrusionFactor =
curVolVars_(scvIdx).extrusionFactor();
......
......@@ -883,7 +883,7 @@ protected:
fvGeometry.update(gridView_(), *eIt);
// loop over all element vertices, i.e. sub control volumes
for (int scvIdx = 0; scvIdx < fvGeometry.numSCV; scvIdx++)
for (int scvIdx = 0; scvIdx < fvGeometry.numScv; scvIdx++)
{
// get the global index of the degree of freedom
int globalIdx = dofMapper().map(*eIt, scvIdx, dofCodim);
......
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