boundaryField() -> boundaryFieldRef()
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,9 +80,9 @@ int main(int argc, char *argv[])
|
||||
// Writing number of faces
|
||||
label nFaces = mesh.nFaces();
|
||||
|
||||
forAll(mesh.boundary(), patchI)
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
nFaces += mesh.boundary()[patchI].size();
|
||||
nFaces += mesh.boundary()[patchi].size();
|
||||
}
|
||||
|
||||
fluentDataFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,7 +52,7 @@ void writeFluentField
|
||||
<< "(300 ("
|
||||
<< fluentFieldIdentifier << " " // Field identifier
|
||||
<< "1 " // Zone ID: (cells=1, internal faces=2,
|
||||
// patch faces=patchI+10)
|
||||
// patch faces=patchi+10)
|
||||
<< "1 " // Number of components (scalar=1, vector=3)
|
||||
<< "0 0 " // Unused
|
||||
<< "1 " << phiInternal.size() // Start and end of list
|
||||
@ -69,9 +69,9 @@ void writeFluentField
|
||||
label nWrittenFaces = phiInternal.size();
|
||||
|
||||
// Writing boundary faces
|
||||
forAll(phi.boundaryField(), patchI)
|
||||
forAll(phi.boundaryField(), patchi)
|
||||
{
|
||||
if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchI]))
|
||||
if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchi]))
|
||||
{
|
||||
// Form empty patch field repeat the internal field to
|
||||
// allow for the node interpolation in Fluent
|
||||
@ -79,13 +79,13 @@ void writeFluentField
|
||||
|
||||
// Get reference to internal cells
|
||||
const labelList emptyFaceCells =
|
||||
phi.boundaryField()[patchI].patch().patch().faceCells();
|
||||
phi.boundaryField()[patchi].patch().patch().faceCells();
|
||||
|
||||
// Writing cells for empty patch
|
||||
stream
|
||||
<< "(300 ("
|
||||
<< fluentFieldIdentifier << " " // Field identifier
|
||||
<< patchI + 10 << " " // Zone ID: patchI+10
|
||||
<< patchi + 10 << " " // Zone ID: patchi+10
|
||||
<< "1 " // Number of components (scalar=1, vector=3)
|
||||
<< "0 0 " // Unused
|
||||
<< nWrittenFaces + 1 << " "
|
||||
@ -107,13 +107,13 @@ void writeFluentField
|
||||
// Regular patch
|
||||
label nWrittenFaces = phiInternal.size();
|
||||
|
||||
const scalarField& patchPhi = phi.boundaryField()[patchI];
|
||||
const scalarField& patchPhi = phi.boundaryField()[patchi];
|
||||
|
||||
// Write header
|
||||
stream
|
||||
<< "(300 ("
|
||||
<< fluentFieldIdentifier << " " // Field identifier
|
||||
<< patchI + 10 << " " // Zone ID: patchI+10
|
||||
<< patchi + 10 << " " // Zone ID: patchi+10
|
||||
<< "1 " // Number of components (scalar=1, vector=3)
|
||||
<< "0 0 " // Unused
|
||||
<< nWrittenFaces + 1 << " " << nWrittenFaces + patchPhi.size()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,7 +51,7 @@ void writeFluentField
|
||||
<< "(300 ("
|
||||
<< fluentFieldIdentifier << " " // Field identifier
|
||||
<< "1 " // Zone ID: (cells=1, internal faces=2,
|
||||
// patch faces=patchI+10)
|
||||
// patch faces=patchi+10)
|
||||
<< "3 " // Number of components (scalar=1, vector=3)
|
||||
<< "0 0 " // Unused
|
||||
<< "1 " << phiInternal.size() // Start and end of list
|
||||
@ -72,15 +72,15 @@ void writeFluentField
|
||||
label nWrittenFaces = phiInternal.size();
|
||||
|
||||
// Writing boundary faces
|
||||
forAll(phi.boundaryField(), patchI)
|
||||
forAll(phi.boundaryField(), patchi)
|
||||
{
|
||||
const vectorField& patchPhi = phi.boundaryField()[patchI];
|
||||
const vectorField& patchPhi = phi.boundaryField()[patchi];
|
||||
|
||||
// Write header
|
||||
stream
|
||||
<< "(300 ("
|
||||
<< fluentFieldIdentifier << " " // Field identifier
|
||||
<< patchI + 10 << " " // Zone ID: patchI+10
|
||||
<< patchi + 10 << " " // Zone ID: patchi+10
|
||||
<< "3 " // Number of components (scalar=1, vector=3)
|
||||
<< "0 0 " // Unused
|
||||
<< nWrittenFaces + 1 << " " << nWrittenFaces + patchPhi.size()
|
||||
|
||||
@ -492,10 +492,10 @@ void ensightField
|
||||
{
|
||||
if (eMesh.faceToBeIncluded(faceI))
|
||||
{
|
||||
label patchI = mesh.boundaryMesh().whichPatch(faceI);
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchI];
|
||||
label patchi = mesh.boundaryMesh().whichPatch(faceI);
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchi];
|
||||
label patchFaceI = pp.whichFace(faceI);
|
||||
Type value = sf.boundaryField()[patchI][patchFaceI];
|
||||
Type value = sf.boundaryField()[patchi][patchFaceI];
|
||||
values[j] = value;
|
||||
++j;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -284,9 +284,9 @@ void Foam::ensightMesh::correct()
|
||||
1
|
||||
);
|
||||
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
forAll(mesh_.boundaryMesh(), patchi)
|
||||
{
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchI];
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchi];
|
||||
if
|
||||
(
|
||||
isA<processorPolyPatch>(pp)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -129,9 +129,9 @@ labelList getSelectedPatches
|
||||
|
||||
Info<< "Combining patches:" << endl;
|
||||
|
||||
forAll(patches, patchI)
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
const polyPatch& pp = patches[patchi];
|
||||
|
||||
if
|
||||
(
|
||||
@ -139,18 +139,18 @@ labelList getSelectedPatches
|
||||
|| (Pstream::parRun() && isType<processorPolyPatch>(pp))
|
||||
)
|
||||
{
|
||||
Info<< " discarding empty/processor patch " << patchI
|
||||
Info<< " discarding empty/processor patch " << patchi
|
||||
<< " " << pp.name() << endl;
|
||||
}
|
||||
else if (findStrings(excludePatches, pp.name()))
|
||||
{
|
||||
Info<< " excluding patch " << patchI
|
||||
Info<< " excluding patch " << patchi
|
||||
<< " " << pp.name() << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
patchIDs.append(patchI);
|
||||
Info<< " patch " << patchI << " " << pp.name() << endl;
|
||||
patchIDs.append(patchi);
|
||||
Info<< " patch " << patchi << " " << pp.name() << endl;
|
||||
}
|
||||
}
|
||||
return patchIDs.shrink();
|
||||
|
||||
@ -69,16 +69,16 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getPatchField
|
||||
(
|
||||
const bool nearCellValue,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vfld,
|
||||
const label patchI
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
if (nearCellValue)
|
||||
{
|
||||
return vfld.boundaryField()[patchI].patchInternalField();
|
||||
return vfld.boundaryField()[patchi].patchInternalField();
|
||||
}
|
||||
else
|
||||
{
|
||||
return vfld.boundaryField()[patchI];
|
||||
return vfld.boundaryField()[patchi];
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,16 +99,16 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField
|
||||
{
|
||||
label faceI = faceLabels[i];
|
||||
|
||||
label patchI = patches.whichPatch(faceI);
|
||||
label patchi = patches.whichPatch(faceI);
|
||||
|
||||
if (patchI == -1)
|
||||
if (patchi == -1)
|
||||
{
|
||||
fld[i] = sfld[faceI];
|
||||
}
|
||||
else
|
||||
{
|
||||
label localFaceI = faceI - patches[patchI].start();
|
||||
fld[i] = sfld.boundaryField()[patchI][localFaceI];
|
||||
label localFaceI = faceI - patches[patchi].start();
|
||||
fld[i] = sfld.boundaryField()[patchi][localFaceI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -110,12 +110,12 @@ void ReadAndMapFields
|
||||
label bFaceI = faceI - mesh.nInternalFaces();
|
||||
if (bFaceI >= 0)
|
||||
{
|
||||
label patchI = mesh.boundaryMesh().patchID()[bFaceI];
|
||||
label localFaceI = mesh.boundaryMesh()[patchI].whichFace
|
||||
label patchi = mesh.boundaryMesh().patchID()[bFaceI];
|
||||
label localFaceI = mesh.boundaryMesh()[patchi].whichFace
|
||||
(
|
||||
faceI
|
||||
);
|
||||
fld[pointI] = readField.boundaryField()[patchI][localFaceI];
|
||||
fld[pointI] = readField.boundaryField()[patchi][localFaceI];
|
||||
}
|
||||
//else
|
||||
//{
|
||||
|
||||
@ -198,9 +198,9 @@ labelList getSelectedPatches
|
||||
|
||||
Info<< "Combining patches:" << endl;
|
||||
|
||||
forAll(patches, patchI)
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
const polyPatch& pp = patches[patchi];
|
||||
|
||||
if
|
||||
(
|
||||
@ -208,18 +208,18 @@ labelList getSelectedPatches
|
||||
|| (Pstream::parRun() && isType<processorPolyPatch>(pp))
|
||||
)
|
||||
{
|
||||
Info<< " discarding empty/processor patch " << patchI
|
||||
Info<< " discarding empty/processor patch " << patchi
|
||||
<< " " << pp.name() << endl;
|
||||
}
|
||||
else if (findStrings(excludePatches, pp.name()))
|
||||
{
|
||||
Info<< " excluding patch " << patchI
|
||||
Info<< " excluding patch " << patchi
|
||||
<< " " << pp.name() << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
patchIDs.append(patchI);
|
||||
Info<< " patch " << patchI << " " << pp.name() << endl;
|
||||
patchIDs.append(patchi);
|
||||
Info<< " patch " << patchi << " " << pp.name() << endl;
|
||||
}
|
||||
}
|
||||
return patchIDs.shrink();
|
||||
@ -890,9 +890,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(patches, patchI)
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
const polyPatch& pp = patches[patchi];
|
||||
|
||||
if (!findStrings(excludePatches, pp.name()))
|
||||
{
|
||||
@ -925,7 +925,7 @@ int main(int argc, char *argv[])
|
||||
binary,
|
||||
nearCellValue,
|
||||
patchFileName,
|
||||
labelList(1, patchI)
|
||||
labelList(1, patchi)
|
||||
);
|
||||
|
||||
if (!isA<emptyPolyPatch>(pp))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -123,13 +123,13 @@ void Foam::patchWriter::writePatchIDs()
|
||||
|
||||
forAll(patchIDs_, i)
|
||||
{
|
||||
label patchI = patchIDs_[i];
|
||||
label patchi = patchIDs_[i];
|
||||
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchI];
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchi];
|
||||
|
||||
if (!isA<emptyPolyPatch>(pp))
|
||||
{
|
||||
writeFuns::insert(scalarField(pp.size(), patchI), fField);
|
||||
writeFuns::insert(scalarField(pp.size(), patchi), fField);
|
||||
}
|
||||
}
|
||||
writeFuns::write(os_, binary_, fField);
|
||||
|
||||
@ -45,9 +45,9 @@ void Foam::patchWriter::write
|
||||
|
||||
forAll(patchIDs_, j)
|
||||
{
|
||||
label patchI = patchIDs_[j];
|
||||
label patchi = patchIDs_[j];
|
||||
|
||||
const fvPatchField<Type>& pfld = fld.boundaryField()[patchI];
|
||||
const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];
|
||||
|
||||
if (nearCellValue_)
|
||||
{
|
||||
@ -81,9 +81,9 @@ void Foam::patchWriter::write
|
||||
|
||||
forAll(patchIDs_, j)
|
||||
{
|
||||
label patchI = patchIDs_[j];
|
||||
label patchi = patchIDs_[j];
|
||||
|
||||
const pointPatchField<Type>& pfld = fld.boundaryField()[patchI];
|
||||
const pointPatchField<Type>& pfld = fld.boundaryField()[patchi];
|
||||
|
||||
writeFuns::insert(pfld.patchInternalField()(), fField);
|
||||
}
|
||||
@ -110,9 +110,9 @@ void Foam::patchWriter::write
|
||||
|
||||
forAll(patchIDs_, j)
|
||||
{
|
||||
label patchI = patchIDs_[j];
|
||||
label patchi = patchIDs_[j];
|
||||
|
||||
const fvPatchField<Type>& pfld = fld.boundaryField()[patchI];
|
||||
const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];
|
||||
|
||||
if (nearCellValue_)
|
||||
{
|
||||
|
||||
@ -43,16 +43,16 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
|
||||
{
|
||||
label faceI = pp_.addressing()[i];
|
||||
|
||||
label patchI = patches.whichPatch(faceI);
|
||||
label patchi = patches.whichPatch(faceI);
|
||||
|
||||
if (patchI == -1)
|
||||
if (patchi == -1)
|
||||
{
|
||||
fld[i] = sfld[faceI];
|
||||
}
|
||||
else
|
||||
{
|
||||
label localFaceI = faceI - patches[patchI].start();
|
||||
fld[i] = sfld.boundaryField()[patchI][localFaceI];
|
||||
label localFaceI = faceI - patches[patchi].start();
|
||||
fld[i] = sfld.boundaryField()[patchi][localFaceI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,11 +89,11 @@ void writeSurfFields
|
||||
writeFuns::insert(svf[faceI], fField);
|
||||
}
|
||||
|
||||
forAll(svf.boundaryField(), patchI)
|
||||
forAll(svf.boundaryField(), patchi)
|
||||
{
|
||||
const fvsPatchVectorField& pf = svf.boundaryField()[patchI];
|
||||
const fvsPatchVectorField& pf = svf.boundaryField()[patchi];
|
||||
|
||||
const fvPatch& pp = mesh.boundary()[patchI];
|
||||
const fvPatch& pp = mesh.boundary()[patchi];
|
||||
|
||||
if (isA<emptyFvsPatchVectorField>(pf))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user