- For example,
// optionally define extra controls for the output formats
formatOptions
{
ensight
{
format binary;
}
}
These are passed to the writer that support a dictionary of options.
Otherwise the normal null constructor is used.
- easier (more logical) when adding a new writer
ENH: add surface field writer for 'starcd' format
- creates *.usr files, which can be read in proSTAR with the 'getuser'
command, but which can also be parsed directly since the format is
extremely primitive
//- Does the surface need an update?
virtual bool needsUpdate() const = 0;
//- Mark the surface as needing an update.
// May also free up unneeded data.
// Return false if surface was already marked as expired.
virtual bool expire() = 0;
//- Update the surface as required.
// Do nothing (and return false) if no update was required
virtual bool update() = 0;
The constructors for the derived classes should generally start in a
'expired' condition (ie, needsUpdate() == true) and rely on a subsequent
call to the update() method to complete the initialization. Delaying the
final construction as late as possible allows the construction of
surfaces that may depend on intermediate calculation results (eg,
iso-surfaces) and also avoids the unnecessary reconstruction of surfaces
between sampling intervals.
It is the responsibility of the caller to ensure that the surface
update() is called before the surface is used. The update() method
implementation should do nothing when the surface is already up-to-date.