45 inline void Foam::rawSurfaceWriter::writeLocation
52 const point& pt = points[pointi];
53 os << pt.
x() <<
' ' << pt.y() <<
' ' << pt.z() <<
' ';
57 inline void Foam::rawSurfaceWriter::writeLocation
66 os << ct.
x() <<
' ' << ct.y() <<
' ' << ct.z() <<
' ';
73 void Foam::rawSurfaceWriter::writeHeader
76 const word& fieldName,
81 <<
"# x y z " << fieldName <<
nl;
86 void Foam::rawSurfaceWriter::writeHeader
89 const word& fieldName,
103 void Foam::rawSurfaceWriter::writeHeader
106 const word& fieldName,
112 << fieldName <<
"_ii" <<
nl;
117 void Foam::rawSurfaceWriter::writeHeader
120 const word& fieldName,
125 <<
"# xx xy xz yy yz ";
126 for (
int i=0; i<6; ++i)
128 os << fieldName <<
"_" << i <<
" ";
135 void Foam::rawSurfaceWriter::writeHeader
138 const word& fieldName,
143 <<
"# xx xy xz yx yy yz zx zy zz";
144 for (
int i=0; i<9; ++i)
146 os << fieldName <<
"_" << i <<
" ";
153 inline void Foam::rawSurfaceWriter::writeData
164 inline void Foam::rawSurfaceWriter::writeData
170 os << v[0] <<
' ' << v[1] <<
' ' << v[2] <<
nl;
175 inline void Foam::rawSurfaceWriter::writeData
186 inline void Foam::rawSurfaceWriter::writeData
192 os << v[0] <<
' ' << v[1] <<
' ' << v[2] <<
' ' 193 << v[3] <<
' ' << v[4] <<
' ' << v[5] <<
nl;
198 inline void Foam::rawSurfaceWriter::writeData
204 os << v[0] <<
' ' << v[1] <<
' ' << v[2] <<
' ' 205 << v[3] <<
' ' << v[4] <<
' ' << v[5] <<
' ' 206 << v[6] <<
' ' << v[7] <<
' ' << v[8] <<
nl;
213 void Foam::rawSurfaceWriter::writeTemplate
219 const word& fieldName,
221 const bool isNodeValues,
225 if (!
isDir(outputDir))
232 outputDir/fieldName +
'_' + surfaceName +
".raw",
240 Info<<
"Writing field " << fieldName <<
" to " << os.
name() <<
endl;
244 os <<
"# " << fieldName;
247 os <<
" POINT_DATA ";
255 writeHeader(os, fieldName, values);
262 writeLocation(os, points, elemI);
270 writeLocation(os, points, faces, elemI);
283 writeCompression_(
IOstream::UNCOMPRESSED)
290 writeCompression_(
IOstream::UNCOMPRESSED)
292 if (options.
found(
"compression"))
317 if (!
isDir(outputDir))
324 outputDir/surfaceName +
".raw",
337 os <<
"# geometry NO_DATA " << faces.
size() <<
nl 343 writeLocation(os, points, faces, elemI);
#define forAll(list, i)
Loop across all elements in list.
A surfaceWriter for raw output.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static compressionType compressionEnum(const word &)
Return compression of given compression name.
A class for handling file names.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Vector< Cmpt > & centre(const Foam::List< Vector< Cmpt >> &) const
Return *this (used for point which is a typedef to Vector<scalar>.
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component, element access using th ii() member function and the inner-product (dot-product) and outer-product operators.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
vectorField pointField
pointField is a vectorField.
virtual ~rawSurfaceWriter()
Destructor.
A class for handling words, derived from string.
Convenience macros for instantiating writer methods for surfaceWriter classes.
defineSurfaceWriterWriteFields(nastranSurfaceWriter)
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void write(const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const bool verbose=false) const
Write single surface geometry to file.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Istream and Ostream manipulators taking arguments.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const bool writeData(readBool(pdfDictionary.lookup("writeData")))
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
vector point
Point is a vector.
static const versionNumber currentVersion
Current version number.
rawSurfaceWriter()
Construct null.
Base class for surface writers.
const fileName & name() const
Return the name of the stream.
makeSurfaceWriterType(dxSurfaceWriter)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.