Commit 74a50a76 authored by Tianyuan Zheng's avatar Tianyuan Zheng
Browse files

[namingConventions] changed "problem", "referenceElement", "element", "vertex" and

"intersection"

reviewed by fetzer


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11338 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent cfcbc2a6
......@@ -195,10 +195,10 @@ public:
//! Constructs an IMPET object
/**
* \param prob Problem
* \param problem Problem
*/
IMPET(Problem& prob) :
problem_(prob)
IMPET(Problem& problem) :
problem_(problem)
{
cFLFactor_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Impet, CFLFactor);
iterFlag_ = GET_PARAM_FROM_GROUP(TypeTag, int, Impet, IterationFlag);
......
......@@ -109,7 +109,7 @@ public:
*/
Scalar permeability(const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{ DUNE_THROW(Dune::NotImplemented, "permeability()"); }
......
......@@ -567,10 +567,10 @@ private:
ElementIterator eIt = gridView_().template begin<0>();
const ElementIterator eEndIt = gridView_().template end<0>();
for (; eIt != eEndIt; ++eIt) {
const Element &elem = *eIt;
const Element &element = *eIt;
// loop over all element vertices
int n = elem.template count<dim>();
int n = element.template count<dim>();
for (int i = 0; i < n - 1; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
for (int j = i + 1; j < n; ++j) {
......
......@@ -229,13 +229,13 @@ private:
ElementIterator eIt = this->gridView_().template begin<0>();
const ElementIterator eEndIt = this->gridView_().template end<0>();
for (; eIt != eEndIt; ++eIt) {
const Element &elem = *eIt;
int numVerticesLocal = elem.template count<dim>();
const Element &element = *eIt;
int numVerticesLocal = element.template count<dim>();
// if the element is not in the interior or the process
// border, all dofs just contain main-diagonal entries
if (elem.partitionType() != Dune::InteriorEntity &&
elem.partitionType() != Dune::BorderEntity)
if (element.partitionType() != Dune::InteriorEntity &&
element.partitionType() != Dune::BorderEntity)
{
for (int i = 0; i < numVerticesLocal; ++i) {
int globalI = this->vertexMapper_().map(*eIt, i, dim);
......@@ -283,23 +283,23 @@ private:
}
// assemble a non-ghost element
void assembleElement_(const Element &elem)
void assembleElement_(const Element &element)
{
if (this->enablePartialReassemble_()) {
int globalElemIdx = this->model_().elementMapper().map(elem);
int globalElemIdx = this->model_().elementMapper().map(element);
if (this->elementColor_[globalElemIdx] == ParentType::Green) {
++this->greenElems_;
assembleGreenElement_(elem);
assembleGreenElement_(element);
return;
}
}
this->model_().localJacobian().assemble(elem);
this->model_().localJacobian().assemble(element);
int numVerticesLocal = elem.template count<dim>();
int numVerticesLocal = element.template count<dim>();
for (int i=0; i < numVerticesLocal; ++ i) {
int globI = this->vertexMapper_().map(elem, i, dim);
int globI = this->vertexMapper_().map(element, i, dim);
// update the right hand side
this->residual_[globI] += this->model_().localJacobian().residual(i);
......@@ -322,7 +322,7 @@ private:
// update the jacobian matrix
for (int j = 0; j < numVerticesLocal; ++ j) {
int globJ = this->vertexMapper_().map(elem, j, dim);
int globJ = this->vertexMapper_().map(element, j, dim);
(*this->matrix_)[globI][globJ] +=
this->model_().localJacobian().mat(i,j);
}
......@@ -332,13 +332,13 @@ private:
// "assemble" a green element. green elements only get the
// residual updated, but the jacobian is left alone...
void assembleGreenElement_(const Element &elem)
void assembleGreenElement_(const Element &element)
{
this->model_().localResidual().eval(elem);
this->model_().localResidual().eval(element);
int numVerticesLocal = elem.template count<dim>();
int numVerticesLocal = element.template count<dim>();
for (int i = 0; i < numVerticesLocal; ++ i) {
int globI = this->vertexMapper_().map(elem, i, dim);
int globI = this->vertexMapper_().map(element, i, dim);
// update the right hand side
this->residual_[globI] += this->model_().localResidual().residual(i);
......@@ -348,11 +348,11 @@ private:
}
// "assemble" a ghost element
void assembleGhostElement_(const Element &elem)
void assembleGhostElement_(const Element &element)
{
int numVerticesLocal = elem.template count<dim>();
int numVerticesLocal = element.template count<dim>();
for (int i=0; i < numVerticesLocal; ++i) {
const VertexPointer vp = elem.template subEntity<dim>(i);
const VertexPointer vp = element.template subEntity<dim>(i);
if (vp->partitionType() == Dune::InteriorEntity ||
vp->partitionType() == Dune::BorderEntity)
......
......@@ -137,19 +137,19 @@ private:
ElementIterator eIt = this->gridView_().template begin<0>();
const ElementIterator eEndIt = this->gridView_().template end<0>();
for (; eIt != eEndIt; ++eIt) {
const Element &elem = *eIt;
const Element &element = *eIt;
int globalI = this->elementMapper_().map(elem);
int globalI = this->elementMapper_().map(element);
neighbors[globalI].insert(globalI);
// if the element is ghost,
// all dofs just contain main-diagonal entries
//if (elem.partitionType() == Dune::GhostEntity)
//if (element.partitionType() == Dune::GhostEntity)
// continue;
// loop over all neighbors
IntersectionIterator isIt = this->gridView_().ibegin(elem);
const IntersectionIterator &isEndIt = this->gridView_().iend(elem);
IntersectionIterator isIt = this->gridView_().ibegin(element);
const IntersectionIterator &isEndIt = this->gridView_().iend(element);
for (; isIt != isEndIt; ++isIt)
{
if (isIt->neighbor())
......@@ -179,21 +179,21 @@ private:
}
// assemble a non-ghost element
void assembleElement_(const Element &elem)
void assembleElement_(const Element &element)
{
if (this->enablePartialReassemble_()) {
int globalElemIdx = this->model_().elementMapper().map(elem);
int globalElemIdx = this->model_().elementMapper().map(element);
if (this->elementColor_[globalElemIdx] == ParentType::Green) {
++this->greenElems_;
assembleGreenElement_(elem);
assembleGreenElement_(element);
return;
}
}
this->model_().localJacobian().assemble(elem);
this->model_().localJacobian().assemble(element);
int globalI = this->elementMapper_().map(elem);
int globalI = this->elementMapper_().map(element);
// update the right hand side
this->residual_[globalI] = this->model_().localJacobian().residual(0);
......@@ -211,8 +211,8 @@ private:
// update the diagonal entry
(*this->matrix_)[globalI][globalI] = this->model_().localJacobian().mat(0,0);
IntersectionIterator isIt = this->gridView_().ibegin(elem);
const IntersectionIterator &isEndIt = this->gridView_().iend(elem);
IntersectionIterator isIt = this->gridView_().ibegin(element);
const IntersectionIterator &isEndIt = this->gridView_().iend(element);
for (int j = 0; isIt != isEndIt; ++isIt)
{
if (isIt->neighbor())
......@@ -225,11 +225,11 @@ private:
// "assemble" a green element. green elements only get the
// residual updated, but the jacobian is left alone...
void assembleGreenElement_(const Element &elem)
void assembleGreenElement_(const Element &element)
{
this->model_().localResidual().eval(elem);
this->model_().localResidual().eval(element);
int globalI = this->elementMapper_().map(elem);
int globalI = this->elementMapper_().map(element);
// update the right hand side
this->residual_[globalI] += this->model_().localResidual().residual(0);
......@@ -238,9 +238,9 @@ private:
}
// "assemble" a ghost element
void assembleGhostElement_(const Element &elem)
void assembleGhostElement_(const Element &element)
{
int globalI = this->elementMapper_().map(elem);
int globalI = this->elementMapper_().map(element);
// update the right hand side
this->residual_[globalI] = 0.0;
......
......@@ -116,10 +116,10 @@ public:
*
* \param prob The problem which we want to simulate.
*/
void init(Problem &prob)
void init(Problem &problem)
{
problemPtr_ = &prob;
localResidual_.init(prob);
problemPtr_ = &problem;
localResidual_.init(problem);
// assume quadrilinears as elements with most vertices
if (isBox)
......
......@@ -789,13 +789,13 @@ public:
* \brief Returns true if the control volume touches
* the grid's boundary.
*
* \param elem A DUNE Codim<0> entity coinciding with the control
* \param element A DUNE Codim<0> entity coinciding with the control
* volume.
*/
bool onBoundary(const Element &elem) const
bool onBoundary(const Element &element) const
{
if (!isBox)
return onBoundary(elementMapper().map(elem));
return onBoundary(elementMapper().map(element));
else
DUNE_THROW(Dune::InvalidStateException,
"requested for box model");
......
......@@ -259,7 +259,7 @@ public:
* \param values The neumann values for the conservation equations in units of \f$ [ \textnormal{unit of conserved quantity} / (m^2 \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local subcontrolvolume index
* \param boundaryFaceIdx The index of the boundary face
* \param elemVolVars All volume variables for the element
......@@ -270,7 +270,7 @@ public:
void solDependentNeumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx,
const ElementVolumeVariables &elemVolVars) const
......@@ -279,7 +279,7 @@ public:
asImp_().neumann(values,
element,
fvGeometry,
is,
intersection,
scvIdx,
boundaryFaceIdx);
}
......@@ -289,7 +289,7 @@ public:
void boxSDNeumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx,
const ElementVolumeVariables &elemVolVars) const
......@@ -297,7 +297,7 @@ public:
asImp_().solDependentNeumann(values,
element,
fvGeometry,
is,
intersection,
scvIdx,
boundaryFaceIdx,
elemVolVars);
......@@ -310,7 +310,7 @@ public:
* \param values The neumann values for the conservation equations in units of \f$ [ \textnormal{unit of conserved quantity} / (m^2 \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite-volume geometry
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local subcontrolvolume index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -320,7 +320,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{
......
......@@ -94,15 +94,15 @@ public:
* \brief Modify the internal buffers according to the volume
* variables seen on an element
*/
void processElement(const Element &elem,
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
const ElementVolumeVariables &elemVolVars,
const ElementBoundaryTypes &elemBcTypes)
{
int numLocalVertices = elem.geometry().corners();
int numLocalVertices = element.geometry().corners();
for (int localVertexIdx = 0; localVertexIdx< numLocalVertices; ++localVertexIdx) {
const unsigned int globalIdx = this->problem_.vertexMapper().map(elem, localVertexIdx, dim);
const VolumeVariables &volVars = elemVolVars[localVertexIdx];
const unsigned int globalIdx = this->problem_.vertexMapper().map(element, localVertexIdx, dim);
const VolumeVariables &volVars = elementVolVars[localVertexIdx];
for (unsigned int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
for (unsigned int compIdx = 0; compIdx < numComponents; ++ compIdx) {
......
......@@ -85,7 +85,7 @@ public:
* \brief Modify the internal buffers according to the volume
* variables seen on an element
*/
void processElement(const Element &elem,
void processElement(const Element &element,
const FVElementGeometry &fvGeometry,
const ElementVolumeVariables &elemCurVolVars,
const ElementBoundaryTypes &elemBcTypes)
......
......@@ -232,7 +232,7 @@ namespace Dumux
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{
......
......@@ -209,7 +209,7 @@ public:
* \param values The neumann values for the conservation equations
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -224,7 +224,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......
......@@ -201,7 +201,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......
......@@ -187,7 +187,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......
......@@ -550,7 +550,7 @@ public:
* \param values The neumann values for the conservation equations in units of \f$ [ \textnormal{unit of conserved quantity} / (m^2 \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -560,7 +560,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......
......@@ -253,7 +253,7 @@ public:
void neumann(PrimaryVariables &priVars,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{
......
......@@ -246,7 +246,7 @@ public:
void neumann(PrimaryVariables &priVars,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{
......
......@@ -281,7 +281,7 @@ public:
* \param values The neumann values for the conservation equations
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -291,7 +291,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......@@ -301,7 +301,7 @@ public:
if (isBox)
globalPos = element.geometry().corner(scvIdx);
else
globalPos = is.geometry().center();
globalPos = intersection.geometry().center();
if (globalPos[1] < 15 && globalPos[1] > 7) {
values[contiN2EqIdx] = -1e-3; // kg/(s*m^2)
......
......@@ -260,7 +260,7 @@ public:
* \param values The neumann values for the conservation equations
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -270,7 +270,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
const int scvIdx,
const int boundaryFaceIdx) const
{
......@@ -280,7 +280,7 @@ public:
if (isBox)
globalPos = element.geometry().corner(scvIdx);
else
globalPos = is.geometry().center();
globalPos = intersection.geometry().center();
// negative values for injection
if (globalPos[0] > 15 && globalPos[0] < 25 &&
......
......@@ -305,7 +305,7 @@ public:
* \param values The neumann values for the conservation equations
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param is The intersection between element and boundary
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param boundaryFaceIdx The index of the boundary face
*
......@@ -315,7 +315,7 @@ public:
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &is,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
......@@ -325,7 +325,7 @@ public:
if (isBox)
globalPos = element.geometry().corner(scvIdx);
else
globalPos = is.geometry().center();
globalPos = intersection.geometry().center();
if (globalPos[1] < 15 && globalPos[1] > 7) {
// inject air. negative values mean injection
......
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