42 namespace coordSetWriters
63 precision_(
IOstream::defaultPrecision())
79 options.getOrDefault(
"precision",
IOstream::defaultPrecision())
95 open(coords, outputPath);
108 open(tracks, outputPath);
124 const bool old(buffering_);
139 return getExpectedPath(
"xy");
150 const auto& coords = coords_[0];
163 OFstream
os(outputFile, streamOpt_);
164 os.precision(precision_);
166 writeBufferContents(
os, coords,
" \t");
177 const word& fieldName,
187 if (useTracks_ || !buffering_)
190 return writeTemplate(fieldName, fieldPtrs);
202 const word& fieldName,
214 return writeTemplate(fieldName, fieldPtrs);
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual fileName path() const
Characteristic output file name - information only.
A coordSet(s) in raw format.
static const fileName null
An empty fileName.
defineCoordSetWriterWriteFields(Foam::coordSetWriters::rawWriter)
virtual bool buffering() const
True if the format uses internal buffering (eg, column output)
A simple container for options an IOstream can normally have.
static std::string path(const std::string &str)
Return directory path name (part before last /)
Macros for easy insertion into run-time selection tables.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
virtual ~rawWriter()
Destructor. Calls close()
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Convenience macros for instantiating coordSetWriter methods.
Holds list of sampling positions.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Generic templated field type.
A class for handling words, derived from Foam::string.
defineTypeName(csvWriter)
rawWriter()
Default construct.
Base class for writing coordSet(s) and tracks with fields.
bool buffering_
Writer with buffering output.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
OBJstream os(runTime.globalPath()/outputName)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
virtual bool writeBuffered()
Write buffered data.
addToRunTimeSelectionTable(coordSetWriter, csvWriter, word)
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...