43 template<
class FaceList,
class Po
intField>
51 if (edgesPtr_ || faceFacesPtr_ || edgeFacesPtr_ || faceEdgesPtr_)
56 <<
"addressing already calculated" 61 const List<FaceType>& locFcs = localFaces();
70 maxEdges += locFcs[facei].size();
82 List<DynamicList<label>>
ff(locFcs.size());
95 faceIntoEdges[facei] = locFcs[facei].edges();
97 labelList& curFaceEdges = faceEdges[facei];
98 curFaceEdges.
setSize(faceIntoEdges[facei].size());
100 forAll(curFaceEdges, faceEdgeI)
102 curFaceEdges[faceEdgeI] = -1;
121 const FaceType& curF = locFcs[facei];
122 const edgeList& curEdges = faceIntoEdges[facei];
125 List<DynamicList<label>> neiFaces(curF.size());
126 List<DynamicList<label>> edgeOfNeiFace(curF.size());
128 label nNeighbours = 0;
134 if (faceEdges[facei][edgeI] >= 0)
continue;
139 const edge& e = curEdges[edgeI];
143 const labelList& nbrFaces = pf[e.start()];
145 forAll(nbrFaces, nbrFacei)
148 label curNei = nbrFaces[nbrFacei];
154 const edgeList& searchEdges = faceIntoEdges[curNei];
156 forAll(searchEdges, neiEdgeI)
158 if (searchEdges[neiEdgeI] == e)
163 neiFaces[edgeI].append(curNei);
164 edgeOfNeiFace[edgeI].append(neiEdgeI);
167 ff[facei].append(curNei);
168 ff[curNei].append(facei);
188 for (
label neiSearch = 0; neiSearch < nNeighbours; neiSearch++)
192 label minNei = locFcs.size();
196 if (neiFaces[nfI].size() && neiFaces[nfI][0] < minNei)
199 minNei = neiFaces[nfI][0];
206 edges[nEdges] = curEdges[nextNei];
209 faceEdges[facei][nextNei] = nEdges;
211 DynamicList<label>& cnf = neiFaces[nextNei];
212 DynamicList<label>& eonf = edgeOfNeiFace[nextNei];
221 faceEdges[cnf[cnfI]][eonf[cnfI]] = nEdges;
223 curEf[cnfI + 1] = cnf[cnfI];
236 <<
"Error in internal edge insertion" 242 nInternalEdges_ = nEdges;
252 if (curEdges[edgeI] < 0)
255 edges[nEdges] = faceIntoEdges[facei][edgeI];
256 curEdges[edgeI] = nEdges;
269 edges.setSize(nEdges);
272 edgeFaces.setSize(nEdges);
280 faceFaces[facei].transfer(
ff[facei]);
List< labelList > labelListList
A List of labelList.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edgeList > edgeListList
Ostream & endl(Ostream &os)
Add newline and flush stream.
A list of faces which address into the list of points.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
#define InfoInFunction
Report an information message using Foam::Info.