searchingEngine.H
Go to the documentation of this file.
1 Random rndGen(653213);
2 
3 // Determine mesh bounding boxes:
4 List<treeBoundBox> meshBb
5 (
6  1,
7  treeBoundBox
8  (
9  boundBox(coarseMesh.points(), false)
10  ).extend(rndGen, 1e-3)
11 );
12 
13 // Dummy bounds dictionary
14 dictionary dict;
15 dict.add("bounds", meshBb);
16 dict.add
17 (
18  "distributionType",
19  distributedTriSurfaceMesh::distributionTypeNames_
20  [
21  distributedTriSurfaceMesh::FROZEN
22  ]
23 );
24 dict.add("mergeDistance", SMALL);
25 
27 forAll(patches, patchI)
28 {
29  const polyPatch& pp = patches[patchI];
30  if
31  (
32  !pp.coupled()
33  && !isA<cyclicAMIPolyPatch>(pp)
34  && !isA<emptyPolyPatch>(pp)
35  )
36  {
37  includePatches.insert(patchI);
38  }
39 }
40 
41 labelList triSurfaceToAgglom(5*nFineFaces);
42 
43 const triSurface localSurface = triangulate
44 (
45  patches,
46  includePatches,
47  finalAgglom,
48  triSurfaceToAgglom,
49  globalNumbering,
50  coarsePatches
51 );
52 
53 
54 distributedTriSurfaceMesh surfacesMesh
55 (
56  IOobject
57  (
58  "wallSurface.stl",
59  runTime.constant(), // directory
60  "triSurface", // instance
61  runTime, // registry
62  IOobject::NO_READ,
63  IOobject::NO_WRITE
64  ),
65  localSurface,
66  dict
67 );
68 
69 
70 triSurfaceToAgglom.resize(surfacesMesh.size());
71 
72 //surfacesMesh.searchableSurface::write();
73 
74 surfacesMesh.setField(triSurfaceToAgglom);
Random rndGen(653213)
patches[0]
dictionary dict
const dimensionedScalar e
Elementary charge.
Definition: doubleFloat.H:78
List< treeBoundBox > meshBb(1, treeBoundBox( boundBox(coarseMesh.points(), false) ).extend(rndGen, 1e-3))
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:210
forAll(patches, patchI)
List< label > labelList
A List of labels.
Definition: labelList.H:56
labelHashSet includePatches
distributedTriSurfaceMesh surfacesMesh(IOobject( "wallSurface.stl", runTime.constant(), "triSurface", runTime, IOobject::NO_READ, IOobject::NO_WRITE ), localSurface, dict)
labelList triSurfaceToAgglom(5 *nFineFaces)