39 const label vertPerCell,
40 const label facePerCell,
41 const label maxVertPerFace,
42 const word& cellModelName
46 localFaces_(facePerCell),
47 faceSize_(facePerCell, -1),
48 pointMap_(vertPerCell),
49 faceMap_(facePerCell),
50 edgeFaces_(2*vertPerCell*vertPerCell),
51 pointFaceIndex_(vertPerCell),
52 vertLabels_(vertPerCell),
53 faceLabels_(facePerCell),
54 cellModelName_(cellModelName),
55 cellModelPtr_(
nullptr)
59 face&
f = localFaces_[facei];
64 forAll(pointFaceIndex_, vertI)
66 pointFaceIndex_[vertI].setSize(facePerCell);
86 label facei = myFaces[myFacei];
88 const face&
f = faces[facei];
89 face& localFace = localFaces_[myFacei];
92 faceSize_[myFacei] = f.
size();
96 label vertI = f[localVertI];
99 if (iter == localPoint_.
end())
103 if (newVertI >= pointMap_.size())
109 localFace[localVertI] = newVertI;
110 localPoint_.insert(vertI, newVertI);
116 localFace[localVertI] = *iter;
121 faceMap_[myFacei] = facei;
127 const label fp = iter();
128 pointMap_[fp] = iter.key();
155 label start = f[prevVertI];
176 <<
"edgeFaces_ full at entry:" << key1
177 <<
" for edge " << start <<
" " << end
220 const label localFacei
236 <<
"edgeFaces_ does not contain:" << localFacei
237 <<
" for edge " << v0 <<
" " << v1 <<
" at key " << key
238 <<
" edgeFaces_[key, key+1]:" <<
edgeFaces_[key]
249 os <<
"Faces:" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
labelList faceMap_
Map from local to mesh face numbering.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void calcEdgeAddressing(const label numVert)
Fill edge (start, end) to face number.
labelListList pointFaceIndex_
pointFaceIndex[localVertI][localFacei] is index in localFace
Various functions to operate on Lists.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
cellMatcher(const label vertPerCell, const label facePerCell, const label maxVertPerFace, const word &cellModelName)
Construct given mesh and shape factors.
labelList edgeFaces_
Map from 'edge' to neighbouring faces.
void calcPointFaceIndex()
Fill vertex/face to index in face data structure.
A class for handling words, derived from string.
label calcLocalFaces(const faceList &faces, const labelList &myFaces)
Calculates localFaces. Returns number of local vertices (or -1.
labelList faceSize_
Number of vertices per face in localFaces_.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
faceList localFaces_
Faces using local vertex numbering.
labelList pointMap_
Map from local to mesh vertex numbering.
label otherFace(const label numVert, const label v0, const label v1, const label localFacei) const
Given start,end of edge lookup both faces sharing it and return.
void setSize(const label)
Reset size of List.
void write(Ostream &os) const
static label edgeKey(const label numVert, const label v0, const label v1)
Given start and end of edge generate unique key.
A HashTable to objects of type <T> with a label key.