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

Function syncProc

src/dynamicMesh/meshCut/cellCuts/cellCuts.C:130–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
129
130void Foam::cellCuts::syncProc()
131{
132 if (!Pstream::parRun())
133 {
134 return;
135 }
136
137 syncTools::syncPointList(mesh(), pointIsCut_, orEqOp<bool>(), false);
138 syncTools::syncEdgeList(mesh(), edgeIsCut_, orEqOp<bool>(), false);
139 syncTools::syncEdgeList(mesh(), edgeWeight_, maxEqOp<scalar>(), -GREAT);
140
141 {
142 const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
143
144 // Convert faceSplitCut into face-local data: vertex and edge w.r.t.
145 // vertex 0: (since this is same on both sides)
146 //
147 // Sending-side vertex Receiving-side vertex
148 // 0 0
149 // 1 3
150 // 2 2
151 // 3 1
152 //
153 // Sending-side edge Receiving side edge
154 // 0-1 3-0
155 // 1-2 2-3
156 // 2-3 1-2
157 // 3-0 0-1
158 //
159 // Encoding is as index:
160 // 0 : not set
161 // >0 : vertex, vertex is index-1
162 // <0 : edge, edge is -index-1
163
164 edgeList relCuts(nBnd, edge(0, 0));
165
166 const polyBoundaryMesh& pbm = mesh().boundaryMesh();
167
168 forAll(pbm, patchi)
169 {
170 const polyPatch& pp = pbm[patchi];
171
172 if (pp.coupled())
173 {
174 forAll(pp, i)
175 {
176 label facei = pp.start()+i;
177 label bFacei = facei-mesh().nInternalFaces();
178
179 const Map<edge>::const_iterator iter =
180 faceSplitCut_.find(facei);
181 if (iter != faceSplitCut_.end())
182 {
183 const face& f = mesh().faces()[facei];
184 const labelList& fEdges = mesh().faceEdges()[facei];
185 const edge& cuts = iter();
186
187 forAll(cuts, i)

Callers 1

cellCuts.CFile · 0.85

Calls 15

meshFunction · 0.85
findIndexFunction · 0.85
dummyTransformClass · 0.85
forAllFunction · 0.50
edgeClass · 0.50
exitFunction · 0.50
nFacesMethod · 0.45
nInternalFacesMethod · 0.45
coupledMethod · 0.45
startMethod · 0.45
endMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected