This new approach to 0 initialization is simpler, cleaner, more readable
and more efficient. The rest of the OpenFOAM code will be updated in
due course.
Patch contributed by Bruno Santos:
- "etc/config.sh/CGAL":
- Indented the contents of the recently added if block.
- Added comment about using system versions.
- Library paths are now only added if the respective version is not "boost-system" and "cgal-system".
- "src/renumber/Allwmake":
It now relies on the previous file to get the version for
Boost (the same way as in "makeCGAL"). This is so that it will also
build "SloanRenumber" if "boost_version" is set to "boost-system".
- "applications/utilities/mesh/generation/Allwmake":
It now also relies on the script "config.sh/CGAL" to get the
version for CGAL. If "cgal_version" is set to "cgal-system", it
will now also build "foamy*Mesh" utilities and respective
libraries.
Resolves report http://www.openfoam.org/mantisbt/view.php?id=1232
The row-start pointer array provided performance benefits on old
computers but now that computation is often cache-miss limited the
benefit of avoiding a integer multiply is more than offset by the
addition memory access into a separately allocated array.
With the new addressing scheme LUsolve is 15% faster.
in terms of the rotation tensor \c E and translation vector \c r .
See Chapter 2 and Appendix A in reference:
Featherstone, R. (2008).
Rigid body dynamics algorithms.
Springer.
This work is sponsored by Carnegie Wave Energy Ltd
Henry G. Weller
CFD Direct
Based on definitions in chapter 2 of the book:
Featherstone, R. (2008).
Rigid body dynamics algorithms.
Springer.
This work is sponsored by Carnegie Wave Energy Ltd
The particular rotation sequence is specified via the enumeration:
//- Euler-angle rotation sequence
enum rotationSequence
{
ZYX, ZYZ, ZXY, ZXZ, YXZ, YXY, YZX, YZY, XYZ, XYX, XZY, XZX
};
and provided as an argument to the constructor from Euler-angles
//- Construct a quaternion given the three Euler angles:
inline quaternion
(
const rotationSequence rs,
const vector& angles
);
and conversion to Euler-angles:
//- Return a vector of euler angles corresponding to the
// specified rotation sequence
inline vector eulerAngles(const rotationSequence rs) const;
Provides '(i, j)' element access and general forms of inner and outer
products, transpose etc. for square and rectangular VectorSpaces.
VectorSpaces default to be column-vectors as before whereas row-vectors
may be represented as 1xn MatrixSpaces. In the future it may be
preferable to create a specializations of VectorSpace for column- and
maybe row-vectors but it would add complexity to MatrixSpace to handle
all the type combinations.
Tensor is now a 3x3 specialization of MatrixSpace.
Sub-block const and non-const access is provided via the
'.block<SubTensor, RowStart, ColStart>()' member functions. Consistent
sub-block access is also provide for VectorSpace so that columns of
MatrixSpaces may be accessed and substituted.
These new classes will be used to create a more extensive set of
primitive vector and tensor types over the next few weeks.
Henry G. Weller
CFD Direct
Foam::direction is an unsigned type which makes it easier for the
compiler to pickup and report errors in the instantiation of
VectorSpaces and associated types.