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,
124 std::string::size_type&
pos,
125 std::string::size_type len
128 const auto beg =
pos;
129 const auto end = str.find(
',',
pos);
131 if (end == std::string::npos)
141 return str.substr(beg, len);
151 os.setf(std::ios_base::scientific);
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 :
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();
Istream and Ostream manipulators taking arguments.
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.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
void resize(const label len)
Adjust allocated size of list.
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...
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
A face is a list of labels corresponding to mesh vertices.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
@ GENERAL
General parsing error.
const Foam::Enum< errorType > errorNames
Strings corresponding to the errorType.
dimensionedScalar pos(const dimensionedScalar &ds)
bool isspace(char c) noexcept
Test for whitespace (C-locale)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Omanip< int > setw(const int i)
int readInt(Istream &is)
Read int from stream.
static void putValue(Ostream &os, const Type &value, const int width)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
word format(conversionProperties.get< word >("format"))