mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
surfaceFind: output region/zone number of found face
This commit is contained in:
@ -81,10 +81,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Nearest vertex:" << nl
|
Info<< "Nearest vertex:" << nl
|
||||||
<< " index :" << minIndex << " (in localPoints)" << nl
|
<< " index : " << minIndex << " (in localPoints)" << nl
|
||||||
<< " index :" << surf1.meshPoints()[minIndex]
|
<< " index : " << surf1.meshPoints()[minIndex]
|
||||||
<< " (in points)" << nl
|
<< " (in points)" << nl
|
||||||
<< " coordinates:" << localPoints[minIndex] << nl
|
<< " coordinates: " << localPoints[minIndex] << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -111,15 +111,26 @@ int main(int argc, char *argv[])
|
|||||||
const face& f = surf1[minIndex];
|
const face& f = surf1[minIndex];
|
||||||
|
|
||||||
Info<< "Face with nearest centre:" << nl
|
Info<< "Face with nearest centre:" << nl
|
||||||
<< " index :" << minIndex << nl
|
<< " index : " << minIndex << nl
|
||||||
<< " centre :" << f.centre(points) << nl
|
<< " centre : " << f.centre(points) << nl
|
||||||
<< " face :" << f << nl
|
<< " face : " << f << nl
|
||||||
<< " vertex coords:\n";
|
<< " vertex coords:" << endl;
|
||||||
forAll(f, fp)
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
Info<< " " << points[f[fp]] << "\n";
|
Info<< " " << points[f[fp]] << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const List<surfZone>& surfZones = surf1.surfZones();
|
||||||
|
label surfZone = -1;
|
||||||
|
forAll(surfZones, zonei)
|
||||||
|
{
|
||||||
|
if (minIndex >= surfZones[zonei].start())
|
||||||
|
{
|
||||||
|
surfZone = zonei;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Info<< " zone/region : " << surfZone << endl;
|
||||||
|
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user