STYLE: use forAll macro in more places, avoid LF-CR endings

This commit is contained in:
Mark Olesen
2010-04-23 18:35:55 +02:00
parent 03338b9ea9
commit 9c32ce1016
56 changed files with 1784 additions and 1789 deletions

View File

@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (Y[i].name() != inertSpecie)
{ {

View File

@ -43,7 +43,7 @@ volScalarField Sevap
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0) dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
); );
for (label i=0; i<Y.size(); i++) forAll(Y, i)
{ {
if (dieselSpray.isLiquidFuel()[i]) if (dieselSpray.isLiquidFuel()[i])
{ {

View File

@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (Y[i].name() != inertSpecie)
{ {

View File

@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (Y[i].name() != inertSpecie)
{ {

View File

@ -27,7 +27,7 @@
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
); );
for (label i=0; i<p.boundaryField().size(); i++) forAll(p.boundaryField(), i)
{ {
if (p.boundaryField()[i].fixesValue()) if (p.boundaryField()[i].fixesValue())
{ {

View File

@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
label inertIndex = -1; label inertIndex = -1;
volScalarField Yt = 0.0*Y[0]; volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (Y[i].name() != inertSpecie)
{ {

View File

@ -36,7 +36,7 @@
calculatedFvPatchScalarField::typeName calculatedFvPatchScalarField::typeName
); );
for (label i=0; i<Ua.boundaryField().size(); i++) forAll(Ua.boundaryField(), i)
{ {
if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i])) if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
{ {

View File

@ -36,7 +36,7 @@
calculatedFvPatchScalarField::typeName calculatedFvPatchScalarField::typeName
); );
for (label i=0; i<Ub.boundaryField().size(); i++) forAll(Ub.boundaryField(), i)
{ {
if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i])) if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i]))
{ {

View File

@ -135,7 +135,7 @@
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
); );
for (label i=0; i<p.boundaryField().size(); i++) forAll(p.boundaryField(), i)
{ {
if (p.boundaryField()[i].fixesValue()) if (p.boundaryField()[i].fixesValue())
{ {

View File

@ -98,7 +98,7 @@
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
); );
for (label i=0; i<p.boundaryField().size(); i++) forAll(p.boundaryField(), i)
{ {
if (p.boundaryField()[i].fixesValue()) if (p.boundaryField()[i].fixesValue())
{ {

View File

@ -7,7 +7,7 @@
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
); );
for (label i=0; i<p.boundaryField().size(); i++) forAll(p.boundaryField(), i)
{ {
if (p.boundaryField()[i].fixesValue()) if (p.boundaryField()[i].fixesValue())
{ {

View File

@ -7,7 +7,7 @@
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
); );
for (label i=0; i<p.boundaryField().size(); i++) forAll(p.boundaryField(), i)
{ {
if (p.boundaryField()[i].fixesValue()) if (p.boundaryField()[i].fixesValue())
{ {

View File

@ -106,7 +106,7 @@ Foam::phaseModel::phaseModel
calculatedFvPatchScalarField::typeName calculatedFvPatchScalarField::typeName
); );
for (label i=0; i<U_.boundaryField().size(); i++) forAll(U_.boundaryField(), i)
{ {
if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])) if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]))
{ {

View File

@ -341,9 +341,9 @@ int main(int argc, char *argv[])
{ {
wordList fieldNames = objects.names(volFieldTypes[i]); wordList fieldNames = objects.names(volFieldTypes[i]);
for (label j=0; j<fieldNames.size(); j++) forAll(fieldNames, j)
{ {
word fieldName = fieldNames[j]; const word& fieldName = fieldNames[j];
# include "checkData.H" # include "checkData.H"

View File

@ -6,10 +6,10 @@ for (label i=0; i < nTypes; i++)
{ {
gmvFile << "variable" << nl; gmvFile << "variable" << nl;
} }
for (label j=0; j < fieldNames.size(); j++)
{
word fieldName = fieldNames[j]; forAll(fieldNames, j)
{
const word& fieldName = fieldNames[j];
IOobject fieldObject IOobject fieldObject
( (

View File

@ -20,7 +20,7 @@ for (label indx=0;indx<nPoints;indx++)
} }
gmvFile << nl; gmvFile << nl;
gmvFile << "cells " << cells.size() << nl; gmvFile << "cells " << cells.size() << nl;
for (label indx=0;indx<cells.size();indx++) forAll(cells, indx)
{ {
label nNodes = cells[indx].size(); label nNodes = cells[indx].size();
if (nNodes == 8) if (nNodes == 8)

View File

@ -95,7 +95,7 @@ int USERD_get_gold_variable_info
); );
} }
for (label n=0; n<lagrangianVectorNames.size(); n++) forAll(lagrangianVectorNames, n)
{ {
var_type[offset + Ns + n] = Z_VECTOR; var_type[offset + Ns + n] = Z_VECTOR;
var_classify[offset + Ns + n] = Z_PER_ELEM; var_classify[offset + Ns + n] = Z_PER_ELEM;

View File

@ -144,7 +144,7 @@ int USERD_get_part_element_ids_by_type
} }
else if (part_number == nPatches+2) else if (part_number == nPatches+2)
{ {
for (label n=0; n<sprayPtr->size(); n++) forAll(*sprayPtr, n)
{ {
elemid_array[n] = n + 1; elemid_array[n] = n + 1;
} }

View File

@ -234,7 +234,7 @@ int USERD_get_part_elements_by_type
} }
else if (part_number == nPatches+2) else if (part_number == nPatches+2)
{ {
for (label n=0; n<sprayPtr->size(); n++) forAll(*sprayPtr, n)
{ {
conn_array[n][0] = n + 1; conn_array[n][0] = n + 1;
} }

View File

@ -99,7 +99,7 @@ int USERD_set_filenames
label nVar = 0; label nVar = 0;
wordList scalars = objects.names(scalarName); wordList scalars = objects.names(scalarName);
for (label n=0; n<fieldNames.size(); n++) forAll(fieldNames, n)
{ {
bool isitScalar = false; bool isitScalar = false;
forAll(scalars,i) forAll(scalars,i)
@ -115,7 +115,7 @@ int USERD_set_filenames
wordList vectors = objects.names(vectorName); wordList vectors = objects.names(vectorName);
for (label n=0; n<fieldNames.size(); n++) forAll(fieldNames, n)
{ {
bool isitVector = false; bool isitVector = false;
forAll(vectors,i) forAll(vectors,i)
@ -131,7 +131,7 @@ int USERD_set_filenames
wordList tensors = objects.names(tensorName); wordList tensors = objects.names(tensorName);
for (label n=0; n<fieldNames.size(); n++) forAll(fieldNames, n)
{ {
bool isitTensor = false; bool isitTensor = false;
forAll(tensors,i) forAll(tensors,i)

View File

@ -21,7 +21,7 @@ if (nVar >= 0)
if (s.size()) if (s.size())
{ {
for (label n = 0; n < s.size(); n++) forAll(s, n)
{ {
var_array[n+1] = s[n]; var_array[n+1] = s[n];
} }

View File

@ -22,7 +22,7 @@ if (nVar >= 0)
if (v.size()) if (v.size())
{ {
for (label n = 0; n < v.size(); n++) forAll(v, n)
{ {
if (component == 0) if (component == 0)
{ {

View File

@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
if (which_type == Z_TRI03) if (which_type == Z_TRI03)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if (nPoints == 3) if (nPoints == 3)
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
if (which_type == Z_QUA04) if (which_type == Z_QUA04)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if (nPoints == 4) if (nPoints == 4)
@ -65,10 +65,10 @@ if (which_type == Z_QUA04)
if (which_type == Z_NSIDED) if (which_type == Z_NSIDED)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if ((nPoints != 3) && (nPoints != 4)) if (nPoints != 3 && nPoints != 4)
{ {
var_array[counter++] = sfb[facei]; var_array[counter++] = sfb[facei];
} }

View File

@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
if (which_type == Z_TRI03) if (which_type == Z_TRI03)
{ {
label counter = 1; label counter = 1;
for (label n=0; n<tf.size(); n++) forAll(tf, n)
{ {
label nPoints = bMesh[patchi][n].size(); label nPoints = bMesh[patchi][n].size();
if (nPoints == 3) if (nPoints == 3)
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
if (which_type == Z_QUA04) if (which_type == Z_QUA04)
{ {
label counter = 1; label counter = 1;
for (label n=0; n<tf.size(); n++) forAll(tf, n)
{ {
label nPoints = bMesh[patchi][n].size(); label nPoints = bMesh[patchi][n].size();
if (nPoints == 4) if (nPoints == 4)
@ -65,7 +65,7 @@ if (which_type == Z_QUA04)
if (which_type == Z_NSIDED) if (which_type == Z_NSIDED)
{ {
label counter = 1; label counter = 1;
for (label n=0; n<tf.size(); n++) forAll(tf, n)
{ {
label nPoints = bMesh[patchi][n].size(); label nPoints = bMesh[patchi][n].size();
if ((nPoints != 3) && (nPoints != 4)) if ((nPoints != 3) && (nPoints != 4))

View File

@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
if (which_type == Z_TRI03) if (which_type == Z_TRI03)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if (nPoints == 3) if (nPoints == 3)
@ -52,7 +52,7 @@ if (which_type == Z_TRI03)
if (which_type == Z_QUA04) if (which_type == Z_QUA04)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if (nPoints == 4) if (nPoints == 4)
@ -65,7 +65,7 @@ if (which_type == Z_QUA04)
if (which_type == Z_NSIDED) if (which_type == Z_NSIDED)
{ {
label counter = 1; label counter = 1;
for (label facei=0; facei<sfb.size(); facei++) forAll(sfb, facei)
{ {
label nPoints = bMesh[patchi][facei].size(); label nPoints = bMesh[patchi][facei].size();
if ((nPoints != 3) && (nPoints != 4)) if ((nPoints != 3) && (nPoints != 4))

View File

@ -57,7 +57,7 @@ void Foam::tabulatedWallFunctions::SpaldingsLaw::invertFunction()
scalar uPlus = 1; scalar uPlus = 1;
// Populate the table // Populate the table
for (label i=0; i<invertedTable_.size(); i++) forAll(invertedTable_, i)
{ {
if (invertedTable_.log10()) if (invertedTable_.log10())
{ {

View File

@ -213,7 +213,7 @@ void Foam::primitiveEntry::write(Ostream& os) const
{ {
os.writeKeyword(keyword()); os.writeKeyword(keyword());
for (label i=0; i<size(); i++) for (label i=0; i<size(); ++i)
{ {
os << operator[](i); os << operator[](i);

View File

@ -125,7 +125,7 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const
faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges()); faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges());
scalarList& weights = *faceToEdgeWeightsPtr_; scalarList& weights = *faceToEdgeWeightsPtr_;
for (label edgei = 0; edgei < weights.size(); edgei++) forAll(weights, edgei)
{ {
vector P = faces[edgeFaces[edgei][0]].centre(points); vector P = faces[edgeFaces[edgei][0]].centre(points);
vector N = faces[edgeFaces[edgei][1]].centre(points); vector N = faces[edgeFaces[edgei][1]].centre(points);

View File

@ -363,7 +363,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
// zero singular values that are less than minCondition*maxS // zero singular values that are less than minCondition*maxS
const scalar minS = minCondition*S_[findMax(S_)]; const scalar minS = minCondition*S_[findMax(S_)];
for (label i = 0; i < S_.size(); i++) forAll(S_, i)
{ {
if (S_[i] <= minS) if (S_[i] <= minS)
{ {

View File

@ -153,7 +153,7 @@ void Foam::walkPatch::faceToFace
indexInFace_.append(fp); indexInFace_.append(fp);
// Visit neighbouring faces in order, starting at fp. // Visit neighbouring faces in order, starting at fp.
for (label i = 0; i < f.size(); i++) forAll(f, i)
{ {
label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp); label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp);
label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]); label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]);

View File

@ -88,7 +88,7 @@ void Foam::attachDetach::attachInterface
// Pout << "Points to be mapped: " << removedPoints << endl; // Pout << "Points to be mapped: " << removedPoints << endl;
// Remove all faces from the slave patch // Remove all faces from the slave patch
for (label i = 0; i < slavePatch.size(); i++) forAll(slavePatch, i)
{ {
ref.setAction(polyRemoveFace(i + slavePatchStart)); ref.setAction(polyRemoveFace(i + slavePatchStart));
// Pout << "Removing face " << i + slavePatchStart << endl; // Pout << "Removing face " << i + slavePatchStart << endl;

View File

@ -265,7 +265,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches
// Copy patches0 with new sizes. First patches always come from // Copy patches0 with new sizes. First patches always come from
// mesh0 and will always be present. // mesh0 and will always be present.
for (label patchI = 0; patchI < patches0.size(); patchI++) forAll(patches0, patchI)
{ {
// Originates from mesh0. Clone with new size & filter out empty // Originates from mesh0. Clone with new size & filter out empty
// patch. // patch.
@ -363,7 +363,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder
labelList oldToNew(owner.size(), -1); labelList oldToNew(owner.size(), -1);
// Leave boundary faces in order // Leave boundary faces in order
for (label faceI = nInternalFaces; faceI < owner.size(); faceI++) for (label faceI = nInternalFaces; faceI < owner.size(); ++faceI)
{ {
oldToNew[faceI] = faceI; oldToNew[faceI] = faceI;
} }

View File

@ -915,7 +915,7 @@ void Foam::addPatchCellLayer::setRefinement
vector disp = firstLayerDisp[patchPointI]; vector disp = firstLayerDisp[patchPointI];
for (label i = 0; i < addedPoints_[patchPointI].size(); i++) forAll(addedPoints_[patchPointI], i)
{ {
pt += disp; pt += disp;
@ -1000,7 +1000,7 @@ void Foam::addPatchCellLayer::setRefinement
face newFace(f.size()); face newFace(f.size());
for (label i = 0; i < addedCells[patchFaceI].size(); i++) forAll(addedCells[patchFaceI], i)
{ {
forAll(f, fp) forAll(f, fp)
{ {

View File

@ -262,7 +262,7 @@ void Foam::repatchPolyTopoChanger::changeAnchorPoint
label fVert = fp; label fVert = fp;
for (label i = 0; i < f.size(); i++) forAll(f, i)
{ {
newFace[i] = f[fVert++]; newFace[i] = f[fVert++];

View File

@ -200,7 +200,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
// Go through the points and collect them based on // Go through the points and collect them based on
// weights from lower to higher. This gives the // weights from lower to higher. This gives the
// correct order of points along the edge. // correct order of points along the edge.
for (label passI = 0; passI < edgePointWeights.size(); passI++) forAll(edgePointWeights, passI)
{ {
// Max weight can only be one, so the sorting is // Max weight can only be one, so the sorting is
// done by elimination. // done by elimination.
@ -351,7 +351,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
// Go through the points and collect them based on // Go through the points and collect them based on
// weights from lower to higher. This gives the // weights from lower to higher. This gives the
// correct order of points along the edge. // correct order of points along the edge.
for (label pass = 0; pass < edgePointWeights.size(); pass++) forAll(edgePointWeights, passI)
{ {
// Max weight can only be one, so the sorting is // Max weight can only be one, so the sorting is
// done by elimination. // done by elimination.

View File

@ -31,10 +31,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam defineTypeNameAndDebug(Foam::quadraticFitSnGradData, 0);
{
defineTypeNameAndDebug(quadraticFitSnGradData, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -205,7 +202,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
// calculate the matrix of the polynomial components // calculate the matrix of the polynomial components
scalarRectangularMatrix B(C.size(), minSize_, scalar(0)); scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
for (label ip = 0; ip < C.size(); ip++) forAll(C, ip)
{ {
const point& p = C[ip]; const point& p = C[ip];

View File

@ -164,7 +164,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
// Matrix of the polynomial components // Matrix of the polynomial components
scalarRectangularMatrix B(C.size(), minSize_, scalar(0)); scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
for (label ip = 0; ip < C.size(); ip++) forAll(C, ip)
{ {
const point& p = C[ip]; const point& p = C[ip];

View File

@ -258,7 +258,7 @@ void parcel::setRelaxationTimes
scalar vapourSurfaceEnthalpy = 0.0; scalar vapourSurfaceEnthalpy = 0.0;
scalar vapourFarEnthalpy = 0.0; scalar vapourFarEnthalpy = 0.0;
for (label k = 0; k < sDB.gasProperties().size(); k++) forAll(sDB.gasProperties(), k)
{ {
vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface); vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature); vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);

View File

@ -177,7 +177,7 @@ void Foam::shellSurfaces::orient()
boundBox shellBb(points[0], points[0]); boundBox shellBb(points[0], points[0]);
// Assume surface is compact! // Assume surface is compact!
for (label i = 0; i < points.size(); i++) forAll(points, i)
{ {
const point& pt = points[i]; const point& pt = points[i];
shellBb.min() = min(shellBb.min(), pt); shellBb.min() = min(shellBb.min(), pt);

View File

@ -453,7 +453,7 @@ Foam::Ostream& Foam::operator<< (Ostream& os, const treeLeaf<Type>& leaf)
{ {
// Storage not trimmed // Storage not trimmed
os << token::SPACE << leaf.size() << token::SPACE << token::BEGIN_LIST; os << token::SPACE << leaf.size() << token::SPACE << token::BEGIN_LIST;
for (label i = 0; i < leaf.size(); i++) forAll(leaf, i)
{ {
os << token::SPACE << leaf.indices()[i]; os << token::SPACE << leaf.indices()[i];
} }

View File

@ -115,7 +115,7 @@ void fftRenumber
List<complex> renumData(data); List<complex> renumData(data);
label nnprod(1); label nnprod(1);
for (label i=0; i<nn.size(); i++) forAll(nn, i)
{ {
nnprod *= nn[i]; nnprod *= nn[i];
} }

View File

@ -387,7 +387,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::tau
dimensionedVector("zero", dimVelocity, vector::zero) dimensionedVector("zero", dimVelocity, vector::zero)
); );
for (label i=0; i<filmBottomPatchIDs_.size(); i++) forAll(filmBottomPatchIDs_, i)
{ {
label patchI = filmBottomPatchIDs_[i]; label patchI = filmBottomPatchIDs_[i];
const polyPatch& pp = filmRegion_.boundaryMesh()[patchI]; const polyPatch& pp = filmRegion_.boundaryMesh()[patchI];

View File

@ -137,7 +137,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::surfaceFilmModels::thermoSingleLayer::q
dimensionedScalar("zero", dimTemperature, 0.0) dimensionedScalar("zero", dimTemperature, 0.0)
); );
for (label i=0; i<filmBottomPatchIDs_.size(); i++) forAll(filmBottomPatchIDs_, i)
{ {
label patchI = filmBottomPatchIDs_[i]; label patchI = filmBottomPatchIDs_[i];
const polyPatch& pp = filmRegion_.boundaryMesh()[patchI]; const polyPatch& pp = filmRegion_.boundaryMesh()[patchI];

View File

@ -160,8 +160,8 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
pf = 1.0; pf = 1.0;
pr = 1.0; pr = 1.0;
label Nl = R.lhs().size(); const label Nl = R.lhs().size();
label Nr = R.rhs().size(); const label Nr = R.rhs().size();
label slRef = 0; label slRef = 0;
lRef = R.lhs()[slRef].index; lRef = R.lhs()[slRef].index;
@ -331,7 +331,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
// length of the first argument must be nSpecie() // length of the first argument must be nSpecie()
dcdt = omega(c2, T, p); dcdt = omega(c2, T, p);
for (label ri=0; ri<reactions_.size(); ri++) forAll(reactions_, ri)
{ {
const Reaction<ThermoType>& R = reactions_[ri]; const Reaction<ThermoType>& R = reactions_[ri];

View File

@ -75,7 +75,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
RR.source()[i] = c[i]/dt; RR.source()[i] = c[i]/dt;
} }
for (label i=0; i<this->model_.reactions().size(); i++) forAll(this->model_.reactions(), i)
{ {
const Reaction<ThermoType>& R = this->model_.reactions()[i]; const Reaction<ThermoType>& R = this->model_.reactions()[i];
@ -100,7 +100,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
} }
} }
for (label s=0; s<R.lhs().size(); s++) forAll(R.lhs(), s)
{ {
label si = R.lhs()[s].index; label si = R.lhs()[s].index;
scalar sl = R.lhs()[s].stoichCoeff; scalar sl = R.lhs()[s].stoichCoeff;
@ -108,7 +108,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve
RR[si][lRef] += sl*pf*corr; RR[si][lRef] += sl*pf*corr;
} }
for (label s=0; s<R.rhs().size(); s++) forAll(R.rhs(), s)
{ {
label si = R.rhs()[s].index; label si = R.rhs()[s].index;
scalar sr = R.rhs()[s].stoichCoeff; scalar sr = R.rhs()[s].stoichCoeff;

View File

@ -86,7 +86,7 @@ Foam::scalar Foam::ode<CompType, ThermoType>::solve
dtEst dtEst
); );
for (label i=0; i<c.size(); i++) forAll(c, i)
{ {
c[i] = max(0.0, c1[i]); c[i] = max(0.0, c1[i]);
} }

View File

@ -66,7 +66,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
scalar pf, cf, pb, cb; scalar pf, cf, pb, cb;
label lRef, rRef; label lRef, rRef;
for (label i=0; i<this->model_.reactions().size(); i++) forAll(this->model_.reactions(), i)
{ {
const Reaction<ThermoType>& R = this->model_.reactions()[i]; const Reaction<ThermoType>& R = this->model_.reactions()[i];
@ -95,7 +95,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
// update species // update species
for (label s=0; s<R.lhs().size(); s++) forAll(R.lhs(), s)
{ {
label si = R.lhs()[s].index; label si = R.lhs()[s].index;
scalar sl = R.lhs()[s].stoichCoeff; scalar sl = R.lhs()[s].stoichCoeff;
@ -103,7 +103,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve
c[si] = max(0.0, c[si]); c[si] = max(0.0, c[si]);
} }
for (label s=0; s<R.rhs().size(); s++) forAll(R.rhs(), s)
{ {
label si = R.rhs()[s].index; label si = R.rhs()[s].index;
scalar sr = R.rhs()[s].stoichCoeff; scalar sr = R.rhs()[s].stoichCoeff;

View File

@ -47,7 +47,7 @@ void Foam::Reaction<ReactionThermo>::setThermo
); );
} }
for (label i=0; i<lhs_.size(); i++) forAll(lhs_, i)
{ {
operator-= operator-=
( (

View File

@ -450,7 +450,7 @@ bool Foam::faceTriangulation::split
label index1 = -1; label index1 = -1;
label index2 = -1; label index2 = -1;
for (label iter = 0; iter < f.size(); iter++) forAll(f, iter)
{ {
findDiagonal findDiagonal
( (

View File

@ -33,10 +33,8 @@ License
#include "PackedBoolList.H" #include "PackedBoolList.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(Foam::triSurface, 0); defineTypeNameAndDebug(Foam::triSurface, 0);
}
Foam::fileName Foam::triSurface::triSurfInstance(const Time& d) Foam::fileName Foam::triSurface::triSurfInstance(const Time& d)