mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Modification of shootRays algorithm. Rays that hit themselfs are continued
until they hit(or not) the agglomeration target. If they do the surfaces can see
each other.
faceAgglomerate:
The agglomeration now stops when the global nCoarse is reached (not per-processor)
69 lines
1.2 KiB
C
69 lines
1.2 KiB
C
Random rndGen(653213);
|
|
|
|
// Determine mesh bounding boxes:
|
|
List<treeBoundBox> meshBb
|
|
(
|
|
1,
|
|
treeBoundBox
|
|
(
|
|
boundBox(coarseMesh.points(), false)
|
|
).extend(rndGen, 1e-3)
|
|
);
|
|
|
|
// Dummy bounds dictionary
|
|
dictionary dict;
|
|
dict.add("bounds", meshBb);
|
|
dict.add
|
|
(
|
|
"distributionType",
|
|
distributedTriSurfaceMesh::distributionTypeNames_
|
|
[
|
|
distributedTriSurfaceMesh::FROZEN
|
|
]
|
|
);
|
|
dict.add("mergeDistance", SMALL);
|
|
|
|
labelHashSet includePatches;
|
|
forAll(patches, patchI)
|
|
{
|
|
if (!isA<processorPolyPatch>(patches[patchI]))
|
|
{
|
|
includePatches.insert(patchI);
|
|
}
|
|
}
|
|
|
|
labelList triSurfaceToAgglom(5*nFineFaces);
|
|
|
|
const triSurface localSurface = triangulate
|
|
(
|
|
patches,
|
|
includePatches,
|
|
finalAgglom,
|
|
triSurfaceToAgglom,
|
|
globalNumbering,
|
|
coarsePatches
|
|
);
|
|
|
|
|
|
distributedTriSurfaceMesh surfacesMesh
|
|
(
|
|
IOobject
|
|
(
|
|
"wallSurface.stl",
|
|
runTime.constant(), // directory
|
|
"triSurface", // instance
|
|
runTime, // registry
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
localSurface,
|
|
dict
|
|
);
|
|
|
|
|
|
triSurfaceToAgglom.resize(surfacesMesh.size());
|
|
|
|
//surfacesMesh.searchableSurface::write();
|
|
|
|
surfacesMesh.setField(triSurfaceToAgglom);
|