diff --git a/dumux/geomechanics/el2p/el2passembler.hh b/dumux/geomechanics/el2p/el2passembler.hh index e50c46926f819b5896b201ee0555a2a507490a11..1fb44cf6fb10fc3835adfe26b158016831bd324b 100644 --- a/dumux/geomechanics/el2p/el2passembler.hh +++ b/dumux/geomechanics/el2p/el2passembler.hh @@ -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) { diff --git a/dumux/implicit/box/boxassembler.hh b/dumux/implicit/box/boxassembler.hh index 6ac75411282ab15f9dd740714a10ab8b5aca6a82..4a7fc43355ba92f523031299cbed8225eb233764 100644 --- a/dumux/implicit/box/boxassembler.hh +++ b/dumux/implicit/box/boxassembler.hh @@ -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) diff --git a/dumux/implicit/box/boxelementboundarytypes.hh b/dumux/implicit/box/boxelementboundarytypes.hh index 4a423691899096aa41f6cd7dcad66e69da8c0028..04af7ea3b295bf203ea62168eb9383eaf77740cb 100644 --- a/dumux/implicit/box/boxelementboundarytypes.hh +++ b/dumux/implicit/box/boxelementboundarytypes.hh @@ -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)) { diff --git a/dumux/implicit/common/implicitassembler.hh b/dumux/implicit/common/implicitassembler.hh index 710b64e9821b62eb7e2c9c12673e24a844c2bd20..f0a401df8362ef3710938055ec4ad2850694ab1f 100644 --- a/dumux/implicit/common/implicitassembler.hh +++ b/dumux/implicit/common/implicitassembler.hh @@ -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(); } diff --git a/dumux/implicit/common/implicitmodel.hh b/dumux/implicit/common/implicitmodel.hh index 18a329297e146636aca4012c4abe645f32ebfd4d..a7b0428f88e920348ae1b92f4a4c6974def1fa00 100644 --- a/dumux/implicit/common/implicitmodel.hh +++ b/dumux/implicit/common/implicitmodel.hh @@ -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); diff --git a/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh b/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh index 7ea6b608e27de3a9c42a644e63ac12d59cb5b9b6..1d7619a845ce38d8f5377f2f110186a321f997c0 100644 --- a/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh +++ b/dumux/implicit/mpnc/energy/mpncvtkwriterenergykinetic.hh @@ -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); } } diff --git a/dumux/implicit/mpnc/mpncmodelkinetic.hh b/dumux/implicit/mpnc/mpncmodelkinetic.hh index 273e5285c9c330a560ad80000e7d547347e0b496..432981ffbd8fc7334f12aabc375e875981d74243 100644 --- a/dumux/implicit/mpnc/mpncmodelkinetic.hh +++ b/dumux/implicit/mpnc/mpncmodelkinetic.hh @@ -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 diff --git a/dumux/io/artgridcreator.hh b/dumux/io/artgridcreator.hh index e30f0c5e667cfe42a1deb840192dbe9460d889dc..e9b96d4e4698f125c7d8374dd4178c21f0ea0ba8 100644 --- a/dumux/io/artgridcreator.hh +++ b/dumux/io/artgridcreator.hh @@ -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 diff --git a/dumux/io/interfacemeshcreator.hh b/dumux/io/interfacemeshcreator.hh index 035f71e5ea09428f17ff054cd1744213d2505a01..b86552a28fd51392c21bb4d1141dbb9bcda40fc2 100644 --- a/dumux/io/interfacemeshcreator.hh +++ b/dumux/io/interfacemeshcreator.hh @@ -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]; } } diff --git a/test/decoupled/2p/test_3d2pproblem.hh b/test/decoupled/2p/test_3d2pproblem.hh index a21c17f1418b1e6ed497f40e37e6c6cedb841ec8..94d25037ded12d458b1304c96bf9405e513e83f6 100644 --- a/test/decoupled/2p/test_3d2pproblem.hh +++ b/test/decoupled/2p/test_3d2pproblem.hh @@ -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());