Core routines used when reading/writing NASTRAN files. More...
Public Types | |
enum | fieldFormat { SHORT, LONG, FREE } |
File field formats. More... | |
enum | loadFormat { PLOAD2, PLOAD4 } |
Output load format. More... | |
Public Member Functions | |
NASCore ()=default | |
Default construct. More... | |
Static Public Member Functions | |
static scalar | readNasScalar (const std::string &str) |
Extract numbers from things like "-2.358-8" (same as "-2.358e-8") More... | |
static std::string | nextNasField (const std::string &str, std::string::size_type &pos, std::string::size_type len) |
A string::substr() to handle fixed-format and free-format NASTRAN. More... | |
static void | setPrecision (Ostream &os, const fieldFormat format) |
Set output stream precision and format flags. More... | |
static Ostream & | writeKeyword (Ostream &os, const word &keyword, const fieldFormat format) |
static label | faceDecomposition (const UList< point > &points, const UList< face > &faces, labelList &decompOffsets, DynamicList< face > &decompFaces) |
Calculate face decomposition for non tri/quad faces. More... | |
Static Public Attributes | |
static const Enum< fieldFormat > | fieldFormatNames |
Selection names for the NASTRAN file field formats. More... | |
static const Enum< loadFormat > | loadFormatNames |
Selection names for the NASTRAN file field formats. More... | |
Core routines used when reading/writing NASTRAN files.
enum fieldFormat |
enum loadFormat |
|
default |
Default construct.
|
static |
Extract numbers from things like "-2.358-8" (same as "-2.358e-8")
Definition at line 60 of file NASCore.C.
References Foam::parsing::errorNames, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::parsing::GENERAL, Foam::isspace(), Foam::pow(), and Foam::readInt().
|
static |
A string::substr() to handle fixed-format and free-format NASTRAN.
Returns the substr to the next comma (if found) or the given length
str | The string to extract from |
pos | On input, the position of the first character of the substring. On output, advances to the next position to use. |
len | The fixed-format length to use if a comma is not found. |
Definition at line 107 of file NASCore.C.
References stdFoam::end(), and Foam::pos().
|
static |
Set output stream precision and format flags.
Definition at line 131 of file NASCore.C.
References format(), os(), and Foam::scientific().
Referenced by nastranWriter::write().
|
static |
Write initial keyword (eg, 'GRID' or 'GRID*') followed by the requisite number of spaces for the field-width
Definition at line 165 of file NASCore.C.
References format(), os(), and Foam::setw().
Referenced by nastranSetWriter< Type >::write().
|
static |
Calculate face decomposition for non tri/quad faces.
points | the surface points |
faces | the surface faces |
decompOffsets | begin/end offsets (size+1) into decompFaces |
decompFaces | List of non-tri/quad decomposed into triangles |
Definition at line 201 of file NASCore.C.
References DynamicList< T, SizeMin >::clear(), f(), n, points, List< T >::resize(), and UList< T >::size().
|
static |
|
static |
Selection names for the NASTRAN file field formats.
Definition at line 81 of file NASCore.H.
Referenced by nastranWriter::nastranWriter().