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

Function correct

src/meshTools/meshStructure/meshStructure.C:99–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99void Foam::meshStructure::correct
100(
101 const polyMesh& mesh,
102 const uindirectPrimitivePatch& pp
103)
104{
105 // Field on cells and faces.
106 List<topoDistanceData> cellData(mesh.nCells());
107 List<topoDistanceData> faceData(mesh.nFaces());
108
109 {
110 if (debug)
111 {
112 Info<< typeName << " : seeding "
113 << returnReduce(pp.size(), sumOp<label>()) << " patch faces"
114 << nl << endl;
115 }
116
117
118 // Start of changes
119 labelList patchFaces(pp.size());
120 List<topoDistanceData> patchData(pp.size());
121 forAll(pp, patchFacei)
122 {
123 patchFaces[patchFacei] = pp.addressing()[patchFacei];
124 patchData[patchFacei] = topoDistanceData(patchFacei, 0);
125 }
126
127
128 // Propagate information inwards
129 FaceCellWave<topoDistanceData> distanceCalc
130 (
131 mesh,
132 patchFaces,
133 patchData,
134 faceData,
135 cellData,
136 mesh.globalData().nTotalCells()+1
137 );
138
139
140 // Determine cells from face-cell-walk
141 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142
143 cellToPatchFaceAddressing_.setSize(mesh.nCells());
144 cellLayer_.setSize(mesh.nCells());
145 forAll(cellToPatchFaceAddressing_, celli)
146 {
147 cellToPatchFaceAddressing_[celli] = cellData[celli].data();
148 cellLayer_[celli] = cellData[celli].distance();
149 }
150
151
152
153 // Determine faces from face-cell-walk
154 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155
156 faceToPatchFaceAddressing_.setSize(mesh.nFaces());

Callers 1

meshStructure.CFile · 0.70

Calls 15

returnReduceFunction · 0.85
patchDataFunction · 0.85
topoDistanceDataClass · 0.85
isStructuredCellFunction · 0.85
nTotalCellsMethod · 0.80
isInternalFaceMethod · 0.80
nTotalPointsMethod · 0.80
nextLabelMethod · 0.80
forAllFunction · 0.50
pointDataClass · 0.50
edgeClass · 0.50

Tested by

no test coverage detected