Commit Graph

13 Commits

Author SHA1 Message Date
Mark Olesen
5a121119e6 ENH: add -verbose support into argList
- similar to -dry-run handling, can be interrogated from argList,
  which makes it simpler to add into utilities.

- support multiple uses of -dry-run and -verbose to increase the
  level. For example, could have

    someApplication -verbose -verbose

 and inside of the application:

    if (args.verbose() > 2) ...

BUG: error with empty distributed roots specification (fixes #2196)

- previously used the size of distributed roots to transmit if the
  case was running in distributed mode, but this behaves rather poorly
  with bad input. Specifically, the following questionable setup:

      distributed true;
      roots ( /*none*/ );

  Now transmit the ParRunControl distributed() value instead,
  and also emit a gentle warning for the user:

      WARNING: running distributed but did not specify roots!
2021-11-09 15:44:54 +01:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
6c8f6a2f50 ENH: support all 12 Euler rotation orders (#1292)
- adjust naming of quaternion 'rotationSequence' to be 'eulerOrder'
  to reflect its purpose.

- provide rotation matrices directly for these rotation orders in
  coordinateRotations::euler for case in which the rotation tensor
  is required but not a quaternion.
2019-05-10 11:20:21 +02:00
Mark Olesen
3089a11647 STYLE: comments and parameter names for coordinateRotations::euler 2019-05-03 13:31:00 +02:00
Mark Olesen
e1609d16d1 STYLE: use degToRad() instead of pi/180 2019-04-26 11:48:27 +02:00
Mark Olesen
661d1f53df ENH: additional rotation tests (#1292) 2019-04-25 20:22:06 +02:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
345a2a42f1 ENH: simplify method names for reading argList options and arguments
- use succincter method names that more closely resemble dictionary
  and HashTable method names. This improves method name consistency
  between classes and also requires less typing effort:

    args.found(optName)        vs.  args.optionFound(optName)
    args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
    ...
    args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
    args.read<scalar>(index)   vs.  args.argRead<scalar>(index)

- the older method names forms have been retained for code compatibility,
  but are now deprecated
2018-01-08 15:35:18 +01:00
Mark Olesen
00325db33b ENH: additional options for transforming points (closes #660)
- The -rotate-angle option allows convenient specification of a
  rotation about an arbitrary axis. Eg, -rotate-angle '((1 1 1) 45)'

- The -origin option can be used to temporarily shift the origin
  for the rotation operations. For example,

      -origin '(0 0 1)' -rotate-angle '((1 0 0) 180)'

  for mirroring.
2017-12-19 11:24:08 +01:00
Henry Weller
75c7b7b239 quaternion/septernion: Added multi- quaternion/septernion averaging
Using method based on
http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20070017872.pdf
but simplified for the case where the quaternions are similar.
2016-04-16 15:59:05 +01:00
Henry Weller
23a8779379 septernion: Changed definition of the forward transformation for consistency with spatialTransform
inline Foam::vector Foam::septernion::transformPoint(const vector& v) const
{
    return r().transform(v - t());
}

Now there is a 1:1 correspondence between septernion and
spatialTransform and a septernion constructor from spatialTransform
provided.

Additionally "septernion::transform" has been renamed
"septernion::transformPoint" to clarify that it transforms coordinate
points rather than displacements or other relative vectors.
2016-04-15 11:27:18 +01:00
Henry Weller
b4ebcd770f quaternion: Added generalized construction from and conversion to Euler-angles
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;
2016-03-14 08:07:42 +00:00
Mark Olesen
499d48cfdb STYLE: uniform 'Test-' prefix for all applications/test
- easier to clean, avoid confusion with 'real' applications, etc.
2010-11-23 16:26:04 +01:00