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,
140 const bool free_format
143 const auto beg =
pos;
144 const auto end = str.find(
',',
pos);
146 if (
end == std::string::npos)
152 return str.substr(beg);
157 return str.substr(beg, width);
163 return str.substr(beg, (
end - beg));
177 os.setf(std::ios_base::uppercase);
179 const label offset = 7;
181 label prec = 16 - offset;
184 case fieldFormat::SHORT :
190 case fieldFormat::LONG :
191 case fieldFormat::FREE :
209 os.setf(std::ios_base::left);
213 case fieldFormat::SHORT :
218 case fieldFormat::LONG :
220 os <<
setw(8) << word(keyword +
'*');
223 case fieldFormat::FREE :
230 os.unsetf(std::ios_base::left);
247 format == fieldFormat::SHORT ? 8
248 :
format == fieldFormat::LONG ? 16
253 const char sep = (
format == fieldFormat::FREE ?
',' :
'\0');
270 os.setf(std::ios_base::right);
286 if (
format == fieldFormat::LONG)
289 os.unsetf(std::ios_base::right);
292 os.setf(std::ios_base::right);
298 os.unsetf(std::ios_base::right);
315 auto offsetIter = decompOffsets.
begin();
318 for (
const face&
f : faces)
320 const label
n =
f.size();
322 if (
n != 3 &&
n != 4)
325 f.triangles(
points, decompFaces);
329 *(++offsetIter) = decompFaces.
size();
332 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...
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 ...