39Foam::fileFormats::STARCDCore::fileHeaders_
41 { fileHeader::HEADER_CEL,
"PROSTAR_CELL" },
42 { fileHeader::HEADER_VRT,
"PROSTAR_VERTEX" },
43 { fileHeader::HEADER_BND,
"PROSTAR_BOUNDARY" },
51Foam::fileFormats::STARCDCore::fileExtensions_
53 { fileExt::CEL_FILE,
"cel" },
54 { fileExt::VRT_FILE,
"vrt" },
55 { fileExt::BND_FILE,
"bnd" },
56 { fileExt::INP_FILE,
"inp" },
61 "Default_Boundary_Region";
64 "Default_Boundary_Solid";
70 { starcdHex, { 4, 5, 2, 3, 0, 1 } },
71 { starcdPrism, { 0, 1, 4, 5, 2, -1 } },
72 { starcdTet, { 5, 4, 2, 0, -1, -1 } },
73 { starcdPyr, { 0, 4, 3, 5, 2, -1 } }
80 { starcdHex, { 4, 5, 2, 3, 0, 1 } },
81 { starcdPrism, { 0, 1, 4, -1, 2, 3 } },
82 { starcdTet, { 3, -1, 2, -1, 1, 0 } },
83 { starcdPyr, { 0, -1, 4, 2, 1, 3 } }
99 while ((is) && ch !=
'\n');
142 if (magic != fileHeaders_[header])
144 Info<<
"Header mismatch " << fileHeaders_[header]
161 os << fileHeaders_[header] <<
nl
182 return base +
'.' + fileExtensions_[ext];
188 Foam::rm(starFileName(base, VRT_FILE));
189 Foam::rm(starFileName(base, CEL_FILE));
190 Foam::rm(starFileName(base, BND_FILE));
191 Foam::rm(starFileName(base, INP_FILE));
208 <<
"Cannot read file " << is.
name()
212 readHeader(is, HEADER_VRT);
230 maxId =
max(maxId, starVertexId);
233 dynPointId.
append(starVertexId);
237 points.transfer(dynPoints);
248 const scalar scaleFactor
257 os.setf(std::ios::showpoint);
259 label starVertId = 1;
266 << scaleFactor *
p.x() <<
' '
267 << scaleFactor *
p.y() <<
' '
268 << scaleFactor *
p.z() <<
nl;
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
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.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Input from file stream, using an ISstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
bool good() const noexcept
True if next operation might succeed.
Generic input stream using a standard (STL) stream.
ISstream & get(char &c)
Raw, low-level get character function.
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 transfer(List< T > &list)
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void removeFiles() const
Remove all files from mesh instance()
A class for handling file names.
A token holds an item read from Istream.
bool isLabel() const noexcept
Token is LABEL.
label labelToken() const
Return label value.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
bool rm(const fileName &file)
Remove a file (or its gz equivalent), returning true if successful.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
static void readToNewline(ISstream &is)
static void writeHeader(Ostream &os, const word &fieldName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
vector point
Point is a vector.
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)