This is faster than the library functionality that it replaces, as it
allows the compiler to do inlining. It also does not utilise any static
state so generators do not interfere with each other. It is also faster
than the the array lookup in cachedRandom. The cachedRandom class
therefore offers no advantage over Random and has been removed.
Tree bound boxes are expanded asymmetrically to reduce the liklihood of
octree faces aliging with mesh faces and edges. The asymmetry is now
generated using hard-coded irrational numbers, rather than using a
random generator.
The asymmetry was effectively already hard coded. The random numbers are
only pseudo random, so the same numbers were being applied to the bound
boxes every time. This change simply removes the overhead of creating
the generator, and also gets rid of some duplicated code.
Sometimes decomposition can remove a cyclic patch entirely, converting
it into a processor cyclic. If this patch is being used to specify the
transform for a cyclicRepeatAMI patch then the calculation will fail.
This change adds a check for this situation, and errors with the
suggestion that the transform patch be preserved during decomposition.
The template is designed to work with the new foamSetupCHT utility.
It works simply for cases with a single fluid region (and multiple
solid regions); it can also be adapted for cases with multiple fluid
regions. For more information see the included README file.
runApplication isn't needed for foamDictionary as it doesn't log
anything of consequence. Using runApplication leads to false unconfirmed
completion warnings in the test loop as foamDictionary does not generate
an end statement.
The use of random numbers for positioning within the cone injection
models has been made consistent across all cores. Some calls have been
synchronised by means of the globalSample methods, whilst others have
been replaced by non-randomised algorithms.
This resolves bug report https://bugs.openfoam.org/view.php?id=2956