Commit a419ca1f authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

implement naming convention numVerts, nVerts, nVertices -> numVertices

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11596 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ef1c1eb3
......@@ -214,7 +214,7 @@ public:
*matrix_ = 0;
reuseMatrix_ = false;
int numVerts = gridView_().size(dim);
int numVertices = gridView_().size(dim);
int numElements = gridView_().size(0);
residual_.resize(matrix_->N());
......@@ -222,8 +222,8 @@ public:
// initialize data needed for partial reassembly
if (enablePartialReassemble) {
vertexColor_.resize(numVerts);
vertexDelta_.resize(numVerts);
vertexColor_.resize(numVertices);
vertexDelta_.resize(numVertices);
elementColor_.resize(numElements);
}
reassembleAll();
......@@ -371,8 +371,8 @@ public:
// find out whether the current element features a red
// vertex
bool isRed = false;
int numVerts = eIt->template count<dim>();
for (int i=0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i=0; i < numVertices; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
if (vertexColor_[globalI] == Red) {
isRed = true;
......@@ -397,8 +397,8 @@ public:
continue; // non-red elements do not tint vertices
// yellow!
int numVerts = eIt->template count<dim>();
for (int i=0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i=0; i < numVertices; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
// if a vertex is already red, don't recolor it to
// yellow!
......@@ -418,8 +418,8 @@ public:
// check whether the element features a yellow
// (resp. orange at this point) vertex
bool isYellow = false;
int numVerts = eIt->template count<dim>();
for (int i=0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i=0; i < numVertices; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
if (vertexColor_[globalI] == Orange) {
isYellow = true;
......@@ -440,8 +440,8 @@ public:
continue; // yellow and red elements do not make
// orange vertices yellow!
int numVerts = eIt->template count<dim>();
for (int i=0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i=0; i < numVertices; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
// if a vertex is orange, recolor it to yellow!
if (vertexColor_[globalI] == Orange)
......@@ -555,15 +555,15 @@ private:
// Construct the BCRS matrix for the global jacobian
void createMatrix_()
{
int nVerts = gridView_().size(dim);
int numVertices = gridView_().size(dim);
// allocate raw matrix
matrix_ = new JacobianMatrix(nVerts, nVerts, JacobianMatrix::random);
matrix_ = new JacobianMatrix(numVertices, numVertices, JacobianMatrix::random);
// find out the global indices of the neighboring vertices of
// each vertex
typedef std::set<int> NeighborSet;
std::vector<NeighborSet> neighbors(nVerts);
std::vector<NeighborSet> neighbors(numVertices);
ElementIterator eIt = gridView_().template begin<0>();
const ElementIterator eEndIt = gridView_().template end<0>();
for (; eIt != eEndIt; ++eIt) {
......@@ -584,11 +584,11 @@ private:
};
// make vertices neighbors to themselfs
for (int i = 0; i < nVerts; ++i)
for (int i = 0; i < numVertices; ++i)
neighbors[i].insert(i);
// allocate space for the rows of the matrix
for (int i = 0; i < nVerts; ++i) {
for (int i = 0; i < numVertices; ++i) {
matrix_->setrowsize(i, neighbors[i].size());
}
matrix_->endrowsizes();
......@@ -596,7 +596,7 @@ private:
// fill the rows with indices. each vertex talks to all of its
// neighbors. (it also talks to itself since vertices are
// sometimes quite egocentric.)
for (int i = 0; i < nVerts; ++i) {
for (int i = 0; i < numVertices; ++i) {
typename NeighborSet::iterator nIt = neighbors[i].begin();
typename NeighborSet::iterator nEndIt = neighbors[i].end();
for (; nIt != nEndIt; ++nIt) {
......
......@@ -101,8 +101,8 @@ private:
// find out whether the current element features a red
// vertex
bool isRed = false;
int numVerts = eIt->template count<dim>();
for (int i=0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i=0; i < numVertices; ++i) {
int globalI = this->vertexMapper_().map(*eIt, i, dim);
if (this->vertexColor_[globalI] == ParentType::Red) {
isRed = true;
......@@ -127,8 +127,8 @@ private:
continue; // non-red elements do not tint vertices
// yellow!
int numVerts = eIt->template count<dim>();
for (int i = 0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i = 0; i < numVertices; ++i) {
int globalI = this->vertexMapper_().map(*eIt, i, dim);
// if a vertex is already red, don't recolor it to
// yellow!
......@@ -159,8 +159,8 @@ private:
// check whether the element features a yellow
// (resp. orange at this point) vertex
bool isYellow = false;
int numVerts = eIt->template count<dim>();
for (int i = 0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i = 0; i < numVertices; ++i) {
int globalI = this->vertexMapper_().map(*eIt, i, dim);
if (this->vertexColor_[globalI] == ParentType::Orange) {
isYellow = true;
......@@ -181,8 +181,8 @@ private:
continue; // yellow and red elements do not make
// orange vertices yellow!
int numVerts = eIt->template count<dim>();
for (int i = 0; i < numVerts; ++i) {
int numVertices = eIt->template count<dim>();
for (int i = 0; i < numVertices; ++i) {
int globalI = this->vertexMapper_().map(*eIt, i, dim);
// if a vertex is orange, recolor it to yellow!
if (this->vertexColor_[globalI] == ParentType::Orange)
......
......@@ -80,14 +80,14 @@ public:
void update(const Problem &problem,
const Element &element)
{
int numVerts = element.template count<dim>();
this->resize(numVerts);
int numVertices = element.template count<dim>();
this->resize(numVertices);
hasDirichlet_ = false;
hasNeumann_ = false;
hasOutflow_ = false;
for (int i = 0; i < numVerts; ++i) {
for (int i = 0; i < numVertices; ++i) {
(*this)[i].reset();
if (problem.model().onBoundary(element, i)) {
......
......@@ -123,7 +123,7 @@ public:
*matrix_ = 0;
reuseMatrix_ = false;
int numVerts = gridView_().size(dim);
int numVertices = gridView_().size(dim);
int numElements = gridView_().size(0);
int numDofs = problem.model().numDofs();
......@@ -147,7 +147,7 @@ public:
delta_.resize(numDofs);
elementColor_.resize(numElements);
if (isBox)
vertexColor_.resize(numVerts);
vertexColor_.resize(numVertices);
}
reassembleAll();
}
......
......@@ -119,10 +119,10 @@ public:
// resize the hint vectors
if (isBox && enableHints_) {
int nVerts = gridView_().size(dim);
curHints_.resize(nVerts);
prevHints_.resize(nVerts);
hintsUsable_.resize(nVerts);
int numVertices = gridView_().size(dim);
curHints_.resize(numVertices);
prevHints_.resize(numVertices);
hintsUsable_.resize(numVertices);
std::fill(hintsUsable_.begin(),
hintsUsable_.end(),
false);
......
......@@ -107,9 +107,9 @@ public:
if (velocityAveragingInModel and not velocityOutput/*only one of the two output options, otherwise paraview segfaults due to two times the same field name*/) {
Scalar nVerts = this->problem_.gridView().size(dim);
Scalar numVertices = this->problem_.gridView().size(dim);
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
velocity_[phaseIdx].resize(nVerts);
velocity_[phaseIdx].resize(numVertices);
velocity_[phaseIdx] = 0;
}
}
......@@ -160,9 +160,9 @@ public:
ans_[globalIdx] = volVars.interfacialArea(nPhaseIdx, sPhaseIdx);
if (velocityAveragingInModel and not velocityOutput/*only one of the two output options, otherwise paraview segfaults due to two times the same field name*/){
int nVerts = this->problem_.gridView().size(dim); // numVertices for vertexCentereed, numVolumes for volume centered
int numVertices = this->problem_.gridView().size(dim); // numVertices for vertexCentereed, numVolumes for volume centered
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
for (int I = 0; I < nVerts; ++I)
for (int I = 0; I < numVertices; ++I)
velocity_[phaseIdx][I] = this->problem_.model().volumeDarcyVelocity(phaseIdx, I);
}
}
......
......@@ -101,14 +101,14 @@ public:
*/
void initVelocityStuff(){
// belongs to velocity averaging
int nVerts = this->gridView().size(dim);
int numVertices = this->gridView().size(dim);
// allocation and bringing to size
for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
volumeDarcyVelocity_[phaseIdx].resize(nVerts);
volumeDarcyMagVelocity_[phaseIdx].resize(nVerts);
volumeDarcyVelocity_[phaseIdx].resize(numVertices);
volumeDarcyMagVelocity_[phaseIdx].resize(numVertices);
std::fill(volumeDarcyMagVelocity_[phaseIdx].begin(), volumeDarcyMagVelocity_[phaseIdx].end(), 0.0);
boxSurface_.resize(nVerts);
boxSurface_.resize(numVertices);
std::fill(boxSurface_.begin(), boxSurface_.end(), 0.0);
volumeDarcyVelocity_[phaseIdx] = 0;
}
......@@ -125,7 +125,7 @@ public:
*/
void calcVelocityAverage()
{
Scalar nVerts = this->gridView().size(dim);
Scalar numVertices = this->gridView().size(dim);
// reset
for (int phaseIdx =0; phaseIdx<numPhases; ++phaseIdx){
......@@ -185,7 +185,7 @@ public:
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
// first, divide the velocity field by the
// respective finite volume's surface area
for (int I = 0; I < nVerts; ++I){
for (int I = 0; I < numVertices; ++I){
volumeDarcyVelocity_[phaseIdx][I] /= boxSurface_[I];
volumeDarcyMagVelocity_[phaseIdx][I] = volumeDarcyVelocity_[phaseIdx][I].two_norm() ;
}// end all vertices
......
......@@ -511,10 +511,10 @@ public:
void map()
{
//call the new_read art
int nVertices = GridCreator::vertexNumber();
int numVertices = GridCreator::vertexNumber();
int nEdges = GridCreator::edgeNumber();
//The vertexes which are located on fractures
isDuneFractureVertex_.resize(nVertices);
isDuneFractureVertex_.resize(numVertices);
std::fill(isDuneFractureVertex_.begin(), isDuneFractureVertex_.end(), false);
//The edge which are fractures
......
......@@ -121,8 +121,8 @@ std::cout << "rglobal = " << refinePoint << ", rlocal = " << refinePointLocal <<
}
std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight << ", hLeft = " << hLeft << ", hRight = " << hRight << ", nLeft = " << nLeft << ", nRight = " << nRight << std::endl;
int nVertices = numElements[comp] + 1;
localPositions[comp].resize(nVertices);
int numVertices = numElements[comp] + 1;
localPositions[comp].resize(numVertices);
localPositions[comp][0] = 0.0;
for (int i = 0; i < nLeft; i++)
......@@ -144,10 +144,10 @@ std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight
localPositions[comp][nLeft+nRight+i+1] = localPositions[comp][nLeft+nRight+i] + hI;
}
if (localPositions[comp][nVertices-1] != 1.0)
if (localPositions[comp][numVertices-1] != 1.0)
{
for (int i = 0; i < nVertices; i++)
localPositions[comp][i] /= localPositions[comp][nVertices-1];
for (int i = 0; i < numVertices; i++)
localPositions[comp][i] /= localPositions[comp][numVertices-1];
}
}
......
......@@ -300,8 +300,8 @@ void source(PrimaryVariables &values,const Element& element) const
values = 0;
#if PROBLEM == 2 //Nine-Spot
int numVerts = element.geometry().corners();
for(int i = 0; i < numVerts; i++)
int numVertices = element.geometry().corners();
for(int i = 0; i < numVertices; i++)
{
GlobalPosition globalPos(element.template subEntity<dim>(i)->geometry().center());
......@@ -347,8 +347,8 @@ void boundaryTypes(BoundaryTypes &bcTypes, const Intersection& intersection) con
{
#if PROBLEM == 2 //Nine-Spot
ElementPointer element = intersection.inside();
int numVerts = element->geometry().corners();
for(int i = 0; i < numVerts; i++)
int numVertices = element->geometry().corners();
for(int i = 0; i < numVertices; i++)
{
GlobalPosition globalPos(element->template subEntity<dim>(i)->geometry().center());
......
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