41 { fieldFormat::SHORT,
"short" },
42 { fieldFormat::LONG,
"long" },
43 { fieldFormat::FREE,
"free" },
53 { loadFormat::PLOAD2,
"PLOAD2" },
54 { loadFormat::PLOAD4,
"PLOAD4" },
66 if (width)
os <<
setw(width);
77 const auto signPos = str.find_last_of(
"+-");
81 signPos == std::string::npos
83 || str[signPos-1] ==
'E' || str[signPos-1] ==
'e' 88 return readScalar(str);
100 readScalar(str.substr(0, signPos), value)
101 &&
readInt(str.substr(signPos), exponent)
106 value *=
::pow(10, exponent);
123 const std::string& str,
128 const auto beg =
pos;
129 const auto end = str.find(
',',
pos);
131 if (
end == std::string::npos)
141 return str.substr(beg, len);
154 os.setf(std::ios_base::uppercase);
156 const label offset = 7;
158 label prec = 16 - offset;
161 case fieldFormat::SHORT :
167 case fieldFormat::LONG :
168 case fieldFormat::FREE :
186 os.setf(std::ios_base::left);
190 case fieldFormat::SHORT :
195 case fieldFormat::LONG :
197 os <<
setw(8) << word(keyword +
'*');
200 case fieldFormat::FREE :
207 os.unsetf(std::ios_base::left);
224 format == fieldFormat::SHORT ? 8
225 :
format == fieldFormat::LONG ? 16
230 const char sep = (
format == fieldFormat::FREE ?
',' :
'\0');
247 os.setf(std::ios_base::right);
263 if (
format == fieldFormat::LONG)
266 os.unsetf(std::ios_base::right);
269 os.setf(std::ios_base::right);
275 os.unsetf(std::ios_base::right);
292 auto offsetIter = decompOffsets.
begin();
295 for (
const face&
f : faces)
297 const label
n =
f.size();
299 if (
n != 3 &&
n != 4)
302 f.triangles(
points, decompFaces);
306 *(++offsetIter) = decompFaces.
size();
309 return decompFaces.
size();
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A face is a list of labels corresponding to mesh vertices.
void resize(const label len)
Adjust allocated size of list.
constexpr char nl
The newline '\n' character (0x0a)
int readInt(Istream &is)
Read int from stream.
static void putValue(Ostream &os, const Type &value, const int width)
dimensionedScalar pos(const dimensionedScalar &ds)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
A class for handling words, derived from Foam::string.
graph_traits< Graph >::vertices_size_type size_type
iterator begin() noexcept
Return an iterator to begin traversing the UList.
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...
Istream and Ostream manipulators taking arguments.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
OBJstream os(runTime.globalPath()/outputName)
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
word format(conversionProperties.get< word >("format"))
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool isspace(char c) noexcept
Test for whitespace (C-locale)
Omanip< int > setw(const int i)
IOstream & scientific(IOstream &io)
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...