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)
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);
306 writeHeader(
os, STARCDCore::HEADER_CEL);
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));
Various functions to operate on Lists.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void append(const T &val)
Copy append an element to the end of this list.
void reserve(const label len)
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
void clear()
Clear all entries from table.
Input from file stream, using an ISstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
The IOstreamOption is a simple container for options an IOstream can normally have.
streamFormat format() const noexcept
Get the current stream format.
bool good() const noexcept
True if next operation might succeed.
virtual Istream & read(token &t)
Return next token from stream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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 UList< surfZone > & surfZones() const
Const access to the surface zones.
const UList< Face > & surfFaces() const
Return const access to the faces.
bool useFaceMap() const
Can/should use faceMap?
const labelUList & faceIds() const
Const access to the faceIds, zero-sized when unused.
const pointField & points() const
Return const access to the points.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
Output to file stream, using an OSstream.
virtual bool read()
Re-read model coefficients if they have changed.
A List obtained as a section of another List.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
fileName lessExt() const
Return file name without extension (part before last .)
virtual bool write()
Write the output fields.
Lookup type of boundary radiation properties.
A surface zone on a MeshedSurface.
A token holds an item read from Istream.
bool isLabel() const noexcept
Token is LABEL.
label labelToken() const
Return label value.
Base class for mesh zones.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
pointField vertices(const blockVertexList &bvl)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.