- uniform use of reinterpret_cast<foo*>(0) instead of
reinterpret_cast<foo*>(NULL)
- make all static null() members inline since they are really only a cast:
"*reinterpret_cast<foo*>(0)"
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or
'XX.size() <= 0' or for simpler coding.
It also has the same number of characters as '!XX.size()' and /might/ be
more readable
- many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1'
when a simple 'XX.size()' suffices
//- 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.
- the improved side-effect of enabling -zeroTimea alters default selection
behaviour and -latestTime selection behaviour for utilities in which
accidentally using the 0/ directory can cause damage (eg, reconstructPar)
- can combine -time ranges and -latestTime
Pro: Good delimitation. Good visual distinction. No confusion with normal
cases, since '{}' characters are excluded by !word::valid()
Con: Possible quoting issues when creating directly instead of via paraFoam,
but seemed to work fine with bash TAB completion.
- handling multiple regions require multiple readers
- a region is currently recognized by the file name, anything after the
'=' delimiter (eg, "case=region.OpenFOAM") is used to determine the
mesh region, but might be changed in the future
eg, 'case%region', 'case^region', 'case~region', 'case{region}' ...
Note:
- Having a separate reader for each region instead attempting to handle
all the mesh regions in a single reader is the better solution.
It is not only simpler, but allows distinct field selections for
each region
Todo:
- Haven't a test for Lagrangian and multi-regions.