MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / calcNonCompactRegionSplit

Function calcNonCompactRegionSplit

src/meshTools/regionSplit/regionSplit.C:45–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44
45void Foam::regionSplit::calcNonCompactRegionSplit
46(
47 const globalIndex& globalFaces,
48 const boolList& blockedFace,
49 const List<labelPair>& explicitConnections,
50
51 labelList& cellRegion
52) const
53{
54 // Field on cells and faces.
55 List<minData> cellData(mesh().nCells());
56 List<minData> faceData(mesh().nFaces());
57
58 // Take over blockedFaces by seeding a negative number
59 // (so is always less than the decomposition)
60 label nUnblocked = 0;
61 forAll(faceData, facei)
62 {
63 if (blockedFace.size() && blockedFace[facei])
64 {
65 faceData[facei] = minData(-2);
66 }
67 else
68 {
69 nUnblocked++;
70 }
71 }
72
73 // Seed unblocked faces
74 labelList seedFaces(nUnblocked);
75 List<minData> seedData(nUnblocked);
76 nUnblocked = 0;
77
78
79 forAll(faceData, facei)
80 {
81 if (blockedFace.empty() || !blockedFace[facei])
82 {
83 seedFaces[nUnblocked] = facei;
84 // Seed face with globally unique number
85 seedData[nUnblocked] = minData(globalFaces.toGlobal(facei));
86 nUnblocked++;
87 }
88 }
89
90
91 // Propagate information inwards
92 FaceCellWave<minData> deltaCalc
93 (
94 mesh(),
95 explicitConnections,
96 false, // disable walking through cyclicAMI for backwards compatibility
97 seedFaces,
98 seedData,
99 faceData,
100 cellData,
101 mesh().globalData().nTotalCells()+1
102 );

Callers 1

regionSplit.CFile · 0.85

Calls 13

meshFunction · 0.85
minDataClass · 0.85
toGlobalMethod · 0.80
nTotalCellsMethod · 0.80
forAllFunction · 0.50
exitFunction · 0.50
nCellsMethod · 0.45
nFacesMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
setSizeMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected