//- 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.
- added wmakePrintBuild -check, -update, -version options
- only update .build cache when explictly requested and
from within the wmake Cver rules
- use -check option to avoid unnecessary remake in src/Allwmake
- This was originally plan 'B', but it is actually probably more efficient
than using PtrDictionary anyhow.
- straightened out the return value logic, but it wasn't being used anywhere
anyhow.
- new 'updated_' data member avoids inadvertent execution in the read()
method when execution is turned off.
New fuels are iso/n-propanol and urea. Although urea is a bit dodgy, but that's
all of the properties Ive found so far.
I've also added a variation of temperature instead of constant temperature for
some injector-classes so Im sending you the new version of the dieselFoam
tutorial also.
- The new cmake seems to be even smarter. If we try to use env variables in
the .cmake files (eg, with And's sed fixup), they are rewritten in a
subsequent re-make and take much longer). Adjusting the compiler values
themselves causes a full remake. On the positive side, disabling the rpath
seems to mean we may not need any of this.
In summary - yuck!
- catch missing "controlDict" file immediately via findEtcFile() instead of
checking IFstream::good(). This avoids segfaulting, since the error
handling in IFstream uses classes that are not yet initialized.
- use new dictionary features (eg, lookupOrAddDefault) to reduce code
- fixed debug::switchSet to use ref-to-pointer so pointer actually gets set!
- if mandatory is true, findEtcFile() will abort with a message (via cerr).
This allows a non-existent file to be caught at the lowest level and avoid
error handling in IFstream, which might not be initialized at that stage.