Extract the FieldMatrix helper from affine geometry
Summary
The FieldMatrixHelper
struct provides some special matrix-matrix-vector operations for the matrix appearing in the geometry classes. This helper struct was originally part of the affinegeometry.hh
header, but was already used in other geometry implementations. With this MR, we move the implementation into a separate file, clean it up a little and add some documentation.
It would be better to have these functions in dune-common available, but they are very special, e.g., make use of triangular or d´symmetry structure of the matrix. So, also if moved into dune-common they need special names or a new signature. This would be a bigger change and is not proposed here yet.
Merge request reports
Activity
- Resolved by Simon Praetorius
- Resolved by Simon Praetorius
- Resolved by Simon Praetorius
added 1 commit
- e49e8e4d - Remove some changes compared to the old implementation and redirect to existing implementations
- dune/geometry/utility/defaultmatrixhelper.hh 0 → 100644
68 { 69 for( int j = 0; j <= i; ++j ) 70 { 71 ret[ i ][ j ] = ctype( 0 ); 72 for( int k = 0; k < m; ++k ) 73 ret[ i ][ j ] += A[ k ][ i ] * A[ k ][ j ]; 74 } 75 } 76 } 77 78 //! Compute A^T*A and store the result in ret 79 template< int m, int n > 80 [[ deprecated("Use FMatrixHelp::multTransposedMatrix(A,ret)") ]] 81 static void ATA ( const FieldMatrix< ctype, m, n > &A, FieldMatrix< ctype, n, n > &ret ) 82 { 83 return FMatrixHelp::multTransposedMatrix(A,ret); The implementation of
FMatrixHelp::multTransposedMatrix
is slightly different from the old code here. This has no effect on the performance, though. The old implementation explicitly made the result symmetric and computed only half of the entries.Edited by Simon Praetorius
mentioned in issue #30
added 74 commits
-
e49e8e4d...d3fe49f2 - 72 commits from branch
master
- 379a9b19 - Extract the FieldMatrix helper from affine geometry
- 38387151 - Remove some changes compared to the old implementation and redirect to existing implementations
-
e49e8e4d...d3fe49f2 - 72 commits from branch
added 1 commit
- 65dd6514 - Use the new header in more geometry implementations