1. 28 Feb, 2020 1 commit
  2. 18 Feb, 2020 3 commits
    • Kutalmis Bercin's avatar
      ENH: improve analytical eigendecompositions · 55e7da67
      Kutalmis Bercin authored
        - `tensor` and `tensor2D` returns complex eigenvalues/vectors
        - `symmTensor` and `symmTensor2D` returns real eigenvalues/vectors
        - adds new test routines for eigendecompositions
        - improves numerical stability by:
          - using new robust algorithms,
          - reordering the conditional branches in root-type selection
    • Kutalmis Bercin's avatar
      STYLE: reorder global funcs and opers in Tensor types · 6a53794e
      Kutalmis Bercin authored
        - In the course of time, global funcs/opers of Tensor types expanded
          leaving funcs/opers unordered.
        - Therefore, by following the order designated in Matrix class, the order
          of global funcs and global opers are reordered:
          - oper+ oper- oper* oper/ inner-product double-inner-product outer-product
    • Kutalmis Bercin's avatar
      ENH: improve funcs and opers in Tensor types · 66b02ca5
      Kutalmis Bercin authored
        - ensures each Tensor-container operates for the following base types:
          - floatScalar
          - doubleScalar
          - complex
        - adds/improves test applications for each container and base type:
          - constructors
          - member functions
          - global functions
          - global operators
        - misc:
          - silently removes `invariantIII()` for `tensor2D` and `symmTensor2D`
            since the 3rd invariant does not exist for 2x2 matrices
          - fixes `invariantII()` algorithm for `tensor2D` and `symmTensor2D`
          - adds `Cmpt` multiplication to `Vector2D` and `Vector`
          - adds missing access funcs for symmetric containers
          - improves func/header documentations
  3. 30 Jan, 2020 1 commit
  4. 28 Jan, 2020 1 commit
  5. 19 Nov, 2019 1 commit
  6. 15 Nov, 2019 1 commit
  7. 31 Oct, 2019 1 commit
  8. 10 Oct, 2019 1 commit
  9. 29 Jul, 2019 1 commit
    • Mark Olesen's avatar
      ENH: additional contiguous traits (#1378) · 1d79c045
      Mark Olesen authored
      - change contiguous from a series of global functions to separate
        templated traits classes:
          - is_contiguous
          - is_contiguous_label
          - is_contiguous_scalar
        The static constexpr 'value' and a constexpr conversion operator
        allow use in template expressions.  The change also makes it much
        easier to define general traits and to inherit from them.
        The is_contiguous_label and is_contiguous_scalar are special traits
        for handling data of homogeneous components of the respective types.
  10. 04 Apr, 2019 1 commit
    • Mark Olesen's avatar
      ENH: add iterators to VectorSpace (#1265) · 1c4e32fb
      Mark Olesen authored
      - this adds support for various STL operations including
          * sorting, filling, find min/max element etc.
          * for-range iteration
      STYLE: use constexpr for VectorSpace rank
  11. 03 Feb, 2019 1 commit
  12. 06 Feb, 2019 1 commit
  13. 09 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add explicit doubleVector, doubleTensor typedefs · 689db160
      Mark Olesen authored
      - the counterpart to floatVector, doubleTensor, which can be useful
        for connecting to programs that always expect double precision for
        the arguments, when using single-precision for OpenFOAM itself.
           doubleVector pos = ...;
  14. 01 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improve, simplify, rationalize coordinate system handling (issue #863) · 6697bb47
      Mark Olesen authored
      Previously the coordinate system functionality was split between
      coordinateSystem and coordinateRotation. The coordinateRotation stored
      the rotation tensor and handled all tensor transformations.
      The functionality has now been revised and consolidated into the
      coordinateSystem classes. The sole purpose of coordinateRotation
      is now just to provide a selectable mechanism of how to define the
      rotation tensor (eg, axis-angle, euler angles, local axes) for user
      input, but after providing the appropriate rotation tensor it has
      no further influence on the transformations.
      The coordinateSystem class now contains an origin and a base rotation
      tensor directly and various transformation methods.
        - The origin represents the "shift" for a local coordinate system.
        - The base rotation tensor represents the "tilt" or orientation
          of the local coordinate system in general (eg, for mapping
          positions), but may require position-dependent tensors when
          transforming vectors and tensors.
      For some coordinate systems (currently the cylindrical coordinate system),
      the rotation tensor required for rotating a vector or tensor is
      The new coordinateSystem and its derivates (cartesian, cylindrical,
      indirect) now provide a uniform() method to define if the rotation
      tensor is position dependent/independent.
      The coordinateSystem transform and invTransform methods are now
      available in two-parameter forms for obtaining position-dependent
      rotation tensors. Eg,
            ... = cs.transform(globalPt, someVector);
      In some cases it can be useful to use query uniform() to avoid
      storage of redundant values.
            if (cs.uniform())
                vector xx = cs.transform(someVector);
                List<vector> xx = cs.transform(manyPoints, someVector);
      Support transform/invTransform for common data types:
         (scalar, vector, sphericalTensor, symmTensor, tensor).
        Breaking Changes
      - These changes to coordinate systems and rotations may represent
        a breaking change for existing user coding.
      - Relocating the rotation tensor into coordinateSystem itself means
        that the coordinate system 'R()' method now returns the rotation
        directly instead of the coordinateRotation. The method name 'R()'
        was chosen for consistency with other low-level entities (eg,
        The following changes will be needed in coding:
            Old:  tensor rot = cs.R().R();
            New:  tensor rot = cs.R();
            Old:  cs.R().transform(...);
            New:  cs.transform(...);
        Accessing the runTime selectable coordinateRotation
        has moved to the rotation() method:
            Old:  Info<< "Rotation input: " << cs.R() << nl;
            New:  Info<< "Rotation input: " << cs.rotation() << nl;
      - Naming consistency changes may also cause code to break.
            Old:  transformVector()
            New:  transformPrincipal()
        The old method name transformTensor() now simply becomes transform().
        New methods
      For operations requiring caching of the coordinate rotations, the
      'R()' method can be used with multiple input points:
             tensorField rots(cs.R(somePoints));
         and later
             Foam::transformList(rots, someVectors);
      The rotation() method can also be used to change the rotation tensor
      via a new coordinateRotation definition (issue #879).
      The new methods transformPoint/invTransformPoint provide
      transformations with an origin offset using Cartesian for both local
      and global points. These can be used to determine the local position
      based on the origin/rotation without interpreting it as a r-theta-z
      value, for example.
        Input format
      - Streamline dictionary input requirements
        * The default type is cartesian.
        * The default rotation type is the commonly used axes rotation
          specification (with e1/e2/3), which is assumed if the 'rotation'
          sub-dictionary does not exist.
          Compact specification:
                  origin  (0 0 0);
                  e2      (0 1 0);
                  e3      (0.5 0 0.866025);
          Full specification (also accepts the longer 'coordinateRotation'
          sub-dictionary name):
                  type    cartesian;
                  origin  (0 0 0);
                      type    axes;
                      e2      (0 1 0);
                      e3      (0.5 0 0.866025);
         This simplifies the input for many cases.
      - Additional rotation specification 'none' (an identity rotation):
                origin  (0 0 0);
                rotation { type none; }
      - Additional rotation specification 'axisAngle', which is similar
        to the -rotate-angle option for transforming points (issue #660).
        For some cases this can be more intuitive.
        For example,
                type    axisAngle;
                axis    (0 1 0);
                angle   30;
                type    axes;
                e2      (0 1 0);
                e3      (0.5 0 0.866025);
      - shorter names (or older longer names) for the coordinate rotation
           euler         EulerRotation
           starcd        STARCDRotation
           axes          axesRotation
        Coding Style
      - use Foam::coordSystem namespace for categories of coordinate systems
        (cartesian, cylindrical, indirect). This reduces potential name
        clashes and makes a clearer declaration. Eg,
            coordSystem::cartesian csys_;
        The older names (eg, cartesianCS, etc) remain available via typedefs.
      - added coordinateRotations namespace for better organization and
        reduce potential name clashes.
  15. 28 Sep, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add column access and other methods for Tensor · 4a61042f
      Mark Olesen authored
      - Can now retrieve or set a column/row of a tensor.
        Either compile-time or run-time checks.
           t.col<1>();   t.col(1);
           t.row<1>();   t.row(1);
           t.col<1>(vec);   t.col(1,vec);
           t.row<1>(vec);   t.row(1,vec);
        The templated versions are compile-time checked
        The parameter versions are run-time checked
      ENH: provide named access to tensor/tensor inner product as inner()
  16. 22 Mar, 2017 1 commit
  17. 16 Dec, 2016 1 commit
  18. 26 Nov, 2016 1 commit
  19. 28 Jun, 2016 1 commit
  20. 17 Jun, 2016 1 commit
  21. 21 Apr, 2016 1 commit
  22. 17 Apr, 2016 1 commit
  23. 22 Mar, 2016 2 commits
  24. 12 Mar, 2016 1 commit
    • Henry Weller's avatar
      MatrixSpace: 2D (i-j) specialization of VectorSpace · c14ee0ad
      Henry Weller authored
      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
  25. 10 Mar, 2016 1 commit
  26. 09 Mar, 2016 1 commit
  27. 08 Mar, 2016 1 commit
  28. 07 Mar, 2016 1 commit
  29. 06 Mar, 2016 1 commit
  30. 22 Feb, 2016 1 commit
  31. 10 Jan, 2016 1 commit
  32. 10 Nov, 2015 1 commit
  33. 28 Aug, 2014 2 commits
  34. 07 Jul, 2014 1 commit
  35. 03 Apr, 2014 1 commit
  36. 07 Feb, 2014 1 commit