- handles basic operations, references to other dictionary entries
(with '$name' syntax) and assorted mathematical functions:
pi(), degToRad, radToDeg, asin, acos, atan, sin, cos, tan, log,
log10, mag, atan2, pow
The basic syntax: #calc{ ... };
NOTE the trailing ';' is required for the primitiveEntry to be
properly defined.
- Rewrote globalPoints to use globalIndex class so now only transfers
single label instead of labelPair
- Added addressing in globalMeshData
- from coupled master points to slave points
- ,, edges ,, edges
- from coupled points (master or slave) to uncoupled boundary faces
- ,, ,, cells
- See test/globalMeshData for simple test
- Previously had just 'Warning' instead of '::Foam::Warning', which
meant that an identically named class method would inadvertently be
used - resulting in a compile failure.
- resize with factor 2 as per DynamicList
Old insertion speed:
1000000 in 0.61 s
2000000 in 2.24 s
3000000 in 3.97 s
4000000 in 5.76 s
5000000 in 7.54 s
6000000 in 9.41 s
7000000 in 11.5 s
New insertion speed:
1000000 in 0.01 s
2000000 in 0.02 s
3000000 in 0.01 s
4000000 in 0.02 s
5000000 in 0.01 s
6000000 in 0.01 s
7000000 in 0.01 s
- compatibility:
* 'polySpline' and 'simpleSpline' accepted
* detect and discard end tangent specifications
- a BSpline is also included (eg, for future support of NURBS), but is
not selectable from blockMesh since it really isn't as nice as the
Catmull-Rom (ie, doesn't *exactly* go through each point).
triangle, from:
http://en.wikipedia.org/wiki/Inertia_tensor_of_triangle
Adding the ability to calculate the inertia tensor of a polygon face
by summing the triangle inertias.
Added a test application to draw a test face with its principal
axes and moments of inertia.
- now that I re-examined the code, the note in commit 51fd6327a6
can be mostly ignored
PackedList isMaster(nPoints, 1u);
is not really inefficient at all, since the '1u' is packed into
32/64-bits before the subsequent assignment and doesn't involve
shifts/masking for each index
The same misinformation applies to the PackedList(size, 0u) form.
It isn't much slower at all.
Nonetheless, add bool specialization so that it is a simple assign.
- forgot to use readList in removeEntry, which caused the test failure.
- remaining problem:
it doesn't work as might be expected
This is the problem:
dict
{
foo xxx;
bar yyy;
}
dict
{
baz zzz;
#remove foo
}
This only removes 'foo' from the current scope (the second dict), since
it occurs before the dictionary merge does.
To remove from the final, merged dictionary, we'd need a new
deleteEntry type that would do the right thing on the merge before
self-destructing (ie, removing itself too).