STYLE: consistency updates

This commit is contained in:
Andrew Heather 2016-09-27 15:17:55 +01:00
parent 89d9fd1550
commit 3dbd39146c
242 changed files with 1933 additions and 1933 deletions

View File

@ -3,7 +3,7 @@
#+TITLE: OpenFOAM C++ Style Guide
#+AUTHOR: OpenFOAM Foundation
#+DATE: 2011-2016
#+LINK: http://OpenFOAM.org
#+LINK: http://OpenFOAM.com
#+OPTIONS: author:nil ^:{}
#+STARTUP: hidestars
#+STARTUP: odd

View File

@ -43,8 +43,8 @@ heatTransfer
type compressible::turbulentTemperatureCoupledBaffleMixed;
value ${:VALUE.T};
Tnbr T;
kappa fluidThermo;
kappaName none;
kappaMethod fluidThermo;
kappa none;
}
}
}

View File

@ -60,8 +60,8 @@ heatTransfer
type compressible::turbulentTemperatureCoupledBaffleMixed;
value ${:VALUE.T};
Tnbr T;
kappa fluidThermo;
kappaName none;
kappaMethod fluidThermo;
kappa none;
}
}
}

View File

@ -39,8 +39,8 @@ heatTransfer
type compressible::turbulentTemperatureCoupledBaffleMixed;
value ${:VALUE.T};
Tnbr T;
kappa solidThermo;
kappaName none;
kappaMethod solidThermo;
kappa none;
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\ / A nd | Web: www.OpenFOAM.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Description

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -139,10 +139,10 @@ class functionObject
// Private Member Functions
//- Disallow default bitwise copy construct
functionObject(const functionObject&);
functionObject(const functionObject&) = delete;
//- Disallow default bitwise assignment
void operator=(const functionObject&);
void operator=(const functionObject&) = delete;
public:

View File

@ -80,10 +80,11 @@ protected:
const ObjectType& lookupObject(const word& fieldName) const;
//- Store the given field in the objectRegistry under the given name
// Note: sets the fieldName to tfield().name() if not already set
template<class ObjectType>
bool store
(
const word& fieldName,
word& fieldName,
const tmp<ObjectType>& tfield,
bool cacheable = false
);

View File

@ -51,7 +51,7 @@ const ObjectType& Foam::functionObjects::regionFunctionObject::lookupObject
template<class ObjectType>
bool Foam::functionObjects::regionFunctionObject::store
(
const word& fieldName,
word& fieldName,
const tmp<ObjectType>& tfield,
bool cacheable
)
@ -90,6 +90,10 @@ bool Foam::functionObjects::regionFunctionObject::store
{
tfield.ref().rename(fieldName);
}
else
{
fieldName = tfield().name();
}
obr_.objectRegistry::store(tfield.ptr());
}

View File

@ -54,7 +54,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class filteredLinear2Limiter Declaration
Class filteredLinear2Limiter Declaration
\*---------------------------------------------------------------------------*/
template<class LimiterFunc>
@ -64,7 +64,7 @@ class filteredLinear2Limiter
{
// Private data
// Scaling corefficient for the gradient ratio,
// Scaling coefficient for the gradient ratio,
// 0 = linear
// 1 = fully limited
scalar k_;

View File

@ -46,7 +46,7 @@ Usage
Q1
{
type Q;
functionObjectLibs ("libutilityFunctionObjects.so");
libs ("libutilityFunctionObjects.so");
...
}
\endverbatim

View File

@ -135,19 +135,19 @@ void Foam::functionObjects::externalCoupled::removeReadFiles() const
Log << type() << ": removing all read files" << endl;
forAll(regionGroupNames_, regionI)
forAll(regionGroupNames_, regioni)
{
const word& compName = regionGroupNames_[regionI];
const word& compName = regionGroupNames_[regioni];
const labelList& groups = regionToGroups_[compName];
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
forAll(groupReadFields_[groupI], fieldI)
forAll(groupReadFields_[groupi], fieldi)
{
const word& fieldName = groupReadFields_[groupI][fieldI];
const word& fieldName = groupReadFields_[groupi][fieldi];
rm
(
groupDir(commsDir_, compName, groupName)
@ -168,19 +168,19 @@ void Foam::functionObjects::externalCoupled::removeWriteFiles() const
Log << type() << ": removing all write files" << endl;
forAll(regionGroupNames_, regionI)
forAll(regionGroupNames_, regioni)
{
const word& compName = regionGroupNames_[regionI];
const word& compName = regionGroupNames_[regioni];
const labelList& groups = regionToGroups_[compName];
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
forAll(groupReadFields_[groupI], fieldI)
forAll(groupReadFields_[groupi], fieldi)
{
const word& fieldName = groupReadFields_[groupI][fieldI];
const word& fieldName = groupReadFields_[groupi][fieldi];
rm
(
groupDir(commsDir_, compName, groupName)
@ -252,20 +252,20 @@ void Foam::functionObjects::externalCoupled::readColumns
// Read data from file and send to destination processor
for (label procI = 0; procI < Pstream::nProcs(); procI++)
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{
// Temporary storage
List<scalarField> values(nColumns);
// Number of rows to read for processor procI
label procNRows = globalFaces.localSize(procI);
// Number of rows to read for processor proci
label procNRows = globalFaces.localSize(proci);
forAll(values, columnI)
forAll(values, columni)
{
values[columnI].setSize(procNRows);
values[columni].setSize(procNRows);
}
for (label rowI = 0; rowI < procNRows; rowI++)
for (label rowi = 0; rowi < procNRows; rowi++)
{
// Get a line
do
@ -273,8 +273,8 @@ void Foam::functionObjects::externalCoupled::readColumns
if (!masterFilePtr().good())
{
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< "Trying to read data for processor " << proci
<< " row " << rowi
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
<< ") ?" << exit(FatalIOError);
@ -285,14 +285,14 @@ void Foam::functionObjects::externalCoupled::readColumns
IStringStream lineStr(line);
for (label columnI = 0; columnI < nColumns; columnI++)
for (label columni = 0; columni < nColumns; columni++)
{
lineStr >> values[columnI][rowI];
lineStr >> values[columni][rowi];
}
}
// Send to procI
UOPstream str(procI, pBufs);
// Send to proci
UOPstream str(proci, pBufs);
str << values;
}
}
@ -322,14 +322,14 @@ void Foam::functionObjects::externalCoupled::readLines
// Read line from file and send to destination processor
for (label procI = 0; procI < Pstream::nProcs(); procI++)
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{
// Number of rows to read for processor procI
label procNRows = globalFaces.localSize(procI);
// Number of rows to read for processor proci
label procNRows = globalFaces.localSize(proci);
UOPstream toProc(procI, pBufs);
UOPstream toProc(proci, pBufs);
for (label rowI = 0; rowI < procNRows; rowI++)
for (label rowi = 0; rowi < procNRows; rowi++)
{
// Get a line
do
@ -337,8 +337,8 @@ void Foam::functionObjects::externalCoupled::readLines
if (!masterFilePtr().good())
{
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< "Trying to read data for processor " << proci
<< " row " << rowi
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
<< ") ?" << exit(FatalIOError);
@ -358,7 +358,7 @@ void Foam::functionObjects::externalCoupled::readLines
// Read lines from PstreamBuffers
UIPstream str(Pstream::masterNo(), pBufs);
for (label rowI = 0; rowI < nRows; rowI++)
for (label rowi = 0; rowi < nRows; rowi++)
{
string line(str);
lines << line.c_str() << nl;
@ -399,9 +399,9 @@ void Foam::functionObjects::externalCoupled::writeGeometry
DynamicList<face> allMeshesFaces;
DynamicField<point> allMeshesPoints;
forAll(meshes, meshI)
forAll(meshes, meshi)
{
const fvMesh& mesh = meshes[meshI];
const fvMesh& mesh = meshes[meshi];
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
const labelList patchIDs
@ -422,9 +422,9 @@ void Foam::functionObjects::externalCoupled::writeGeometry
{
const polyPatch& p = pbm[patchIDs[i]];
forAll(p, pI)
forAll(p, pi)
{
allFaceIDs.append(p.start()+pI);
allFaceIDs.append(p.start()+pi);
}
}
@ -445,18 +445,18 @@ void Foam::functionObjects::externalCoupled::writeGeometry
uniquePointIDs
);
label procI = Pstream::myProcNo();
label proci = Pstream::myProcNo();
List<pointField> collectedPoints(Pstream::nProcs());
collectedPoints[procI] = pointField(mesh.points(), uniquePointIDs);
collectedPoints[proci] = pointField(mesh.points(), uniquePointIDs);
Pstream::gatherList(collectedPoints);
List<faceList> collectedFaces(Pstream::nProcs());
faceList& patchFaces = collectedFaces[procI];
faceList& patchFaces = collectedFaces[proci];
patchFaces = allPatch.localFaces();
forAll(patchFaces, faceI)
forAll(patchFaces, facei)
{
inplaceRenumber(pointToGlobal, patchFaces[faceI]);
inplaceRenumber(pointToGlobal, patchFaces[facei]);
}
Pstream::gatherList(collectedFaces);
@ -465,19 +465,19 @@ void Foam::functionObjects::externalCoupled::writeGeometry
// Append and renumber
label nPoints = allMeshesPoints.size();
forAll(collectedPoints, procI)
forAll(collectedPoints, proci)
{
allMeshesPoints.append(collectedPoints[procI]);
allMeshesPoints.append(collectedPoints[proci]);
}
face newFace;
forAll(collectedFaces, procI)
forAll(collectedFaces, proci)
{
const faceList& procFaces = collectedFaces[procI];
const faceList& procFaces = collectedFaces[proci];
forAll(procFaces, faceI)
forAll(procFaces, facei)
{
const face& f = procFaces[faceI];
const face& f = procFaces[facei];
newFace.setSize(f.size());
forAll(f, fp)
@ -487,7 +487,7 @@ void Foam::functionObjects::externalCoupled::writeGeometry
allMeshesFaces.append(newFace);
}
nPoints += collectedPoints[procI].size();
nPoints += collectedPoints[proci].size();
}
}
@ -573,10 +573,10 @@ void Foam::functionObjects::externalCoupled::checkOrder
void Foam::functionObjects::externalCoupled::readData()
{
forAll(regionGroupNames_, regionI)
forAll(regionGroupNames_, regioni)
{
const word& compName = regionGroupNames_[regionI];
const wordList& regionNames = regionGroupRegions_[regionI];
const word& compName = regionGroupNames_[regioni];
const wordList& regionNames = regionGroupRegions_[regioni];
// Get the meshes for the region-group
UPtrList<const fvMesh> meshes(regionNames.size());
@ -590,13 +590,13 @@ void Foam::functionObjects::externalCoupled::readData()
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
const wordList& fieldNames = groupReadFields_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
const wordList& fieldNames = groupReadFields_[groupi];
forAll(fieldNames, fieldI)
forAll(fieldNames, fieldi)
{
const word& fieldName = fieldNames[fieldI];
const word& fieldName = fieldNames[fieldi];
bool ok = readData<scalar>
(
@ -643,10 +643,10 @@ void Foam::functionObjects::externalCoupled::readData()
void Foam::functionObjects::externalCoupled::writeData() const
{
forAll(regionGroupNames_, regionI)
forAll(regionGroupNames_, regioni)
{
const word& compName = regionGroupNames_[regionI];
const wordList& regionNames = regionGroupRegions_[regionI];
const word& compName = regionGroupNames_[regioni];
const wordList& regionNames = regionGroupRegions_[regioni];
// Get the meshes for the region-group
UPtrList<const fvMesh> meshes(regionNames.size());
@ -660,13 +660,13 @@ void Foam::functionObjects::externalCoupled::writeData() const
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
const wordList& fieldNames = groupWriteFields_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
const wordList& fieldNames = groupWriteFields_[groupi];
forAll(fieldNames, fieldI)
forAll(fieldNames, fieldi)
{
const word& fieldName = fieldNames[fieldI];
const word& fieldName = fieldNames[fieldi];
bool ok = writeData<scalar>
(
@ -736,8 +736,8 @@ void Foam::functionObjects::externalCoupled::initialise()
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
bool exists = false;
if (Pstream::master())
@ -938,26 +938,26 @@ bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
if (log)
{
Info<< type() << ": Communicating with regions:" << endl;
forAll(regionGroupNames_, rgI)
forAll(regionGroupNames_, rgi)
{
//const wordList& regionNames = regionGroupRegions_[rgI];
const word& compName = regionGroupNames_[rgI];
//const wordList& regionNames = regionGroupRegions_[rgi];
const word& compName = regionGroupNames_[rgi];
Info<< "Region: " << compName << endl << incrIndent;
const labelList& groups = regionToGroups_[compName];
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
Info<< indent << "patchGroup: " << groupName << "\t"
<< endl
<< incrIndent
<< indent << "Reading fields: "
<< groupReadFields_[groupI]
<< groupReadFields_[groupi]
<< endl
<< indent << "Writing fields: "
<< groupWriteFields_[groupI]
<< groupWriteFields_[groupi]
<< endl
<< decrIndent;
}
@ -971,15 +971,15 @@ bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
// should already be written - but just make sure
if (Pstream::master())
{
forAll(regionGroupNames_, rgI)
forAll(regionGroupNames_, rgi)
{
const word& compName = regionGroupNames_[rgI];
const word& compName = regionGroupNames_[rgi];
const labelList& groups = regionToGroups_[compName];
forAll(groups, i)
{
label groupI = groups[i];
const wordRe& groupName = groupNames_[groupI];
label groupi = groups[i];
const wordRe& groupName = groupNames_[groupi];
fileName dir(groupDir(commsDir_, compName, groupName));
if (!isDir(dir))

View File

@ -126,13 +126,13 @@ void Foam::externalCoupledMixedFvPatchField<Type>::writeData
const Field<Type>& refGrad(this->refGrad());
const scalarField& valueFraction(this->valueFraction());
forAll(refValue, faceI)
forAll(refValue, facei)
{
os << this->operator[](faceI) << token::SPACE
<< snGrad[faceI] << token::SPACE
<< refValue[faceI] << token::SPACE
<< refGrad[faceI] << token::SPACE
<< valueFraction[faceI] << nl;
os << this->operator[](facei) << token::SPACE
<< snGrad[facei] << token::SPACE
<< refValue[facei] << token::SPACE
<< refGrad[facei] << token::SPACE
<< valueFraction[facei] << nl;
}
}
@ -146,7 +146,7 @@ void Foam::externalCoupledMixedFvPatchField<Type>::readData(Istream& is)
string line;
forAll(*this, faceI)
forAll(*this, facei)
{
iss.getLine(line);
IStringStream lineStr(line);
@ -158,9 +158,9 @@ void Foam::externalCoupledMixedFvPatchField<Type>::readData(Istream& is)
lineStr
>> value
>> snGrad
>> this->refValue()[faceI]
>> this->refGrad()[faceI]
>> this->valueFraction()[faceI];
>> this->refValue()[facei]
>> this->refGrad()[facei]
>> this->valueFraction()[facei];
}
}

View File

@ -145,7 +145,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
Ostream& os
) const
{
const label patchI = patch().index();
const label patchi = patch().index();
// Heat flux [W/m2]
scalarField qDot(this->patch().size(), 0.0);
@ -170,17 +170,17 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const basicThermo& thermo = turbModel.transport();
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchI];
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
qDot = turbModel.alphaEff(patchI)*hep.snGrad();
qDot = turbModel.alphaEff(patchi)*hep.snGrad();
}
else if (db().foundObject<basicThermo>(thermoName))
{
const basicThermo& thermo = db().lookupObject<basicThermo>(thermoName);
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchI];
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
qDot = thermo.alpha().boundaryField()[patchI]*hep.snGrad();
qDot = thermo.alpha().boundaryField()[patchi]*hep.snGrad();
}
else
{
@ -200,12 +200,12 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
const Field<scalar>& magSf(this->patch().magSf());
forAll(patch(), faceI)
forAll(patch(), facei)
{
os << magSf[faceI] << token::SPACE
<< Tp[faceI] << token::SPACE
<< qDot[faceI] << token::SPACE
<< htc[faceI] << token::SPACE
os << magSf[facei] << token::SPACE
<< Tp[facei] << token::SPACE
<< qDot[facei] << token::SPACE
<< htc[facei] << token::SPACE
<< nl;
}
}
@ -222,15 +222,15 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::readData
string line;
forAll(*this, faceI)
forAll(*this, facei)
{
iss.getLine(line);
IStringStream lineStr(line);
lineStr
>> this->refValue()[faceI]
>> this->refGrad()[faceI]
>> this->valueFraction()[faceI];
>> this->refValue()[facei]
>> this->refGrad()[facei]
>> this->valueFraction()[facei];
}
}

View File

@ -110,9 +110,9 @@ bool Foam::functionObjects::externalCoupled::readData
// Handle column-wise reading of patch data. Supports most easy types
forAll(patchIDs, i)
{
label patchI = patchIDs[i];
label patchi = patchIDs[i];
if (isA<patchFieldType>(bf[patchI]))
if (isA<patchFieldType>(bf[patchi]))
{
// Explicit handling of externalCoupledMixed bcs - they
// have specialised reading routines.
@ -121,7 +121,7 @@ bool Foam::functionObjects::externalCoupled::readData
(
refCast<const patchFieldType>
(
bf[patchI]
bf[patchi]
)
);
@ -129,7 +129,7 @@ bool Foam::functionObjects::externalCoupled::readData
OStringStream os;
readLines
(
bf[patchI].size(), // number of lines to read
bf[patchi].size(), // number of lines to read
masterFilePtr,
os
);
@ -141,14 +141,14 @@ bool Foam::functionObjects::externalCoupled::readData
// additional processing by derived type.
pf.patchFieldType::evaluate();
}
else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
else if (isA<mixedFvPatchField<Type>>(bf[patchi]))
{
// Read columns from file for
// value, snGrad, refValue, refGrad, valueFraction
List<scalarField> data;
readColumns
(
bf[patchI].size(), // number of lines to read
bf[patchi].size(), // number of lines to read
4*pTraits<Type>::nComponents+1, // nColumns: 4*Type+1*scalar
masterFilePtr,
data
@ -159,13 +159,13 @@ bool Foam::functionObjects::externalCoupled::readData
(
refCast<const mixedFvPatchField<Type>>
(
bf[patchI]
bf[patchi]
)
);
// Transfer read data to bc.
// Skip value, snGrad
direction columnI = 2*pTraits<Type>::nComponents;
direction columni = 2*pTraits<Type>::nComponents;
Field<Type>& refValue = pf.refValue();
for
@ -175,7 +175,7 @@ bool Foam::functionObjects::externalCoupled::readData
cmpt++
)
{
refValue.replace(cmpt, data[columnI++]);
refValue.replace(cmpt, data[columni++]);
}
Field<Type>& refGrad = pf.refGrad();
for
@ -185,21 +185,21 @@ bool Foam::functionObjects::externalCoupled::readData
cmpt++
)
{
refGrad.replace(cmpt, data[columnI++]);
refGrad.replace(cmpt, data[columni++]);
}
pf.valueFraction() = data[columnI];
pf.valueFraction() = data[columni];
// Update the value from the read coefficicient. Bypass any
// additional processing by derived type.
pf.mixedFvPatchField<Type>::evaluate();
}
else if (isA<fixedGradientFvPatchField<Type>>(bf[patchI]))
else if (isA<fixedGradientFvPatchField<Type>>(bf[patchi]))
{
// Read columns for value and gradient
List<scalarField> data;
readColumns
(
bf[patchI].size(), // number of lines to read
bf[patchi].size(), // number of lines to read
2*pTraits<Type>::nComponents, // nColumns: Type
masterFilePtr,
data
@ -210,7 +210,7 @@ bool Foam::functionObjects::externalCoupled::readData
(
refCast<const fixedGradientFvPatchField<Type>>
(
bf[patchI]
bf[patchi]
)
);
@ -234,20 +234,20 @@ bool Foam::functionObjects::externalCoupled::readData
// additional processing by derived type.
pf.fixedGradientFvPatchField<Type>::evaluate();
}
else if (isA<fixedValueFvPatchField<Type>>(bf[patchI]))
else if (isA<fixedValueFvPatchField<Type>>(bf[patchi]))
{
// Read columns for value only
List<scalarField> data;
readColumns
(
bf[patchI].size(), // number of lines to read
bf[patchi].size(), // number of lines to read
pTraits<Type>::nComponents, // number of columns to read
masterFilePtr,
data
);
// Transfer read value to bc
Field<Type> value(bf[patchI].size());
Field<Type> value(bf[patchi].size());
for
(
direction cmpt = 0;
@ -263,7 +263,7 @@ bool Foam::functionObjects::externalCoupled::readData
(
refCast<const fixedValueFvPatchField<Type>>
(
bf[patchI]
bf[patchi]
)
);
@ -276,8 +276,8 @@ bool Foam::functionObjects::externalCoupled::readData
else
{
FatalErrorInFunction
<< "Unsupported boundary condition " << bf[patchI].type()
<< " for patch " << bf[patchI].patch().name()
<< "Unsupported boundary condition " << bf[patchi].type()
<< " for patch " << bf[patchi].patch().name()
<< " in region " << mesh.name()
<< exit(FatalError);
}
@ -309,24 +309,24 @@ Foam::functionObjects::externalCoupled::gatherAndCombine
if (Pstream::master())
{
// Combine values into single field
label globalElemI = 0;
label globalElemi = 0;
forAll(gatheredValues, lstI)
forAll(gatheredValues, lsti)
{
globalElemI += gatheredValues[lstI].size();
globalElemi += gatheredValues[lsti].size();
}
result.setSize(globalElemI);
result.setSize(globalElemi);
globalElemI = 0;
globalElemi = 0;
forAll(gatheredValues, lstI)
forAll(gatheredValues, lsti)
{
const Field<Type>& sub = gatheredValues[lstI];
const Field<Type>& sub = gatheredValues[lsti];
forAll(sub, elemI)
forAll(sub, elemi)
{
result[globalElemI++] = sub[elemI];
result[globalElemi++] = sub[elemi];
}
}
}
@ -408,18 +408,18 @@ bool Foam::functionObjects::externalCoupled::writeData
// Handle column-wise writing of patch data. Supports most easy types
forAll(patchIDs, i)
{
label patchI = patchIDs[i];
label patchi = patchIDs[i];
const globalIndex globalFaces(bf[patchI].size());
const globalIndex globalFaces(bf[patchi].size());
if (isA<patchFieldType>(bf[patchI]))
if (isA<patchFieldType>(bf[patchi]))
{
// Explicit handling of externalCoupledMixed bcs - they
// have specialised writing routines
const patchFieldType& pf = refCast<const patchFieldType>
(
bf[patchI]
bf[patchi]
);
OStringStream os;
@ -438,9 +438,9 @@ bool Foam::functionObjects::externalCoupled::writeData
}
masterFilePtr() << os.str().c_str();
for (label procI = 1; procI < Pstream::nProcs(); procI++)
for (label proci = 1; proci < Pstream::nProcs(); proci++)
{
IPstream fromSlave(Pstream::scheduled, procI);
IPstream fromSlave(Pstream::scheduled, proci);
string str(fromSlave);
masterFilePtr() << str.c_str();
}
@ -451,10 +451,10 @@ bool Foam::functionObjects::externalCoupled::writeData
toMaster << os.str();
}
}
else if (isA<mixedFvPatchField<Type>>(bf[patchI]))
else if (isA<mixedFvPatchField<Type>>(bf[patchi]))
{
const mixedFvPatchField<Type>& pf =
refCast<const mixedFvPatchField<Type>>(bf[patchI]);
refCast<const mixedFvPatchField<Type>>(bf[patchi]);
Field<Type> value(gatherAndCombine(pf));
Field<Type> snGrad(gatherAndCombine(pf.snGrad()()));
@ -464,29 +464,29 @@ bool Foam::functionObjects::externalCoupled::writeData
if (Pstream::master())
{
forAll(refValue, faceI)
forAll(refValue, facei)
{
masterFilePtr()
<< value[faceI] << token::SPACE
<< snGrad[faceI] << token::SPACE
<< refValue[faceI] << token::SPACE
<< refGrad[faceI] << token::SPACE
<< valueFraction[faceI] << nl;
<< value[facei] << token::SPACE
<< snGrad[facei] << token::SPACE
<< refValue[facei] << token::SPACE
<< refGrad[facei] << token::SPACE
<< valueFraction[facei] << nl;
}
}
}
else
{
// Output the value and snGrad
Field<Type> value(gatherAndCombine(bf[patchI]));
Field<Type> snGrad(gatherAndCombine(bf[patchI].snGrad()()));
Field<Type> value(gatherAndCombine(bf[patchi]));
Field<Type> snGrad(gatherAndCombine(bf[patchi].snGrad()()));
if (Pstream::master())
{
forAll(value, faceI)
forAll(value, facei)
{
masterFilePtr()
<< value[faceI] << token::SPACE
<< snGrad[faceI] << nl;
<< value[facei] << token::SPACE
<< snGrad[facei] << nl;
}
}
}

View File

@ -151,18 +151,18 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
{
const vectorField& Cfp = CfBoundary[patchi];
label minPI = findMin(mfp);
if (mfp[minPI] < minVs[proci])
label minPi = findMin(mfp);
if (mfp[minPi] < minVs[proci])
{
minVs[proci] = mfp[minPI];
minCs[proci] = Cfp[minPI];
minVs[proci] = mfp[minPi];
minCs[proci] = Cfp[minPi];
}
label maxPI = findMax(mfp);
if (mfp[maxPI] > maxVs[proci])
label maxPi = findMax(mfp);
if (mfp[maxPi] > maxVs[proci])
{
maxVs[proci] = mfp[maxPI];
maxCs[proci] = Cfp[maxPI];
maxVs[proci] = mfp[maxPi];
maxCs[proci] = Cfp[maxPi];
}
}
}

View File

@ -89,21 +89,20 @@ void Foam::functionObjects::fieldValues::volFieldValue::initialise
void Foam::functionObjects::fieldValues::volFieldValue::writeFileHeader
(
const label i
)
Ostream& os
) const
{
volRegion::writeFileHeader(*this, file());
volRegion::writeFileHeader(*this, os);
writeCommented(file(), "Time");
writeCommented(os, "Time");
forAll(fields_, fieldi)
{
file()
<< tab << operationTypeNames_[operation_]
os << tab << operationTypeNames_[operation_]
<< "(" << fields_[fieldi] << ")";
}
file() << endl;
os << endl;
}
@ -122,6 +121,7 @@ Foam::functionObjects::fieldValues::volFieldValue::volFieldValue
weightFieldName_("none")
{
read(dict);
writeFileHeader(file());
}

View File

@ -189,7 +189,7 @@ protected:
) const;
//- Output file header information
virtual void writeFileHeader(const label i);
virtual void writeFileHeader(Ostream& os) const;
public:

View File

@ -81,9 +81,9 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZone
{
const fvMesh& mesh = refCast<const fvMesh>(obr_);
label zoneI = mesh.faceZones().findZoneID(faceZoneName);
label zonei = mesh.faceZones().findZoneID(faceZoneName);
if (zoneI == -1)
if (zonei == -1)
{
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
@ -93,7 +93,7 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZone
faceZoneNames.append(faceZoneName);
const faceZone& fZone = mesh.faceZones()[zoneI];
const faceZone& fZone = mesh.faceZones()[zonei];
DynamicList<label> faceIDs(fZone.size());
DynamicList<label> facePatchIDs(fZone.size());
@ -101,24 +101,24 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZone
forAll(fZone, i)
{
label faceI = fZone[i];
label facei = fZone[i];
label faceID = -1;
label facePatchID = -1;
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
faceID = faceI;
faceID = facei;
facePatchID = -1;
}
else
{
facePatchID = mesh.boundaryMesh().whichPatch(faceI);
facePatchID = mesh.boundaryMesh().whichPatch(facei);
const polyPatch& pp = mesh.boundaryMesh()[facePatchID];
if (isA<coupledPolyPatch>(pp))
{
if (refCast<const coupledPolyPatch>(pp).owner())
{
faceID = pp.whichFace(faceI);
faceID = pp.whichFace(facei);
}
else
{
@ -127,7 +127,7 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZone
}
else if (!isA<emptyPolyPatch>(pp))
{
faceID = faceI - pp.start();
faceID = facei - pp.start();
}
else
{
@ -139,7 +139,7 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZone
if (faceID >= 0)
{
// Orientation set by faceZone flip map
if (fZone.flipMap()[faceI])
if (fZone.flipMap()[facei])
{
faceSigns.append(-1);
}
@ -174,9 +174,9 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZoneAndDirection
vector refDir = dir/(mag(dir) + ROOTVSMALL);
label zoneI = mesh.faceZones().findZoneID(faceZoneName);
label zonei = mesh.faceZones().findZoneID(faceZoneName);
if (zoneI == -1)
if (zonei == -1)
{
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
@ -187,7 +187,7 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZoneAndDirection
faceZoneNames.append(faceZoneName);
zoneRefDir.append(refDir);
const faceZone& fZone = mesh.faceZones()[zoneI];
const faceZone& fZone = mesh.faceZones()[zonei];
DynamicList<label> faceIDs(fZone.size());
DynamicList<label> facePatchIDs(fZone.size());
@ -200,24 +200,24 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZoneAndDirection
forAll(fZone, i)
{
label faceI = fZone[i];
label facei = fZone[i];
label faceID = -1;
label facePatchID = -1;
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
faceID = faceI;
faceID = facei;
facePatchID = -1;
}
else
{
facePatchID = mesh.boundaryMesh().whichPatch(faceI);
facePatchID = mesh.boundaryMesh().whichPatch(facei);
const polyPatch& pp = mesh.boundaryMesh()[facePatchID];
if (isA<coupledPolyPatch>(pp))
{
if (refCast<const coupledPolyPatch>(pp).owner())
{
faceID = pp.whichFace(faceI);
faceID = pp.whichFace(facei);
}
else
{
@ -226,7 +226,7 @@ void Foam::functionObjects::fluxSummary::initialiseFaceZoneAndDirection
}
else if (!isA<emptyPolyPatch>(pp))
{
faceID = faceI - pp.start();
faceID = facei - pp.start();
}
else
{
@ -283,9 +283,9 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
vector refDir = dir/(mag(dir) + ROOTVSMALL);
const label cellZoneI = mesh.cellZones().findZoneID(cellZoneName);
const label cellZonei = mesh.cellZones().findZoneID(cellZoneName);
if (cellZoneI == -1)
if (cellZonei == -1)
{
FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName
@ -297,22 +297,22 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
labelList cellAddr(mesh.nCells(), -1);
const labelList& cellIDs = mesh.cellZones()[cellZoneI];
const labelList& cellIDs = mesh.cellZones()[cellZonei];
UIndirectList<label>(cellAddr, cellIDs) = identity(cellIDs.size());
labelList nbrFaceCellAddr(mesh.nFaces() - nInternalFaces, -1);
forAll(pbm, patchI)
forAll(pbm, patchi)
{
const polyPatch& pp = pbm[patchI];
const polyPatch& pp = pbm[patchi];
if (pp.coupled())
{
forAll(pp, i)
{
label faceI = pp.start() + i;
label nbrFaceI = faceI - nInternalFaces;
label own = mesh.faceOwner()[faceI];
nbrFaceCellAddr[nbrFaceI] = cellAddr[own];
label facei = pp.start() + i;
label nbrFacei = facei - nInternalFaces;
label own = mesh.faceOwner()[facei];
nbrFaceCellAddr[nbrFacei] = cellAddr[own];
}
}
}
@ -327,27 +327,27 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
DynamicList<scalar> faceSigns(faceIDs.size());
// Internal faces
for (label faceI = 0; faceI < nInternalFaces; faceI++)
for (label facei = 0; facei < nInternalFaces; facei++)
{
const label own = cellAddr[mesh.faceOwner()[faceI]];
const label nbr = cellAddr[mesh.faceNeighbour()[faceI]];
const label own = cellAddr[mesh.faceOwner()[facei]];
const label nbr = cellAddr[mesh.faceNeighbour()[facei]];
if (((own != -1) && (nbr == -1)) || ((own == -1) && (nbr != -1)))
{
vector n = mesh.faces()[faceI].normal(mesh.points());
vector n = mesh.faces()[facei].normal(mesh.points());
n /= mag(n) + ROOTVSMALL;
if ((n & refDir) > tolerance_)
{
faceIDs.append(faceI);
faceLocalPatchIDs.append(faceI);
faceIDs.append(facei);
faceLocalPatchIDs.append(facei);
facePatchIDs.append(-1);
faceSigns.append(1);
}
else if ((n & -refDir) > tolerance_)
{
faceIDs.append(faceI);
faceLocalPatchIDs.append(faceI);
faceIDs.append(facei);
faceLocalPatchIDs.append(facei);
facePatchIDs.append(-1);
faceSigns.append(-1);
}
@ -355,33 +355,33 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
}
// Loop over boundary faces
forAll(pbm, patchI)
forAll(pbm, patchi)
{
const polyPatch& pp = pbm[patchI];
const polyPatch& pp = pbm[patchi];
forAll(pp, localFaceI)
forAll(pp, localFacei)
{
const label faceI = pp.start() + localFaceI;
const label own = cellAddr[mesh.faceOwner()[faceI]];
const label nbr = nbrFaceCellAddr[faceI - nInternalFaces];
const label facei = pp.start() + localFacei;
const label own = cellAddr[mesh.faceOwner()[facei]];
const label nbr = nbrFaceCellAddr[facei - nInternalFaces];
if ((own != -1) && (nbr == -1))
{
vector n = mesh.faces()[faceI].normal(mesh.points());
vector n = mesh.faces()[facei].normal(mesh.points());
n /= mag(n) + ROOTVSMALL;
if ((n & refDir) > tolerance_)
{
faceIDs.append(faceI);
faceLocalPatchIDs.append(localFaceI);
facePatchIDs.append(patchI);
faceIDs.append(facei);
faceLocalPatchIDs.append(localFacei);
facePatchIDs.append(patchi);
faceSigns.append(1);
}
else if ((n & -refDir) > tolerance_)
{
faceIDs.append(faceI);
faceLocalPatchIDs.append(localFaceI);
facePatchIDs.append(patchI);
faceIDs.append(facei);
faceLocalPatchIDs.append(localFacei);
facePatchIDs.append(patchi);
faceSigns.append(-1);
}
}
@ -423,26 +423,26 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
DynamicList<label> changedEdges;
DynamicList<patchEdgeFaceRegion> changedInfo;
label seedFaceI = labelMax;
label seedFacei = labelMax;
for (; oldFaceID < patch.size(); oldFaceID++)
{
if (allFaceInfo[oldFaceID].region() == -1)
{
seedFaceI = globalFaces.toGlobal(oldFaceID);
seedFacei = globalFaces.toGlobal(oldFaceID);
break;
}
}
reduce(seedFaceI, minOp<label>());
reduce(seedFacei, minOp<label>());
if (seedFaceI == labelMax)
if (seedFacei == labelMax)
{
break;
}
if (globalFaces.isLocal(seedFaceI))
if (globalFaces.isLocal(seedFacei))
{
label localFaceI = globalFaces.toLocal(seedFaceI);
const labelList& fEdges = patch.faceEdges()[localFaceI];
label localFacei = globalFaces.toLocal(seedFacei);
const labelList& fEdges = patch.faceEdges()[localFacei];
forAll(fEdges, i)
{
@ -479,9 +479,9 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
if (debug)
{
label nCells = 0;
forAll(allFaceInfo, faceI)
forAll(allFaceInfo, facei)
{
if (allFaceInfo[faceI].region() == regioni)
if (allFaceInfo[facei].region() == regioni)
{
nCells++;
}
@ -521,7 +521,7 @@ void Foam::functionObjects::fluxSummary::initialiseCellZoneAndDirection
facePatchID.append(regionFacePatchIDs[regioni]);
faceSign.append(regionFaceSigns[regioni]);
// Write OBJ of faces to file
// Write OBj of faces to file
if (debug)
{
OBJstream os(mesh.time().path()/zoneName + ".obj");
@ -712,16 +712,16 @@ bool Foam::functionObjects::fluxSummary::read(const dictionary& dict)
{
filePtrs_.setSize(faceZoneName_.size());
forAll(filePtrs_, fileI)
forAll(filePtrs_, filei)
{
const word& fzName = faceZoneName_[fileI];
filePtrs_.set(fileI, createFile(fzName));
const word& fzName = faceZoneName_[filei];
filePtrs_.set(filei, createFile(fzName));
writeFileHeader
(
fzName,
faceArea_[fileI],
refDir_[fileI],
filePtrs_[fileI]
faceArea_[filei],
refDir_[filei],
filePtrs_[filei]
);
}
}

View File

@ -41,7 +41,7 @@ Usage
fluxSummary1
{
type fluxSummary;
functionObjectLibs ("libutilityFunctionObjects.so");
libs ("libutilityFunctionObjects.so");
...
write yes;
log yes;

View File

@ -87,7 +87,7 @@ void Foam::functionObjects::mapFields::createInterpolation
meshToMesh::interpolationMethodNames_[mapMethodName]
);
// Lookup corresponding AMI method
// Lookup corresponding AMi method
word patchMapMethodName =
AMIPatchToPatchInterpolation::interpolationMethodToWord
(

View File

@ -33,12 +33,12 @@ Foam::findCellParticle::findCellParticle
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const point& end,
const label data
)
:
particle(mesh, position, celli, tetFacei, tetPtI),
particle(mesh, position, celli, tetFacei, tetPti),
end_(end),
data_(data)
{}

View File

@ -122,7 +122,7 @@ public:
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const point& end,
const label data
);

View File

@ -267,10 +267,10 @@ bool Foam::functionObjects::nearWallFields::read(const dictionary& dict)
// Convert field to map
fieldMap_.resize(2*fieldSet_.size());
reverseFieldMap_.resize(2*fieldSet_.size());
forAll(fieldSet_, setI)
forAll(fieldSet_, seti)
{
const word& fldName = fieldSet_[setI].first();
const word& sampleFldName = fieldSet_[setI].second();
const word& fldName = fieldSet_[seti].first();
const word& sampleFldName = fieldSet_[seti].second();
fieldMap_.insert(fldName, sampleFldName);
reverseFieldMap_.insert(sampleFldName, fldName);

View File

@ -101,26 +101,26 @@ calculateSpeciesRR
endTime_ += dt;
forAll(production_, specieI)
forAll(production_, speciei)
{
forAll(production_[specieI], reactionI)
forAll(production_[speciei], reactioni)
{
RR = basicChemistry.calculateRR(reactionI, specieI);
RR = basicChemistry.calculateRR(reactioni, speciei);
if (RR[0] > 0.0)
{
production_[specieI][reactionI] = RR[0];
productionInt_[specieI][reactionI] =+ dt*RR[0];
production_[speciei][reactioni] = RR[0];
productionInt_[speciei][reactioni] =+ dt*RR[0];
}
else if (RR[0] < 0.0)
{
consumption_[specieI][reactionI] = RR[0];
consumptionInt_[specieI][reactionI] =+ dt*RR[0];
consumption_[speciei][reactioni] = RR[0];
consumptionInt_[speciei][reactioni] =+ dt*RR[0];
}
else
{
production_[specieI][reactionI] = 0.0;
consumption_[specieI][reactionI] = 0.0;
production_[speciei][reactioni] = 0.0;
consumption_[speciei][reactioni] = 0.0;
}
}
}
@ -143,21 +143,21 @@ writeSpeciesRR()
prodIntFilePtr_() << "start time : " << startTime_ << tab
<< "end time :" << endTime_ << nl;
for (label reactionI = 0; reactionI < nReactions_; ++reactionI)
for (label reactioni = 0; reactioni < nReactions_; ++reactioni)
{
consFilePtr_() << reactionI << tab;
consIntFilePtr_() << reactionI << tab;
prodFilePtr_() << reactionI << tab;
prodIntFilePtr_() << reactionI << tab;
consFilePtr_() << reactioni << tab;
consIntFilePtr_() << reactioni << tab;
prodFilePtr_() << reactioni << tab;
prodIntFilePtr_() << reactioni << tab;
forAll(speciesNames_, i)
{
prodFilePtr_() << production_[i][reactionI] << tab;
consFilePtr_() << consumption_[i][reactionI] << tab;
prodIntFilePtr_() << productionInt_[i][reactionI] << tab;
consIntFilePtr_() << consumptionInt_[i][reactionI] << tab;
consumptionInt_[i][reactionI] = 0.0;
productionInt_[i][reactionI] = 0.0;
prodFilePtr_() << production_[i][reactioni] << tab;
consFilePtr_() << consumption_[i][reactioni] << tab;
prodIntFilePtr_() << productionInt_[i][reactioni] << tab;
consIntFilePtr_() << consumptionInt_[i][reactioni] << tab;
consumptionInt_[i][reactioni] = 0.0;
productionInt_[i][reactioni] = 0.0;
}
consFilePtr_() << nl;
consIntFilePtr_() << nl;

View File

@ -64,16 +64,16 @@ bool Foam::functionObjects::readFields::loadField(const word& fieldName)
{
// Store field on mesh database
Log << " Reading " << fieldName << endl;
tmp<VolFieldType> tvf(new VolFieldType(fieldHeader, mesh_));
regionFunctionObject::store(fieldName, tvf);
VolFieldType* vfPtr(new VolFieldType(fieldHeader, mesh_));
mesh_.objectRegistry::store(vfPtr);
return true;
}
else if (fieldHeader.typeHeaderOk<SurfaceFieldType>(false))
{
// Store field on mesh database
Log << " Reading " << fieldName << endl;
tmp<SurfaceFieldType> tsf(new SurfaceFieldType(fieldHeader, mesh_));
regionFunctionObject::store(fieldName, tsf);
SurfaceFieldType* sfPtr(new SurfaceFieldType(fieldHeader, mesh_));
mesh_.objectRegistry::store(sfPtr);
return true;
}
}

View File

@ -137,8 +137,8 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
// Knock out any cell not in patchRegions
forAll(liquidCore, celli)
{
label regionI = regions[celli];
if (patchRegions.found(regionI))
label regioni = regions[celli];
if (patchRegions.found(regioni))
{
backgroundAlpha[celli] = 0;
}
@ -146,7 +146,7 @@ void Foam::functionObjects::regionSizeDistribution::writeAlphaFields
{
liquidCore[celli] = 0;
scalar regionVol = regionVolume[regionI];
scalar regionVol = regionVolume[regioni];
if (regionVol < maxDropletVol)
{
backgroundAlpha[celli] = 0;
@ -598,10 +598,10 @@ bool Foam::functionObjects::regionSizeDistribution::write()
<< endl;
forAllConstIter(Map<label>, patchRegions, iter)
{
label regionI = iter.key();
label regioni = iter.key();
Info<< " " << token::TAB << iter.key()
<< token::TAB << allRegionVolume[regionI]
<< token::TAB << allRegionAlphaVolume[regionI] << endl;
<< token::TAB << allRegionVolume[regioni]
<< token::TAB << allRegionAlphaVolume[regioni] << endl;
}
Info<< endl;
@ -658,17 +658,17 @@ bool Foam::functionObjects::regionSizeDistribution::write()
// threshold
forAllIter(Map<scalar>, allRegionVolume, vIter)
{
label regionI = vIter.key();
label regioni = vIter.key();
if
(
patchRegions.found(regionI)
patchRegions.found(regioni)
|| vIter() >= maxDropletVol
|| (allRegionAlphaVolume[regionI]/vIter() < threshold_)
|| (allRegionAlphaVolume[regioni]/vIter() < threshold_)
)
{
allRegionVolume.erase(vIter);
allRegionAlphaVolume.erase(regionI);
allRegionNumCells.erase(regionI);
allRegionAlphaVolume.erase(regioni);
allRegionNumCells.erase(regioni);
}
}
@ -791,11 +791,11 @@ bool Foam::functionObjects::regionSizeDistribution::write()
<< endl;
scalar delta = 0.0;
forAll(binDownCount, binI)
forAll(binDownCount, bini)
{
Info<< " " << token::TAB << binI
Info<< " " << token::TAB << bini
<< token::TAB << delta
<< token::TAB << binDownCount[binI] << endl;
<< token::TAB << binDownCount[bini] << endl;
delta += deltaX;
}
Info<< endl;
@ -844,11 +844,11 @@ bool Foam::functionObjects::regionSizeDistribution::write()
<< endl;
scalar diam = 0.0;
forAll(binCount, binI)
forAll(binCount, bini)
{
Info<< " " << token::TAB << binI
Info<< " " << token::TAB << bini
<< token::TAB << diam
<< token::TAB << binCount[binI] << endl;
<< token::TAB << binCount[bini] << endl;
diam += delta;
}

View File

@ -41,12 +41,12 @@ Foam::Map<Type> Foam::functionObjects::regionSizeDistribution::regionSum
forAll(fld, celli)
{
label regionI = regions[celli];
label regioni = regions[celli];
typename Map<Type>::iterator fnd = regionToSum.find(regionI);
typename Map<Type>::iterator fnd = regionToSum.find(regioni);
if (fnd == regionToSum.end())
{
regionToSum.insert(regionI, fld[celli]);
regionToSum.insert(regioni, fld[celli]);
}
else
{

View File

@ -168,9 +168,9 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc
const cellList& c = mesh_.cells();
forAll(c, cI)
forAll(c, ci)
{
labelList zeroPoints = c[cI].labels(mesh_.faces());
labelList zeroPoints = c[ci].labels(mesh_.faces());
bool found = true;

View File

@ -54,12 +54,12 @@ Foam::functionObjects::streamLineBase::wallPatch() const
label nFaces = 0;
forAll(patches, patchI)
forAll(patches, patchi)
{
//if (!polyPatch::constraintType(patches[patchI].type()))
if (isA<wallPolyPatch>(patches[patchI]))
//if (!polyPatch::constraintType(patches[patchi].type()))
if (isA<wallPolyPatch>(patches[patchi]))
{
nFaces += patches[patchI].size();
nFaces += patches[patchi].size();
}
}
@ -67,12 +67,12 @@ Foam::functionObjects::streamLineBase::wallPatch() const
nFaces = 0;
forAll(patches, patchI)
forAll(patches, patchi)
{
//if (!polyPatch::constraintType(patches[patchI].type()))
if (isA<wallPolyPatch>(patches[patchI]))
//if (!polyPatch::constraintType(patches[patchi].type()))
if (isA<wallPolyPatch>(patches[patchi]))
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
forAll(pp, i)
{
@ -220,11 +220,11 @@ void Foam::functionObjects::streamLineBase::initInterpolations
void Foam::functionObjects::streamLineBase::storePoint
(
const label trackI,
const label tracki,
const scalar w,
const label leftI,
const label rightI,
const label lefti,
const label righti,
DynamicList<point>& newTrack,
DynamicList<scalarList>& newScalars,
@ -233,19 +233,19 @@ void Foam::functionObjects::streamLineBase::storePoint
{
label sz = newTrack.size();
const List<point>& track = allTracks_[trackI];
const List<point>& track = allTracks_[tracki];
newTrack.append((1.0-w)*track[leftI] + w*track[rightI]);
newTrack.append((1.0-w)*track[lefti] + w*track[righti]);
// Scalars
{
newScalars.append(scalarList(allScalars_.size()));
scalarList& newVals = newScalars[sz];
forAll(allScalars_, scalarI)
forAll(allScalars_, scalari)
{
const scalarList& trackVals = allScalars_[scalarI][trackI];
newVals[scalarI] = (1.0-w)*trackVals[leftI] + w*trackVals[rightI];
const scalarList& trackVals = allScalars_[scalari][tracki];
newVals[scalari] = (1.0-w)*trackVals[lefti] + w*trackVals[righti];
}
}
@ -254,10 +254,10 @@ void Foam::functionObjects::streamLineBase::storePoint
newVectors.append(vectorList(allVectors_.size()));
vectorList& newVals = newVectors[sz];
forAll(allVectors_, vectorI)
forAll(allVectors_, vectori)
{
const vectorList& trackVals = allVectors_[vectorI][trackI];
newVals[vectorI] = (1.0-w)*trackVals[leftI] + w*trackVals[rightI];
const vectorList& trackVals = allVectors_[vectori][tracki];
newVals[vectori] = (1.0-w)*trackVals[lefti] + w*trackVals[righti];
}
}
}
@ -267,24 +267,24 @@ void Foam::functionObjects::streamLineBase::storePoint
void Foam::functionObjects::streamLineBase::trimToBox
(
const treeBoundBox& bb,
const label trackI,
const label tracki,
PtrList<DynamicList<point>>& newTracks,
PtrList<DynamicList<scalarList>>& newScalars,
PtrList<DynamicList<vectorList>>& newVectors
) const
{
const List<point>& track = allTracks_[trackI];
const List<point>& track = allTracks_[tracki];
if (track.size())
{
for
(
label segmentI = 1;
segmentI < track.size();
segmentI++
label segmenti = 1;
segmenti < track.size();
segmenti++
)
{
const point& startPt = track[segmentI-1];
const point& endPt = track[segmentI];
const point& startPt = track[segmenti-1];
const point& endPt = track[segmenti];
const vector d(endPt-startPt);
scalar magD = mag(d);
@ -292,14 +292,14 @@ void Foam::functionObjects::streamLineBase::trimToBox
{
if (bb.contains(startPt))
{
// Store 1.0*track[segmentI-1]+0*track[segmentI]
// Store 1.0*track[segmenti-1]+0*track[segmenti]
storePoint
(
trackI,
tracki,
0.0,
segmentI-1,
segmentI,
segmenti-1,
segmenti,
newTracks.last(),
newScalars.last(),
@ -315,11 +315,11 @@ void Foam::functionObjects::streamLineBase::trimToBox
// values
storePoint
(
trackI,
tracki,
mag(clipPt-startPt)/magD,
segmentI-1,
segmentI,
segmenti-1,
segmenti,
newTracks.last(),
newScalars.last(),
@ -356,11 +356,11 @@ void Foam::functionObjects::streamLineBase::trimToBox
// Store point and interpolated values
storePoint
(
trackI,
tracki,
mag(clipPt-startPt)/magD,
segmentI-1,
segmentI,
segmenti-1,
segmenti,
newTracks.last(),
newScalars.last(),
@ -379,11 +379,11 @@ void Foam::functionObjects::streamLineBase::trimToBox
// Store point and interpolated values
storePoint
(
trackI,
tracki,
mag(clipPt-startPt)/magD,
segmentI-1,
segmentI,
segmenti-1,
segmenti,
newTracks.last(),
newScalars.last(),
@ -404,7 +404,7 @@ void Foam::functionObjects::streamLineBase::trimToBox
{
storePoint
(
trackI,
tracki,
1.0,
track.size()-2,
@ -427,9 +427,9 @@ void Foam::functionObjects::streamLineBase::trimToBox(const treeBoundBox& bb)
PtrList<DynamicList<scalarList>> newScalars;
PtrList<DynamicList<vectorList>> newVectors;
forAll(allTracks_, trackI)
forAll(allTracks_, tracki)
{
const List<point>& track = allTracks_[trackI];
const List<point>& track = allTracks_[tracki];
if (track.size())
{
@ -439,44 +439,44 @@ void Foam::functionObjects::streamLineBase::trimToBox(const treeBoundBox& bb)
newVectors.append(new DynamicList<vectorList>(track.size()));
// Trim, split and append to newTracks
trimToBox(bb, trackI, newTracks, newScalars, newVectors);
trimToBox(bb, tracki, newTracks, newScalars, newVectors);
}
}
// Transfer newTracks to allTracks_
allTracks_.setSize(newTracks.size());
forAll(allTracks_, trackI)
forAll(allTracks_, tracki)
{
allTracks_[trackI].transfer(newTracks[trackI]);
allTracks_[tracki].transfer(newTracks[tracki]);
}
// Replace track scalars
forAll(allScalars_, scalarI)
forAll(allScalars_, scalari)
{
DynamicList<scalarList>& fieldVals = allScalars_[scalarI];
DynamicList<scalarList>& fieldVals = allScalars_[scalari];
fieldVals.setSize(newTracks.size());
forAll(fieldVals, trackI)
forAll(fieldVals, tracki)
{
scalarList& trackVals = allScalars_[scalarI][trackI];
trackVals.setSize(newScalars[trackI].size());
forAll(trackVals, sampleI)
scalarList& trackVals = allScalars_[scalari][tracki];
trackVals.setSize(newScalars[tracki].size());
forAll(trackVals, samplei)
{
trackVals[sampleI] = newScalars[trackI][sampleI][scalarI];
trackVals[samplei] = newScalars[tracki][samplei][scalari];
}
}
}
// Replace track vectors
forAll(allVectors_, vectorI)
forAll(allVectors_, vectori)
{
DynamicList<vectorList>& fieldVals = allVectors_[vectorI];
DynamicList<vectorList>& fieldVals = allVectors_[vectori];
fieldVals.setSize(newTracks.size());
forAll(fieldVals, trackI)
forAll(fieldVals, tracki)
{
vectorList& trackVals = allVectors_[vectorI][trackI];
trackVals.setSize(newVectors[trackI].size());
forAll(trackVals, sampleI)
vectorList& trackVals = allVectors_[vectori][tracki];
trackVals.setSize(newVectors[tracki].size());
forAll(trackVals, samplei)
{
trackVals[sampleI] = newVectors[trackI][sampleI][vectorI];
trackVals[samplei] = newVectors[tracki][samplei][vectori];
}
}
}

View File

@ -149,11 +149,11 @@ protected:
//- Generate point and values by interpolating from existing values
void storePoint
(
const label trackI,
const label tracki,
const scalar w,
const label leftI,
const label rightI,
const label lefti,
const label righti,
DynamicList<point>& newTrack,
DynamicList<List<scalar>>& newScalars,
@ -164,7 +164,7 @@ protected:
void trimToBox
(
const treeBoundBox& bb,
const label trackI,
const label tracki,
PtrList<DynamicList<point>>& newTracks,
PtrList<DynamicList<scalarList>>& newScalars,
PtrList<DynamicList<vectorList>>& newVectors

View File

@ -70,11 +70,11 @@ Foam::vector Foam::streamLineParticle::interpolateFields
}
sampledScalars_.setSize(td.vsInterp_.size());
forAll(td.vsInterp_, scalarI)
forAll(td.vsInterp_, scalari)
{
sampledScalars_[scalarI].append
sampledScalars_[scalari].append
(
td.vsInterp_[scalarI].interpolate
td.vsInterp_[scalari].interpolate
(
position,
celli,
@ -84,11 +84,11 @@ Foam::vector Foam::streamLineParticle::interpolateFields
}
sampledVectors_.setSize(td.vvInterp_.size());
forAll(td.vvInterp_, vectorI)
forAll(td.vvInterp_, vectori)
{
sampledVectors_[vectorI].append
sampledVectors_[vectori].append
(
td.vvInterp_[vectorI].interpolate
td.vvInterp_[vectori].interpolate
(
position,
celli,

View File

@ -51,7 +51,7 @@ void Foam::functionObjects::surfaceInterpolate::interpolateFields()
if (fieldMap.found(fld.name()))
{
//const word sName = "interpolate(" + fld.name() + ')';
const word& sName = fieldMap[fld.name()];
word& sName = fieldMap[fld.name()];
if (obr_.found(sName))
{

View File

@ -38,7 +38,7 @@ Usage
vorticity1
{
type vorticity;
functionObjectLibs ("libutilityFunctionObjects.so");
libs ("libutilityFunctionObjects.so");
...
}
\endverbatim

View File

@ -56,10 +56,10 @@ Foam::edge Foam::wallBoundedParticle::currentEdge() const
}
else
{
label faceBasePtI = mesh_.tetBasePtIs()[tetFace()];
label diagPtI = (faceBasePtI+diagEdge_)%f.size();
label faceBasePti = mesh_.tetBasePtIs()[tetFace()];
label diagPti = (faceBasePti+diagEdge_)%f.size();
return edge(f[faceBasePtI], f[diagPtI]);
return edge(f[faceBasePti], f[diagPti]);
}
}
@ -135,7 +135,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
const Foam::face& f = mesh_.faces()[tetFace()];
// tetPtI starts from 1, goes up to f.size()-2
// tetPti starts from 1, goes up to f.size()-2
if (tetPt() == diagEdge_)
{
@ -165,7 +165,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
Foam::scalar Foam::wallBoundedParticle::trackFaceTri
(
const vector& endPosition,
label& minEdgeI
label& minEdgei
)
{
// Track p from position to endPosition
@ -175,7 +175,7 @@ Foam::scalar Foam::wallBoundedParticle::trackFaceTri
// Check which edge intersects the trajectory.
// Project trajectory onto triangle
minEdgeI = -1;
minEdgei = -1;
scalar minS = 1; // end position
edge currentE(-1, -1);
@ -217,13 +217,13 @@ Foam::scalar Foam::wallBoundedParticle::trackFaceTri
if (s >= 0 && s < minS)
{
minS = s;
minEdgeI = i;
minEdgei = i;
}
}
}
}
if (minEdgeI != -1)
if (minEdgei != -1)
{
position() += minS*(endPosition-position());
}
@ -299,12 +299,12 @@ Foam::wallBoundedParticle::wallBoundedParticle
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label meshEdgeStart,
const label diagEdge
)
:
particle(mesh, position, celli, tetFacei, tetPtI),
particle(mesh, position, celli, tetFacei, tetPti),
meshEdgeStart_(meshEdgeStart),
diagEdge_(diagEdge)
{}

View File

@ -112,9 +112,9 @@ protected:
//- Particle is on diagonal edge:
// const face& f = mesh.faces()[tetFace()]
// label faceBasePtI = mesh.tetBasePtIs()[facei];
// label diagPtI = (faceBasePtI+diagEdge_)%f.size();
// const edge e(f[faceBasePtI], f[diagPtI]);
// label faceBasePti = mesh.tetBasePtIs()[facei];
// label diagPti = (faceBasePti+diagEdge_)%f.size();
// const edge e(f[faceBasePti], f[diagPti]);
label diagEdge_;
@ -130,7 +130,7 @@ protected:
void crossDiagonalEdge();
//- Track through single triangle
scalar trackFaceTri(const vector& endPosition, label& minEdgeI);
scalar trackFaceTri(const vector& endPosition, label& minEdgei);
//- Is current triangle in the track direction
bool isTriAlongTrack(const point& endPosition) const;
@ -225,7 +225,7 @@ public:
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label meshEdgeStart,
const label diagEdge
);

View File

@ -172,7 +172,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
: mesh_.faceOwner()[facei_]
);
// Check angle to nbrCell tet. Is it in the direction of the
// endposition? I.e. since volume of nbr tet is positive the
// endposition? i.e. since volume of nbr tet is positive the
// tracking direction should be into the tet.
tetIndices nbrTi(nbrCelli, tetFacei_, tetPti_, mesh_);
if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0)
@ -241,10 +241,10 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
if (doTrack)
{
// Track across triangle. Return triangle edge crossed.
label triEdgeI = -1;
trackFraction = trackFaceTri(projectedEndPosition, triEdgeI);
label triEdgei = -1;
trackFraction = trackFaceTri(projectedEndPosition, triEdgei);
if (triEdgeI == -1)
if (triEdgei == -1)
{
// Reached endpoint
//checkInside();
@ -268,7 +268,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
const Foam::face& f = mesh_.faces()[ti.face()];
const label fp0 = ti.faceBasePt();
if (triEdgeI == 0)
if (triEdgei == 0)
{
if (ti.facePtA() == f.fcIndex(fp0))
{
@ -305,7 +305,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
crossDiagonalEdge();
}
}
else if (triEdgeI == 1)
else if (triEdgei == 1)
{
//Pout<< "Real edge." << endl;
diagEdge_ = -1;
@ -314,7 +314,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
crossEdgeConnectedFace(currentEdge());
patchInteraction(td, trackFraction);
}
else // if (triEdgeI == 2)
else // if (triEdgei == 2)
{
if (ti.facePtB() == f.rcIndex(fp0))
{

View File

@ -59,7 +59,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
const cell& cFaces = mesh_.cells()[celli];
label minFacei = -1;
label minTetPtI = -1;
label minTetPti = -1;
scalar minDistSqr = sqr(GREAT);
forAll(cFaces, cFacei)
@ -86,7 +86,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
{
minDistSqr = d2;
minFacei = facei;
minTetPtI = i-1;
minTetPti = i-1;
}
fp = nextFp;
}
@ -98,7 +98,7 @@ Foam::tetIndices Foam::functionObjects::wallBoundedStreamLine::findNearestTet
(
celli,
minFacei,
minTetPtI,
minTetPti,
mesh_
);
}

View File

@ -63,11 +63,11 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
// Store the scalar fields
sampledScalars_.setSize(td.vsInterp_.size());
forAll(td.vsInterp_, scalarI)
forAll(td.vsInterp_, scalari)
{
sampledScalars_[scalarI].append
sampledScalars_[scalari].append
(
td.vsInterp_[scalarI].interpolate
td.vsInterp_[scalari].interpolate
(
position,
ti, //celli,
@ -78,23 +78,23 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
// Store the vector fields
sampledVectors_.setSize(td.vvInterp_.size());
forAll(td.vvInterp_, vectorI)
forAll(td.vvInterp_, vectori)
{
vector positionU;
if (vectorI == td.UIndex_)
if (vectori == td.UIndex_)
{
positionU = U;
}
else
{
positionU = td.vvInterp_[vectorI].interpolate
positionU = td.vvInterp_[vectori].interpolate
(
position,
ti, //celli,
facei
);
}
sampledVectors_[vectorI].append(positionU);
sampledVectors_[vectori].append(positionU);
}
}
@ -136,7 +136,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label meshEdgeStart,
const label diagEdge,
const label lifeTime
@ -148,7 +148,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
position,
celli,
tetFacei,
tetPtI,
tetPti,
meshEdgeStart,
diagEdge
),

View File

@ -170,7 +170,7 @@ public:
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label meshEdgeStart,
const label diagEdge,
const label lifeTime

View File

@ -92,7 +92,11 @@ Foam::functionObjects::wallShearStress::wallShearStress
writeFile(mesh_, name, typeName, dict),
patchSet_()
{
tmp<volVectorField> wallShearStressPtr
read(dict);
writeFileHeader(file());
volVectorField* wallShearStressPtr
(
new volVectorField
(
@ -114,9 +118,7 @@ Foam::functionObjects::wallShearStress::wallShearStress
)
);
store(typeName, wallShearStressPtr);
read(dict);
mesh_.objectRegistry::store(wallShearStressPtr);
}

View File

@ -75,9 +75,11 @@ Foam::functionObjects::yPlus::yPlus
fvMeshFunctionObject(name, runTime, dict),
writeFile(obr_, name, typeName, dict)
{
read(dict);
writeFileHeader(file());
tmp<volScalarField> tyPlusPtr
volScalarField* yPlusPtr
(
new volScalarField
(
@ -94,7 +96,7 @@ Foam::functionObjects::yPlus::yPlus
)
);
store(typeName, tyPlusPtr);
mesh_.objectRegistry::store(yPlusPtr);
}

View File

@ -109,24 +109,24 @@ void Foam::functionObjects::forceCoeffs::writeBinHeader
vectorField binPoints(nBin_);
writeCommented(os, "x co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
os << tab << binPoints[pointI].x();
binPoints[pointi] = (binMin_ + (pointi + 1)*binDx_)*binDir_;
os << tab << binPoints[pointi].x();
}
os << nl;
writeCommented(os, "y co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
os << tab << binPoints[pointI].y();
os << tab << binPoints[pointi].y();
}
os << nl;
writeCommented(os, "z co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
os << tab << binPoints[pointI].z();
os << tab << binPoints[pointi].z();
}
os << nl;
@ -186,15 +186,15 @@ void Foam::functionObjects::forceCoeffs::writeBinData
{
os << obr_.time().value();
for (label binI = 0; binI < nBin_; binI++)
for (label bini = 0; bini < nBin_; bini++)
{
scalar total = coeffs[0][binI] + coeffs[1][binI] + coeffs[2][binI];
scalar total = coeffs[0][bini] + coeffs[1][bini] + coeffs[2][bini];
os << tab << total << tab << coeffs[0][binI] << tab << coeffs[1][binI];
os << tab << total << tab << coeffs[0][bini] << tab << coeffs[1][bini];
if (porosity_)
{
os << tab << coeffs[2][binI];
os << tab << coeffs[2][bini];
}
}
@ -256,7 +256,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
{
const fvMesh& mesh = refCast<const fvMesh>(obr_);
tmp<volVectorField> tforceCoeff
volVectorField* forceCoeffPtr
(
new volVectorField
(
@ -273,9 +273,9 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
)
);
store(tforceCoeff().name(), tforceCoeff);
mesh_.objectRegistry::store(forceCoeffPtr);
tmp<volVectorField> tmomentCoeff
volVectorField* momentCoeffPtr
(
new volVectorField
(
@ -292,7 +292,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
)
);
store(tmomentCoeff().name(), tmomentCoeff);
mesh_.objectRegistry::store(momentCoeffPtr);
}
return true;
@ -361,11 +361,11 @@ bool Foam::functionObjects::forceCoeffs::execute()
{
forAll(liftCoeffs, i)
{
for (label binI = 1; binI < nBin_; binI++)
for (label bini = 1; bini < nBin_; bini++)
{
liftCoeffs[i][binI] += liftCoeffs[i][binI-1];
dragCoeffs[i][binI] += dragCoeffs[i][binI-1];
momentCoeffs[i][binI] += momentCoeffs[i][binI-1];
liftCoeffs[i][bini] += liftCoeffs[i][bini-1];
dragCoeffs[i][bini] += dragCoeffs[i][bini-1];
momentCoeffs[i][bini] += momentCoeffs[i][bini-1];
}
}
}

View File

@ -126,24 +126,24 @@ void Foam::functionObjects::forces::writeBinHeader
vectorField binPoints(nBin_);
writeCommented(os, "x co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
os << tab << binPoints[pointI].x();
binPoints[pointi] = (binMin_ + (pointi + 1)*binDx_)*binDir_;
os << tab << binPoints[pointi].x();
}
os << nl;
writeCommented(os, "y co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
os << tab << binPoints[pointI].y();
os << tab << binPoints[pointi].y();
}
os << nl;
writeCommented(os, "z co-ords :");
forAll(binPoints, pointI)
forAll(binPoints, pointi)
{
os << tab << binPoints[pointI].z();
os << tab << binPoints[pointi].z();
}
os << nl;
@ -223,8 +223,8 @@ void Foam::functionObjects::forces::initialiseBins()
scalar binMax = -GREAT;
forAllConstIter(labelHashSet, patchSet_, iter)
{
label patchI = iter.key();
const polyPatch& pp = pbm[patchI];
label patchi = iter.key();
const polyPatch& pp = pbm[patchi];
scalarField d(pp.faceCentres() & binDir_);
binMin_ = min(min(d), binMin_);
binMax = max(max(d), binMax);
@ -245,8 +245,8 @@ void Foam::functionObjects::forces::initialiseBins()
forAll(cellZoneIDs, i)
{
label zoneI = cellZoneIDs[i];
const cellZone& cZone = mesh_.cellZones()[zoneI];
label zonei = cellZoneIDs[i];
const cellZone& cZone = mesh_.cellZones()[zonei];
const scalarField d(dd, cZone);
binMin_ = min(min(d), binMin_);
binMax = max(max(d), binMax);
@ -497,7 +497,7 @@ void Foam::functionObjects::forces::applyBins
void Foam::functionObjects::forces::addToFields
(
const label patchI,
const label patchi,
const vectorField& Md,
const vectorField& fN,
const vectorField& fT,
@ -515,7 +515,7 @@ void Foam::functionObjects::forces::addToFields
lookupObject<volVectorField>(fieldName("force"))
);
vectorField& pf = force.boundaryFieldRef()[patchI];
vectorField& pf = force.boundaryFieldRef()[patchi];
pf += fN + fT + fP;
volVectorField& moment =
@ -524,7 +524,7 @@ void Foam::functionObjects::forces::addToFields
lookupObject<volVectorField>(fieldName("moment"))
);
vectorField& pm = moment.boundaryFieldRef()[patchI];
vectorField& pm = moment.boundaryFieldRef()[patchi];
pm += Md;
}
@ -557,9 +557,9 @@ void Foam::functionObjects::forces::addToFields
forAll(cellIDs, i)
{
label cellI = cellIDs[i];
force[cellI] += fN[i] + fT[i] + fP[i];
moment[cellI] += Md[i];
label celli = cellIDs[i];
force[celli] += fN[i] + fT[i] + fP[i];
moment[celli] += Md[i];
}
}
@ -934,7 +934,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
{
Info << " Fields will be written" << endl;
tmp<volVectorField> tforce
volVectorField* forcePtr
(
new volVectorField
(
@ -951,9 +951,9 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
)
);
store(tforce().name(), tforce);
mesh_.objectRegistry::store(forcePtr);
tmp<volVectorField> tmoment
volVectorField* momentPtr
(
new volVectorField
(
@ -970,7 +970,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
)
);
store(tmoment().name(), tmoment);
mesh_.objectRegistry::store(momentPtr);
}
return true;
@ -991,33 +991,33 @@ void Foam::functionObjects::forces::calcForcesMoment()
forAllConstIter(labelHashSet, patchSet_, iter)
{
label patchI = iter.key();
label patchi = iter.key();
vectorField Md
(
mesh_.C().boundaryField()[patchI] - coordSys_.origin()
mesh_.C().boundaryField()[patchi] - coordSys_.origin()
);
scalarField sA(mag(Sfb[patchI]));
scalarField sA(mag(Sfb[patchi]));
// Normal force = surfaceUnitNormal*(surfaceNormal & forceDensity)
vectorField fN
(
Sfb[patchI]/sA
Sfb[patchi]/sA
*(
Sfb[patchI] & fD.boundaryField()[patchI]
Sfb[patchi] & fD.boundaryField()[patchi]
)
);
// Tangential force (total force minus normal fN)
vectorField fT(sA*fD.boundaryField()[patchI] - fN);
vectorField fT(sA*fD.boundaryField()[patchi] - fN);
// Porous force
vectorField fP(Md.size(), Zero);
addToFields(patchI, Md, fN, fT, fP);
addToFields(patchi, Md, fN, fT, fP);
applyBins(Md, fN, fT, fP, mesh_.C().boundaryField()[patchI]);
applyBins(Md, fN, fT, fP, mesh_.C().boundaryField()[patchi]);
}
}
else
@ -1035,25 +1035,25 @@ void Foam::functionObjects::forces::calcForcesMoment()
forAllConstIter(labelHashSet, patchSet_, iter)
{
label patchI = iter.key();
label patchi = iter.key();
vectorField Md
(
mesh_.C().boundaryField()[patchI] - coordSys_.origin()
mesh_.C().boundaryField()[patchi] - coordSys_.origin()
);
vectorField fN
(
rho(p)*Sfb[patchI]*(p.boundaryField()[patchI] - pRef)
rho(p)*Sfb[patchi]*(p.boundaryField()[patchi] - pRef)
);
vectorField fT(Sfb[patchI] & devRhoReffb[patchI]);
vectorField fT(Sfb[patchi] & devRhoReffb[patchi]);
vectorField fP(Md.size(), Zero);
addToFields(patchI, Md, fN, fT, fP);
addToFields(patchi, Md, fN, fT, fP);
applyBins(Md, fN, fT, fP, mesh_.C().boundaryField()[patchI]);
applyBins(Md, fN, fT, fP, mesh_.C().boundaryField()[patchi]);
}
}
@ -1085,8 +1085,8 @@ void Foam::functionObjects::forces::calcForcesMoment()
forAll(cellZoneIDs, i)
{
label zoneI = cellZoneIDs[i];
const cellZone& cZone = mesh_.cellZones()[zoneI];
label zonei = cellZoneIDs[i];
const cellZone& cZone = mesh_.cellZones()[zonei];
const vectorField d(mesh_.C(), cZone);
const vectorField fP(fPTot, cZone);

View File

@ -305,7 +305,7 @@ protected:
//- Add patch contributions to force and moment fields
void addToFields
(
const label patchI,
const label patchi,
const vectorField& Md,
const vectorField& fN,
const vectorField& fT,

View File

@ -75,14 +75,14 @@ const Foam::NamedEnum
void Foam::functionObjects::runTimePostPro::pathline::addLines
(
const label frameI,
const label framei,
vtkActor* actor,
vtkPolyData* data
) const
{
geometryBase::initialiseActor(actor);
vector colour = lineColour_->value(frameI);
vector colour = lineColour_->value(framei);
actor->GetProperty()->SetColor(colour[0], colour[1], colour[2]);
vtkPolyDataMapper* mapper =

View File

@ -104,7 +104,7 @@ protected:
//- Add the pathlines to the renderer
void addLines
(
const label frameI,
const label framei,
vtkActor* actor,
vtkPolyData* data
) const;

View File

@ -72,7 +72,7 @@ const Foam::NamedEnum
void Foam::functionObjects::runTimePostPro::pointData::addPoints
(
const label frameI,
const label framei,
vtkActor* actor,
vtkPolyDataMapper* mapper,
vtkPolyData* data
@ -80,7 +80,7 @@ void Foam::functionObjects::runTimePostPro::pointData::addPoints
{
geometryBase::initialiseActor(actor);
vector colour = pointColour_->value(frameI);
vector colour = pointColour_->value(framei);
actor->GetProperty()->SetColor(colour[0], colour[1], colour[2]);
switch (representation_)

View File

@ -102,7 +102,7 @@ protected:
//- Add the point data to the renderer
void addPoints
(
const label frameI,
const label framei,
vtkActor* actor,
vtkPolyDataMapper* mapper,
vtkPolyData* data

View File

@ -41,7 +41,7 @@ Description
dsmcFields1
{
type dsmcFields;
functionObjectLibs ("libutilityFunctionObjects.so");
libs ("libutilityFunctionObjects.so");
...
}
\endverbatim

View File

@ -64,14 +64,14 @@ Foam::functionObjects::runTimeControls::averageCondition::averageCondition
{
const dictionary& dict = conditionDict();
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName = fieldNames_[fieldI];
const word& fieldName = fieldNames_[fieldi];
if (dict.found(fieldName))
{
const dictionary& valueDict = dict.subDict(fieldName);
totalTime_[fieldI] = readScalar(valueDict.lookup("totalTime"));
totalTime_[fieldi] = readScalar(valueDict.lookup("totalTime"));
}
}
}
@ -101,11 +101,11 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
DynamicList<label> unprocessedFields(fieldNames_.size());
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName(fieldNames_[fieldI]);
const word& fieldName(fieldNames_[fieldi]);
scalar Dt = totalTime_[fieldI];
scalar Dt = totalTime_[fieldi];
scalar alpha = (Dt - dt)/Dt;
scalar beta = dt/Dt;
@ -133,10 +133,10 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
if (!processed)
{
unprocessedFields.append(fieldI);
unprocessedFields.append(fieldi);
}
totalTime_[fieldI] += dt;
totalTime_[fieldi] += dt;
}
if (unprocessedFields.size())
@ -147,8 +147,8 @@ bool Foam::functionObjects::runTimeControls::averageCondition::apply()
forAll(unprocessedFields, i)
{
label fieldI = unprocessedFields[i];
Info<< " " << fieldNames_[fieldI] << nl;
label fieldi = unprocessedFields[i];
Info<< " " << fieldNames_[fieldi] << nl;
}
}
@ -162,20 +162,20 @@ void Foam::functionObjects::runTimeControls::averageCondition::write()
{
dictionary& conditionDict = this->conditionDict();
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName = fieldNames_[fieldI];
const word& fieldName = fieldNames_[fieldi];
// value dictionary should be present - mean values are written there
if (conditionDict.found(fieldName))
{
dictionary& valueDict = conditionDict.subDict(fieldName);
valueDict.add("totalTime", totalTime_[fieldI], true);
valueDict.add("totalTime", totalTime_[fieldi], true);
}
else
{
dictionary valueDict;
valueDict.add("totalTime", totalTime_[fieldI], true);
valueDict.add("totalTime", totalTime_[fieldi], true);
conditionDict.add(fieldName, valueDict);
}
}

View File

@ -132,15 +132,15 @@ apply()
List<scalar> result(fieldNames_.size(), -VGREAT);
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName = fieldNames_[fieldI];
const word& fieldName = fieldNames_[fieldi];
if (solverDict.found(fieldName))
{
const List<solverPerformance> sp(solverDict.lookup(fieldName));
const scalar residual = sp.first().initialResidual();
result[fieldI] = residual;
result[fieldi] = residual;
switch (mode_)
{
@ -203,14 +203,14 @@ apply()
<< ": satisfied using threshold value: " << value_ << nl;
}
forAll(result, resultI)
forAll(result, resulti)
{
if (result[resultI] > 0)
if (result[resulti] > 0)
{
if (log_)
{
Info<< " field: " << fieldNames_[resultI]
<< ", residual: " << result[resultI] << nl;
Info<< " field: " << fieldNames_[resulti]
<< ", residual: " << result[resulti] << nl;
}
}
}

View File

@ -105,15 +105,15 @@ bool Foam::functionObjects::runTimeControls::equationMaxIterCondition::apply()
List<label> result(fieldNames_.size(), -1);
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName = fieldNames_[fieldI];
const word& fieldName = fieldNames_[fieldi];
if (solverDict.found(fieldName))
{
const List<solverPerformance> sp(solverDict.lookup(fieldName));
const label nIterations = sp.first().nIterations();
result[fieldI] = nIterations;
result[fieldi] = nIterations;
if (nIterations > threshold_)
{
@ -154,14 +154,14 @@ bool Foam::functionObjects::runTimeControls::equationMaxIterCondition::apply()
<< ": satisfied using threshold value: " << threshold_ << nl;
}
forAll(result, resultI)
forAll(result, resulti)
{
if (result[resultI] != -1)
if (result[resulti] != -1)
{
if (log_)
{
Info<< " field: " << fieldNames_[resultI]
<< ", iterations: " << result[resultI] << nl;
Info<< " field: " << fieldNames_[resulti]
<< ", iterations: " << result[resulti] << nl;
}
}
}

View File

@ -110,9 +110,9 @@ bool Foam::functionObjects::runTimeControls::minMaxCondition::apply()
return satisfied;
}
forAll(fieldNames_, fieldI)
forAll(fieldNames_, fieldi)
{
const word& fieldName = fieldNames_[fieldI];
const word& fieldName = fieldNames_[fieldi];
const word valueType =
state_.objectResultType(functionObjectName_, fieldName);

View File

@ -81,23 +81,23 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::read
const wordList conditionNames(conditionsDict.toc());
conditions_.setSize(conditionNames.size());
label uniqueGroupI = 0;
forAll(conditionNames, conditionI)
label uniqueGroupi = 0;
forAll(conditionNames, conditioni)
{
const word& conditionName = conditionNames[conditionI];
const word& conditionName = conditionNames[conditioni];
const dictionary& dict = conditionsDict.subDict(conditionName);
conditions_.set
(
conditionI,
conditioni,
runTimeCondition::New(conditionName, obr_, dict, *this)
);
label groupI = conditions_[conditionI].groupID();
label groupi = conditions_[conditioni].groupID();
if (groupMap_.insert(groupI, uniqueGroupI))
if (groupMap_.insert(groupi, uniqueGroupi))
{
uniqueGroupI++;
uniqueGroupi++;
}
}
@ -114,9 +114,9 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::read
{
// Check that at least one condition is active
bool active = false;
forAll(conditions_, conditionI)
forAll(conditions_, conditioni)
{
if (conditions_[conditionI].active())
if (conditions_[conditioni].active())
{
active = true;
break;
@ -146,32 +146,32 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
List<bool> groupSatisfied(groupMap_.size(), true);
List<bool> groupActive(groupMap_.size(), false);
forAll(conditions_, conditionI)
forAll(conditions_, conditioni)
{
runTimeCondition& condition = conditions_[conditionI];
runTimeCondition& condition = conditions_[conditioni];
if (condition.active())
{
bool conditionSatisfied = condition.apply();
label groupI = condition.groupID();
label groupi = condition.groupID();
Map<label>::const_iterator conditionIter = groupMap_.find(groupI);
Map<label>::const_iterator conditionIter = groupMap_.find(groupi);
if (conditionIter == groupMap_.end())
{
FatalErrorInFunction
<< "group " << groupI << " not found in map"
<< "group " << groupi << " not found in map"
<< abort(FatalError);
}
if (conditionSatisfied)
{
IDs.append(conditionI);
IDs.append(conditioni);
groupActive[conditionIter()] = true;
if (groupI == -1)
if (groupi == -1)
{
// Condition not part of a group - only requires this to be
// satisfied for completion flag to be set
@ -187,9 +187,9 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
}
bool done = false;
forAll(groupSatisfied, groupI)
forAll(groupSatisfied, groupi)
{
if (groupSatisfied[groupI] && groupActive[groupI])
if (groupSatisfied[groupi] && groupActive[groupi])
{
done = true;
break;
@ -198,10 +198,10 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
if (done)
{
forAll(IDs, conditionI)
forAll(IDs, conditioni)
{
Info<< " " << conditions_[conditionI].type() << ": "
<< conditions_[conditionI].name()
Info<< " " << conditions_[conditioni].type() << ": "
<< conditions_[conditioni].name()
<< " condition satisfied" << nl;
}
@ -235,9 +235,9 @@ bool Foam::functionObjects::runTimeControls::runTimeControl::execute()
bool Foam::functionObjects::runTimeControls::runTimeControl::write()
{
forAll(conditions_, conditionI)
forAll(conditions_, conditioni)
{
conditions_[conditionI].write();
conditions_[conditioni].write();
}
return true;

View File

@ -40,7 +40,7 @@ Description
setTimeStep1
{
type setTimeStep;
functionObjectLibs ("libutilityFunctionObjects.so");
libs ("libutilityFunctionObjects.so");
...
}
\endverbatim

View File

@ -107,9 +107,9 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict)
bool Foam::functionObjects::systemCall::execute()
{
forAll(executeCalls_, callI)
forAll(executeCalls_, calli)
{
Foam::system(executeCalls_[callI]);
Foam::system(executeCalls_[calli]);
}
return true;
@ -118,9 +118,9 @@ bool Foam::functionObjects::systemCall::execute()
bool Foam::functionObjects::systemCall::end()
{
forAll(endCalls_, callI)
forAll(endCalls_, calli)
{
Foam::system(endCalls_[callI]);
Foam::system(endCalls_[calli]);
}
return true;
@ -129,9 +129,9 @@ bool Foam::functionObjects::systemCall::end()
bool Foam::functionObjects::systemCall::write()
{
forAll(writeCalls_, callI)
forAll(writeCalls_, calli)
{
Foam::system(writeCalls_[callI]);
Foam::system(writeCalls_[calli]);
}
return true;

View File

@ -50,14 +50,14 @@ namespace functionObjects
bool Foam::functionObjects::writeDictionary::tryDirectory
(
const label dictI,
const label dicti,
const word& location,
bool& firstDict
)
{
IOobject dictIO
(
dictNames_[dictI],
dictNames_[dicti],
location,
obr_,
IOobject::MUST_READ,
@ -69,7 +69,7 @@ bool Foam::functionObjects::writeDictionary::tryDirectory
{
IOdictionary dict(dictIO);
if (dict.digest() != digests_[dictI])
if (dict.digest() != digests_[dicti])
{
if (firstDict)
{
@ -84,7 +84,7 @@ bool Foam::functionObjects::writeDictionary::tryDirectory
IOobject::writeDivider(Info);
digests_[dictI] = dict.digest();
digests_[dicti] = dict.digest();
}
return true;

View File

@ -75,7 +75,7 @@ class writeDictionary
//- Helper function to write the dictionary if found at location
bool tryDirectory
(
const label dictI,
const label dicti,
const word& location,
bool& firstDict
);

View File

@ -993,21 +993,21 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
cells.size()/100
);
forAll(cells, cellI)
forAll(cells, celli)
{
const cell& cFaces = cells[cellI];
label cLevel = cutter.cellLevel()[cellI];
const cell& cFaces = cells[celli];
label cLevel = cutter.cellLevel()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFacei];
if (surfaceIndex[faceI] != -1)
if (surfaceIndex[facei] != -1)
{
label fLevel = cutter.faceLevel(faceI);
label fLevel = cutter.faceLevel(facei);
if (fLevel != cLevel)
{
transitionCells.insert(cellI);
transitionCells.insert(celli);
}
}
}
@ -1025,24 +1025,24 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
//forAllConstIter(cellSet, transitionCells, iter)
//{
// label cellI = iter.key();
// const cell& cFaces = cells[cellI];
// const point& cc = cellCentres[cellI];
// const scalar rCVol = pow(cellVolumes[cellI], -5.0/3.0);
// label celli = iter.key();
// const cell& cFaces = cells[celli];
// const point& cc = cellCentres[celli];
// const scalar rCVol = pow(cellVolumes[celli], -5.0/3.0);
//
// // Determine principal axes of cell
// symmTensor R(Zero);
//
// forAll(cFaces, i)
// {
// label faceI = cFaces[i];
// label facei = cFaces[i];
//
// const point& fc = faceCentres[faceI];
// const point& fc = faceCentres[facei];
//
// // Calculate face-pyramid volume
// scalar pyrVol = 1.0/3.0 * fA[faceI] & (fc-cc);
// scalar pyrVol = 1.0/3.0 * fA[facei] & (fc-cc);
//
// if (faceOwner[faceI] != cellI)
// if (faceOwner[facei] != celli)
// {
// pyrVol = -pyrVol;
// }
@ -1066,17 +1066,17 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
// labelVector plusFaceLevel(labelVector(-1, -1, -1));
// labelVector minFaceLevel(labelVector(-1, -1, -1));
//
// forAll(cFaces, cFaceI)
// forAll(cFaces, cFacei)
// {
// label faceI = cFaces[cFaceI];
// label facei = cFaces[cFacei];
//
// if (surfaceIndex[faceI] != -1)
// if (surfaceIndex[facei] != -1)
// {
// label fLevel = cutter.faceLevel(faceI);
// label fLevel = cutter.faceLevel(facei);
//
// // Get outwards pointing normal
// vector n = fA[faceI]/mag(fA[faceI]);
// if (faceOwner[faceI] != cellI)
// vector n = fA[facei]/mag(fA[facei]);
// if (faceOwner[facei] != celli)
// {
// n = -n;
// }
@ -1129,7 +1129,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
// && plusFaceLevel[dir] != minFaceLevel[dir]
// )
// {
// candidateCellSet.insert(cellI);
// candidateCellSet.insert(celli);
// }
// }
//}
@ -1138,26 +1138,26 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
forAllConstIter(cellSet, transitionCells, iter)
{
label cellI = iter.key();
const cell& cFaces = cells[cellI];
label cLevel = cutter.cellLevel()[cellI];
label celli = iter.key();
const cell& cFaces = cells[celli];
label cLevel = cutter.cellLevel()[celli];
// Detect opposite intersection
bool foundOpposite = false;
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFacei];
if
(
surfaceIndex[faceI] != -1
&& cutter.faceLevel(faceI) > cLevel
surfaceIndex[facei] != -1
&& cutter.faceLevel(facei) > cLevel
)
{
// Get outwards pointing normal
vector n = fA[faceI]/mag(fA[faceI]);
if (faceOwner[faceI] != cellI)
vector n = fA[facei]/mag(fA[facei]);
if (faceOwner[facei] != celli)
{
n = -n;
}
@ -1165,17 +1165,17 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
// Check for any opposite intersection
forAll(cFaces, cFaceI2)
{
label face2I = cFaces[cFaceI2];
label face2i = cFaces[cFaceI2];
if
(
face2I != faceI
&& surfaceIndex[face2I] != -1
face2i != facei
&& surfaceIndex[face2i] != -1
)
{
// Get outwards pointing normal
vector n2 = fA[face2I]/mag(fA[face2I]);
if (faceOwner[face2I] != cellI)
vector n2 = fA[face2i]/mag(fA[face2i]);
if (faceOwner[face2i] != celli)
{
n2 = -n2;
}
@ -1199,7 +1199,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
if (foundOpposite)
{
candidateCellSet.insert(cellI);
candidateCellSet.insert(celli);
}
}
@ -1813,22 +1813,22 @@ void Foam::snappyRefineDriver::addFaceZones
//const word slaveName = czNames.second()+"_to_"+czNames.first();
const word& slaveName = patchNames.second();
label mpI = meshRefiner.addMeshedPatch(masterName, patchInfo);
label mpi = meshRefiner.addMeshedPatch(masterName, patchInfo);
Info<< setf(ios_base::left)
<< setw(6) << mpI
<< setw(20) << mesh.boundaryMesh()[mpI].type()
<< setw(6) << mpi
<< setw(20) << mesh.boundaryMesh()[mpi].type()
<< setw(30) << masterName
<< setw(30) << fzName
<< setw(10) << surfaceZonesInfo::faceZoneTypeNames[fzType]
<< nl;
label slI = meshRefiner.addMeshedPatch(slaveName, patchInfo);
label sli = meshRefiner.addMeshedPatch(slaveName, patchInfo);
Info<< setf(ios_base::left)
<< setw(6) << slI
<< setw(20) << mesh.boundaryMesh()[slI].type()
<< setw(6) << sli
<< setw(20) << mesh.boundaryMesh()[sli].type()
<< setw(30) << slaveName
<< setw(30) << fzName
<< setw(10) << surfaceZonesInfo::faceZoneTypeNames[fzType]

File diff suppressed because it is too large Load Diff

View File

@ -45,15 +45,15 @@ Foam::labelList Foam::snappySnapDriver::getFacePoints
forAll(f, fp)
{
label meshPointI = f[fp];
label meshPointi = f[fp];
Map<label>::const_iterator iter =
pp.meshPointMap().find(meshPointI);
pp.meshPointMap().find(meshPointi);
if (iter != pp.meshPointMap().end())
{
label pointI = iter();
pointOnZone[pointI] = true;
label pointi = iter();
pointOnZone[pointi] = true;
}
}
}

View File

@ -37,7 +37,7 @@ Description
patchProbes
{
type patchProbes;
functionObjectLibs ( "libsampling.so" );
libs ( "libsampling.so" );
// Name of the directory for probe data
name patchProbes;
@ -46,14 +46,11 @@ Description
patches (".*inl.*");
// Write at same frequency as fields
outputControl outputTime;
outputInterval 1;
writeControl writeTime;
writeInterval 1;
// Fields to be probed
fields
(
p U
);
fields (p U);
// Locations to probe. These get snapped onto the nearest point
// on the selected patches

View File

@ -37,20 +37,17 @@ Description
probes
{
type probes;
functionObjectLibs ( "libsampling.so" );
libs ("libsampling.so");
// Name of the directory for probe data
name probes;
// Write at same frequency as fields
outputControl outputTime;
outputInterval 1;
writeControl outputTime;
writeInterval 1;
// Fields to be probed
fields
(
p U
);
fields (p U);
// Optional: do not recalculate cells if mesh moves
fixedLocations false;

View File

@ -56,7 +56,7 @@ functions
{
sensitivityAnalysis
{
functionObjectLibs ("libfieldFunctionObjects.so");
libs ("libfieldFunctionObjects.so");
type psiReactionsSensitivityAnalysis;
writeControl writeTime;
}

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

Some files were not shown because too many files have changed in this diff Show More