Go to the documentation of this file.
41 const label cellTableId
47 <<
' ' << (cellTableId + 1)
48 <<
' ' << starcdShellType;
53 for (
const label pointi :
f)
59 os <<
' ' << (pointi + 1);
92 Map<word> cellTableLookup = readInpCellTable
94 IFstream(starFileName(baseName, STARCDCore::INP_FILE))()
104 IFstream(starFileName(baseName, STARCDCore::VRT_FILE))(),
105 this->storedPoints(),
113 mapPointId.insert(pointId[i], i);
120 IFstream is(starFileName(baseName, STARCDCore::CEL_FILE));
124 <<
"Cannot read file " << is.
name() <<
nl
128 readHeader(is, STARCDCore::HEADER_CEL);
143 bool ignoreElemId =
false;
145 label ignoredLabel, shapeId, nLabels, cellTableId, typeId;
160 vertexLabels.
clear();
164 for (label i = 0; i < nLabels; ++i)
174 vertexLabels.
append(mapPointId[vrtId]);
177 if (typeId == starcdShellType)
180 const auto iterGroup =
lookup.cfind(cellTableId);
181 if (iterGroup.found())
183 if (zoneId != *iterGroup)
192 zoneId = dynSizes.size();
193 lookup.insert(cellTableId, zoneId);
195 const auto iterTableName = cellTableLookup.cfind(cellTableId);
197 if (iterTableName.found())
199 dynNames.
append(*iterTableName);
220 f.triangles(this->
points(), nTri, trias);
222 for (
const face& tri : trias)
225 dynFaces.
append(Face(tri));
230 else if (nLabels >= 3)
250 this->sortFacesAndStore(dynFaces, dynZones, dynElemId, sorted);
253 this->addZones(dynSizes, dynNames);
254 this->addZonesToFaces();
270 streamOpt.
format(IOstream::ASCII);
280 ? surfaceFormatsCore::oneZone(faceLst)
284 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
288 const bool useOrigFaceIds =
300 OFstream os(starFileName(baseName, STARCDCore::VRT_FILE), streamOpt);
301 writePoints(
os, pointLst);
305 OFstream os(starFileName(baseName, STARCDCore::CEL_FILE), streamOpt);
313 for (label nLocal =
zone.size(); nLocal--; ++faceIndex)
316 (useFaceMap ?
faceMap[faceIndex] : faceIndex);
318 const Face&
f = faceLst[facei];
322 elemId = elemIds[facei];
325 writeShell(
os,
f, elemId, zoneIndex);
334 OFstream os(starFileName(baseName, STARCDCore::INP_FILE));
label labelToken() const
Return label value.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
bool isLabel() const noexcept
Token is LABEL.
A class for handling file names.
bool useFaceMap() const
Can/should use faceMap?
Input from file stream, using an ISstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
A List obtained as a section of another List.
Base class for mesh zones.
streamFormat format() const noexcept
Get the current stream format.
A HashTable to objects of type <T> with a label key.
const pointField & points() const
Return const access to the points.
A token holds an item read from Istream.
fileName lessExt() const
Return file name without extension (part before last .)
void reserve(const label len)
static void writeHeader(Ostream &os, const word &fieldName)
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
#define forAll(list, i)
Loop across all elements in list.
bool good() const noexcept
True if next operation might succeed.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
The IOstreamOption is a simple container for options an IOstream can normally have.
Lookup type of boundary radiation properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
pointField vertices(const blockVertexList &bvl)
OBJstream os(runTime.globalPath()/outputName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
const labelUList & faceIds() const
Const access to the faceIds, zero-sized when unused.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
A surface zone on a MeshedSurface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clear()
Clear the list, i.e. set size to zero.
virtual Istream & read(token &t)
Return next token from stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A face is a list of labels corresponding to mesh vertices.
Various functions to operate on Lists.
const UList< Face > & surfFaces() const
Return const access to the faces.
void size(const label n)
Older name for setAddressableSize.
const UList< surfZone > & surfZones() const
Const access to the surface zones.