Go to the documentation of this file.
41 const label cellTableId
48 <<
' ' << starcdShellType;
53 for (
const label pointi :
f)
59 os <<
' ' << pointi + 1;
91 Map<word> cellTableLookup = readInpCellTable
93 IFstream(starFileName(baseName, STARCDCore::INP_FILE))()
103 IFstream(starFileName(baseName, STARCDCore::VRT_FILE))(),
104 this->storedPoints(),
112 mapPointId.insert(pointId[i], i);
119 IFstream is(starFileName(baseName, STARCDCore::CEL_FILE));
123 <<
"Cannot read file " << is.
name()
127 readHeader(is, STARCDCore::HEADER_CEL);
139 label ignoredLabel, shapeId, nLabels, cellTableId, typeId;
152 vertexLabels.
clear();
156 for (
label i = 0; i < nLabels; ++i)
166 vertexLabels.
append(mapPointId[vrtId]);
169 if (typeId == starcdShellType)
172 const auto iterGroup =
lookup.cfind(cellTableId);
173 if (iterGroup.found())
175 if (zoneId != *iterGroup)
184 zoneId = dynSizes.size();
185 lookup.insert(cellTableId, zoneId);
187 const auto iterTableName = cellTableLookup.cfind(cellTableId);
189 if (iterTableName.found())
191 dynNames.
append(*iterTableName);
209 f.triangles(this->
points(), nTri, trias);
211 for (
const face& tri : trias)
214 dynFaces.
append(Face(tri));
219 else if (nLabels >= 3)
229 this->sortFacesAndStore(dynFaces, dynZones, sorted);
232 this->addZones(dynSizes, dynNames);
233 this->addZonesToFaces();
254 ? surfaceFormatsCore::oneZone(faceLst)
258 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
264 OFstream(starFileName(baseName, STARCDCore::VRT_FILE))(),
267 OFstream os(starFileName(baseName, STARCDCore::CEL_FILE));
278 for (
label i=0; i<nLocalFaces; ++i)
280 const Face&
f = faceLst[
faceMap[faceIndex++]];
281 writeShell(os,
f, faceIndex, zonei + 1);
286 for (
label i=0; i<nLocalFaces; ++i)
288 const Face&
f = faceLst[faceIndex++];
289 writeShell(os,
f, faceIndex, zonei + 1);
297 OFstream(starFileName(baseName, STARCDCore::INP_FILE))(),
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
bool useFaceMap() const
Use faceMap?
Input from file stream, using an ISstream.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
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.
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 .)
static void writeHeader(Ostream &os, const word &fieldName)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
void reserve(const label nElem)
Reserve allocation space for at least this size.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
#define forAll(list, i)
Loop across all elements in list.
bool isLabel() const
Token is LABEL.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const complex &c)
Return string representation of complex.
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void clear()
Clear the addressed list, i.e. set the size to zero.
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)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
#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.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
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.
bool good() const
Return true if next operation might succeed.
const UList< surfZone > & surfZones() const
Const access to the surface zones.