Go to the documentation of this file.
41 const label nextPointI
47 label eI = pe[pointI][ppI];
49 const edge&
e = es[eI];
51 if (
e.start() == nextPointI ||
e.end() == nextPointI)
58 label edgeI = es.size();
60 pe[nextPointI].
append(edgeI);
61 if (pointI < nextPointI)
78 Pout<<
"primitiveMesh::calcEdges() : "
79 <<
"calculating edges, pointEdges and faceEdges"
87 FatalErrorIn(
"primitiveMesh::calcEdges(const bool) const")
88 <<
"edges or faceEdges already calculated"
123 edgesOfFace[faceI] =
f[faceI].edges();
125 maxEdges +=
f[faceI].nEdges();
153 edgeOfFaceGivingNeighbour;
158 const edgeList& fEdges = edgesOfFace[curFaces[faceI]];
163 const edge& ends = fEdges[edgeI];
167 label secondPoint = -1;
169 if (ends.
start() == pointI)
172 secondPoint = ends.
end();
175 if (ends.
end() == pointI)
178 secondPoint = ends.
start();
183 if (
found && (secondPoint > pointI))
188 forAll (addedNeighbours, eopI)
190 if (secondPoint == addedNeighbours[eopI])
196 faceGivingNeighbour[eopI].
append
199 edgeOfFaceGivingNeighbour[eopI].
append(edgeI);
208 addedNeighbours.
append(secondPoint);
211 faceGivingNeighbour(addedNeighbours.size() - 1)
213 edgeOfFaceGivingNeighbour
214 (addedNeighbours.size() - 1).
append(edgeI);
227 labelList shuffleList(addedNeighbours.size());
238 for (j = 1; j <= addedNeighbours.size() - 1; j++)
240 a = addedNeighbours[j];
245 while (i >= 0 && addedNeighbours[i] > a)
247 addedNeighbours[i + 1] = addedNeighbours[i];
248 shuffleList[i + 1] = shuffleList[i];
252 addedNeighbours[i + 1] = a;
253 shuffleList[i + 1] =
b;
260 reshuffleList[shuffleList[i]] = i;
267 forAll (faceGivingNeighbour, i)
271 faceGivingNeighbour[i].shrink()
277 forAll (edgeOfFaceGivingNeighbour, i)
281 edgeOfFaceGivingNeighbour[i].shrink()
286 forAll(addedNeighbours, edgeI)
289 const labelList& curEofgn = eofgn[edgeI];
293 fe[curFgn[fgnI]][curEofgn[fgnI]] =
nEdges;
319 labelList::const_iterator iter1 = list1.begin();
320 labelList::const_iterator iter2 = list2.begin();
322 while (iter1 != list1.end() && iter2 != list2.end())
328 else if (*iter1 > *iter2)
342 "primitiveMesh::findFirstCommonElementFromSortedLists"
343 "(const labelList&, const labelList&)"
344 ) <<
"No common elements in lists " << list1 <<
" and " << list2
391 dynamicLabelList& storage
396 return faceEdges()[faceI];
401 const face&
f = faces()[faceI];
404 if (
f.
size() > storage.capacity())
406 storage.setCapacity(
f.
size());
413 findFirstCommonElementFromSortedLists
416 pointEs[
f.nextLabel(fp)]
428 return faceEdges(faceI, labels_);
435 dynamicLabelList& storage
440 return cellEdges()[cellI];
450 const labelList& fe = faceEdges(cFaces[i]);
454 labelSet_.insert(fe[feI]);
460 if (labelSet_.size() > storage.capacity())
462 storage.setCapacity(labelSet_.size());
467 storage.append(iter.key());
477 return cellEdges(cellI, labels_);
labelListList * fePtr_
Face-edges.
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
virtual const faceList & faces() const =0
Return faces.
Template functions to aid in the implementation of demand driven data.
const labelListList & pointFaces() const
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
void calcEdges() const
Calculate edges, pointEdges and faceEdges.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
label end() const
Return end vertex label.
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
const labelListList & cellEdges() const
void append(const T &)
Append an element at the end of the list.
const labelListList & faceEdges() const
void clearOutEdges()
During edge calculation, a larger set of data is assembled.
static label findFirstCommonElementFromSortedLists(const labelList &, const labelList &)
For on-the-fly addressing calculation.
errorManip< error > abort(error &err)
const double e
Elementary charge.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void setSize(const label)
Reset size of List.
List< labelList > labelListList
A List of labelList.
label start() const
Return start vertex label.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
edgeList * edgesPtr_
Edges are ordered in upper triangular order.
const dimensionedScalar e
Elementary charge.
void clear()
Clear the list, i.e. set size to zero.
static label getEdge(List< dynamicLabelList > &, DynamicList< edge > &, const label, const label)
Helper:
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
A face is a list of labels corresponding to mesh vertices.
Various functions to operate on Lists.
void size(const label)
Override size to be inconsistent with allocated storage.