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,
138 std::string::size_type&
pos,
139 const std::string::size_type width,
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));
174 os.setf(std::ios_base::scientific);
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();
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.
Macro definitions for debug switches.
#define registerDebugSwitchWithName(Type, Tag, Name)
Define the debug information, lookup as Name.
#define defineDebugSwitchWithName(Type, Name, Value)
Define the debug information, lookup as Name.
#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)
List< label > labelList
A List of labels.
constexpr bool isspace(char c) noexcept
Test for whitespace (C-locale only).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Omanip< int > setw(const int i)
int readInt(Istream &is)
Read int from stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
vector point
Point is a vector.
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"))