mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: fluentMeshToFoam: correct sets addressing
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1385,25 +1385,12 @@ int main(int argc, char *argv[])
|
||||
label sz = bFaces.size();
|
||||
labelList meshFaces(sz,-1);
|
||||
|
||||
|
||||
//make face set and write (seperate from rest for clarity)
|
||||
//internal and external Fluent boundaries
|
||||
// Search faces by point matching
|
||||
forAll(bFaces, j)
|
||||
{
|
||||
faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz);
|
||||
|
||||
forAll(bFaces, j)
|
||||
{
|
||||
const face& f = bFaces[j];
|
||||
label cMeshFace = findFace(pShapeMesh, f);
|
||||
meshFaces[j] = cMeshFace;
|
||||
pFaceSet.insert(cMeshFace);
|
||||
}
|
||||
if (writeSets)
|
||||
{
|
||||
Info<< "Writing patch " << patchNames[patchI]
|
||||
<< " of size " << sz << " to faceSet." << endl;
|
||||
pFaceSet.write();
|
||||
}
|
||||
const face& f = bFaces[j];
|
||||
label cMeshFace = findFace(pShapeMesh, f);
|
||||
meshFaces[j] = cMeshFace;
|
||||
}
|
||||
|
||||
|
||||
@ -1546,6 +1533,31 @@ int main(int argc, char *argv[])
|
||||
IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));
|
||||
|
||||
|
||||
// Re-do face matching to write sets
|
||||
if (writeSets)
|
||||
{
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const faceList& bFaces = patches[patchI];
|
||||
label sz = bFaces.size();
|
||||
|
||||
faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz);
|
||||
|
||||
forAll(bFaces, j)
|
||||
{
|
||||
const face& f = bFaces[j];
|
||||
label cMeshFace = findFace(pShapeMesh, f);
|
||||
pFaceSet.insert(cMeshFace);
|
||||
}
|
||||
Info<< "Writing patch " << patchNames[patchI]
|
||||
<< " of size " << sz << " to faceSet" << endl;
|
||||
|
||||
pFaceSet.instance() = pShapeMesh.instance();
|
||||
pFaceSet.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Zones
|
||||
// will write out cell zones and internal faces for those zones
|
||||
// note: zone boundary faces are not added to face zones
|
||||
|
||||
Reference in New Issue
Block a user