38 const label cellTableId
42 <<
' ' << starcdShellShape_
45 <<
' ' << starcdShellType_;
56 os <<
' ' <<
f[fp] + 1;
83 const bool mustTriangulate = this->isTri();
95 cellTableLookup = readInpCellTable(is);
107 this->storedPoints(),
115 mapPointId.
insert(pointId[i], i);
126 <<
"Cannot read file " << is.
name()
130 readHeader(is,
"PROSTAR_CELL");
145 label lineLabel, shapeId, nLabels, cellTableId, typeId;
148 while ((is >> lineLabel).good())
150 is >> shapeId >> nLabels >> cellTableId >> typeId;
152 vertexLabels.
clear();
156 for (
label i = 0; i < nLabels; ++i)
166 vertexLabels.
append(mapPointId[vrtId]);
169 if (typeId == starcdShellType_)
173 if (fnd != lookup.
end())
184 zoneI = dynSizes.
size();
185 lookup.
insert(cellTableId, zoneI);
188 cellTableLookup.
find(cellTableId);
190 if (tableNameIter == cellTableLookup.
end())
199 dynNames.
append(tableNameIter());
206 if (mustTriangulate && nLabels > 3)
208 triEngine.triangulate
228 this->sortFacesAndStore(move(dynFaces), move(dynZones), sorted);
231 this->addZones(dynSizes, dynNames,
true);
250 ? surfaceFormatsCore::oneZone(faceLst)
259 writePoints(
OFstream(baseName +
".vrt")(), pointLst);
266 const surfZone& zone = zones[zoneI];
272 const Face&
f = faceLst[
faceMap[faceIndex++]];
273 writeShell(os,
f, faceIndex, zoneI + 1);
280 const Face&
f = faceLst[faceIndex++];
281 writeShell(os,
f, faceIndex, zoneI + 1);
Various functions to operate on Lists.
#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.
void reserve(const label)
Reserve allocation space for at least this size.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void clear()
Clear the addressed list, i.e. set the size to zero.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
void clear()
Clear all entries from table.
const fileName & name() const
Return the name of the stream.
bool good() const
Return true if next operation might succeed.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set size to zero.
A HashTable to objects of type <T> with a label key.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const List< surfZone > & surfZones() const
Const access to the surface zones.
const List< Face > & faces() const
Return const access to the faces.
bool useFaceMap() const
Use faceMap?
const List< label > & faceMap() const
Const access to the faceMap, zero-sized when unused.
const pointField & points() const
Return const access to the points.
A List obtained as a section of another List.
A List with indirect addressing.
A class for handling file names.
fileName lessExt() const
Return file name without extension (part before last .)
Triangulation of three-dimensional polygons.
const UList< triFace > & triPoints() const
Get the triangles' points.
A surface zone on a MeshedSurface.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
errorManipArg< error, int > exit(error &err, const int errNo=1)
pointField vertices(const blockVertexList &bvl)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable