- change system/controlDict to use functions {..} instead of functions (..);
* This is internally more efficient
- fixed formatting of system/controlDict functions entry
- pedantic change: use 'return 0' instead of 'return(0)' in the applications,
since return is a C/C++ keyword, not a function.
- this (now deprecated) idiom:
for (runTime++; !runTime.end(); runTime++) { ... }
has a few problems:
* stop-on-next-write will be off-by-one (ie, doesn't work)
* function objects are not executed on exit with runTime.end()
Fixing these problems is not really possible.
- this idiom
while (runTime.run())
{
runTime++;
...
}
works without the above problems.
- OSspecific: chmod() -> chMod(), even although it's not used anywhere
- ListOps get subset() and inplaceSubset() templated on BoolListType
- added UList<bool>::operator[](..) const specialization.
Returns false (actually pTraits<bool>::zero) for out-of-range elements.
This lets us use List<bool> with lazy evaluation and no noticeable
change in performance.
- use rcIndex() and fcIndex() wherever possible.
Could check if branching or modulus is faster for fcIndex().
- UList and FixedList get 'const T* cdata() const' and 'T* data()' members.
Similar to the STL front() and std::string::data() methods, they return a
pointer to the first element without needing to write '&myList[0]', recast
begin() or violate const-ness.
- removed the previously added fileName type(), isDir(), isFile() methods.
- added optional bool parameter to isFile() function to explicitly
enable/disable the check for gzip files.
- fixed minor bugginess where the default usage of isFile() would result in
false positive matches.
- be slightly more stringent and use isDir() and isFile() instead of
exists() function when we actually know the expected type.
- renamed surface regions (formerly patches or groups) to surfZone.
- added surfMesh, but without any of the patch information needed to make it
useful for finiteArea.
- promoted coordinateSystem transformation to surfaceMeshConvert and moved
old to surfaceMeshConvertTesting.
- ditched PrimitivePatchExtra in favour of a PatchTools class that is
currently just a collection of static functions. They could equally well
live within PrimitivePatch itself, but isolated also has its advantages.
- MeshedSurface, UnsortedMeshedSurface now have 'regions' instead of
'patches' since they are more like a faceZone for meshed surfaces than
patches. This might avoid confusion at a later stage.
- 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
- string doesn't use any debug info, remove it
- restructured the macros to add in NoDebug macro versions to className,
typeInfo. Might be helpful with tackling the globals bootstrapping issue.
- HashTableName + StaticHashTableName - avoid lookup of debug switch when
FULLDEBUG is not defined
- The capitalization is consistent with most other template classes, but
more importantly frees up xfer() for use as method name without needing
special treatment to avoid ambiguities.
It seems reasonable to have different names for transfer(...) and xfer()
methods, since the transfer is occuring in different directions.
The xfer() method can thus replace the recently introduced zero-parameter
transfer() methods.
Other name candidates (eg, yield, release, etc.) were deemed too abstract.
- added boundBox(const tmp<pointField>&) constructor for use with
coordinate systems
- moved some methods from treeBoundBox to boundBox and use VectorSpace ops
//- 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.