39 Foam::fileFormats::STARCDCore::fileHeaders_
41 { fileHeader::HEADER_CEL,
"PROSTAR_CELL" },
42 { fileHeader::HEADER_VRT,
"PROSTAR_VERTEX" },
43 { fileHeader::HEADER_BND,
"PROSTAR_BOUNDARY" },
51 Foam::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));
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);
232 dynPoints.append(
point(
x,
y, z));
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;
A class for handling file names.
static void writeHeader(Ostream &os, const word &fieldName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void readToNewline(ISstream &is)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
A token holds an item read from Istream.
virtual Istream & read(token &t)
Return next token from stream.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void fileHeader(std::ostream &os, const std::string &title, bool binary)
Emit header for legacy file (vtk DataFile Version 2.0)
A class for handling words, derived from Foam::string.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
Input from file stream, using an ISstream.
virtual const fileName & name() const
Read/write access to the name of the stream.
Generic input stream using a standard (STL) stream.
vector point
Point is a vector.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
bool good() const noexcept
True if next operation might succeed.
label labelToken() const
Return label value.
bool isLabel() const noexcept
Token is LABEL.
messageStream Info
Information stream (stdout output on master, null elsewhere)
ISstream & get(char &c)
Raw, low-level get character function.
A HashTable to objects of type <T> with a label key.
bool rm(const fileName &file)
Remove a file (or its gz equivalent), returning true if successful.