43 NASCore, Nastran,
"nastran.debug" 55 { fieldFormat::SHORT,
"short" },
56 { fieldFormat::LONG,
"long" },
57 { fieldFormat::FREE,
"free" },
67 { loadFormat::PLOAD2,
"PLOAD2" },
68 { loadFormat::PLOAD4,
"PLOAD4" },
80 if (width)
os <<
setw(width);
91 const auto signPos = str.find_last_of(
"+-");
95 signPos == std::string::npos
97 || str[signPos-1] ==
'E' || str[signPos-1] ==
'e' 102 return readScalar(str);
114 readScalar(str.substr(0, signPos), value)
115 &&
readInt(str.substr(signPos), exponent)
120 value *=
::pow(10, exponent);
137 const std::string& str,
142 const auto beg =
pos;
143 const auto end = str.find(
',',
pos);
145 if (
end == std::string::npos)
155 return str.substr(beg, len);
168 os.setf(std::ios_base::uppercase);
170 const label offset = 7;
172 label prec = 16 - offset;
175 case fieldFormat::SHORT :
181 case fieldFormat::LONG :
182 case fieldFormat::FREE :
200 os.setf(std::ios_base::left);
204 case fieldFormat::SHORT :
209 case fieldFormat::LONG :
211 os <<
setw(8) << word(keyword +
'*');
214 case fieldFormat::FREE :
221 os.unsetf(std::ios_base::left);
238 format == fieldFormat::SHORT ? 8
239 :
format == fieldFormat::LONG ? 16
244 const char sep = (
format == fieldFormat::FREE ?
',' :
'\0');
261 os.setf(std::ios_base::right);
277 if (
format == fieldFormat::LONG)
280 os.unsetf(std::ios_base::right);
283 os.setf(std::ios_base::right);
289 os.unsetf(std::ios_base::right);
306 auto offsetIter = decompOffsets.
begin();
309 for (
const face&
f : faces)
311 const label
n =
f.size();
313 if (
n != 3 &&
n != 4)
316 f.triangles(
points, decompFaces);
320 *(++offsetIter) = decompFaces.
size();
323 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.
Macro definitions for debug switches.
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 ...