40namespace coordSetWriters
57 if (width)
os <<
setw(width);
66Foam::Ostream& Foam::coordSetWriters::nastranWriter::writeKeyword
84 if (writeFormat_ == fieldFormat::FREE)
96 fileFormats::NASCore::fieldFormatNames.getOrDefault
105 if (writeFormat_ == fieldFormat::FREE)
121 open(coords, outputPath);
134 open(tracks, outputPath);
153 return getExpectedPath(
"nas");
171 writeFormat_ == fieldFormat::SHORT ? 8
172 : writeFormat_ == fieldFormat::LONG ? 16
177 const char sep = (writeFormat_ == fieldFormat::FREE ?
',' :
'\0');
184 label globalPointi = 0;
185 for (
const coordSet& coords : coords_)
187 for (
const point&
p : coords)
191 os,
p, globalPointi, writeFormat_
201 label globalEdgei = 0;
203 for (label tracki = 0; tracki < nTracks; ++tracki)
205 const label
nEdges = (coords_[tracki].size() - 1);
207 for (label edgei = 0; edgei <
nEdges; ++edgei)
209 writeKeyword(
os,
"PLOTEL");
234 const word& fieldName,
250 Info<<
"Writing nastran geometry to " << outputFile <<
endl;
263 <<
"BEGIN BULK" <<
nl;
267 os <<
"ENDDATA" <<
nl;
277 const word& fieldName,
293 Info<<
"Writing nastran geometry to " << outputFile <<
endl;
306 <<
"BEGIN BULK" <<
nl;
310 os <<
"ENDDATA" <<
nl;
Istream and Ostream manipulators taking arguments.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Generic templated field type.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Output to file stream, using an OSstream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
void writeGeometry()
Write the mesh.
Base class for writing coordSet(s) and tracks with fields.
virtual void open(const fileName &outputPath)
Write separate geometry to file.
Write coordSet(s) as Nastran plot lines. Does not do field data.
virtual fileName path() const
Characteristic output file name - information only.
nastranWriter()
Default construct.
virtual ~nastranWriter()
Destructor. Calls close()
Holds list of sampling positions.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
static std::string nameLessExt(const std::string &str)
Return basename, without extension.
static const fileName null
An empty fileName.
static std::string path(const std::string &str)
Return directory path name (part before last /)
A class for handling words, derived from Foam::string.
#define defineTypeName(Type)
Define the typeName.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
Convenience macros for instantiating coordSetWriter methods.
#define defineCoordSetWriterWriteFields(ThisClass)
OBJstream os(runTime.globalPath()/outputName)
const labelList nEdges(UPstream::listGatherValues< label >(aMesh.nEdges()))
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Omanip< int > setw(const int i)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void putValue(Ostream &os, const Type &value, const int width)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
constexpr char nl
The newline '\n' character (0x0a)