![]() |
KASKADE 7 development version
|
Classes and functions for basic vector and matrix arithmetics. More...
Topics | |
| Linear equations and similar problems | |
| Eigenvalue problems | |
Classes | |
| class | Kaskade::LinearProductSpace< Scalar_, Seq > |
| class | Kaskade::DynamicMatrix< K > |
| A LAPACK-compatible dense matrix class with shape specified at runtime. More... | |
| class | Kaskade::LocalMatrix< Entry, diagonal, SortedRowIdx, SortedColIdx > |
| Providing a matrix or array interface to LAPACK-ordered entries. More... | |
| class | Kaskade::LocalMatrices< Entry, diagonal, SortedRowIdx, SortedColIdx, IT, IndexType > |
| A structure for holding a sequence of several local matrices to be filled sequentially and to be scattered jointly. More... | |
| class | Kaskade::LocalVector< Entry, SortedIdx > |
| Providing a vector interface for contiguously stored entries. More... | |
| class | Kaskade::LocalVectors< Entry, SortedIdx, Vector > |
| A structure for holding a sequence of several local vectors to be filled sequentially and to be scattered jointly. More... | |
| struct | Kaskade::MatrixTraits< Matrix > |
| Defines domain and range types for matrix classes. More... | |
| class | Kaskade::NumaDenseMatrix< Entry > |
| A dense matrix class tailored towards NUMA architectures. More... | |
| class | Kaskade::NumaVector< Entry > |
| A vector class tailored towards NUMA architectures. This vector distributes its entries in blocks of approximately equal size to the different nodes of NUMA machines in order to exploit the larger accumulated memory bandwidth for fast vector operations. This is most beneficial for large vectors exceeding the cache of the CPUs. Modern processors (2015-01-01) have up to 6MB 3rd level cache, so this is intended for vectors of more than 50,000 doubles, say. More... | |
| class | Kaskade::DualPairing< X, Xstar > |
| Abstract base class for dual pairing of \( X \) and its dual space \( X^* \). More... | |
| class | Kaskade::DefaultDualPairing< X, Xstar > |
| Default implementation of dual pairing (relies on scalar product operator * being defined) More... | |
| class | Kaskade::ZeroDualPairing< X, Xstar > |
| Zero dual pairing implementation (mainly useful whenever a dual pairing is needed for formal language reasons, but never used) More... | |
| class | Kaskade::SymmetricLinearOperator< X, Xstar > |
| Interface for symmetric linear operators. More... | |
| class | Kaskade::SymmetricMatrixOperator< X, Matrix > |
| A symmetric operator represented by a matrix. More... | |
| class | Kaskade::SymmetricLinearOperatorWrapper< X, Xstar > |
| Wrapper class to present (hopefully) symmetric linear operators in the SymmetricLinearOperator interface. More... | |
| class | Kaskade::SymmetricPreconditioner< X, Xstar > |
| Interface for symmetric preconditioners. More... | |
| class | Kaskade::IdentityPreconditioner< X > |
| The trivial (identity) preconditioner. More... | |
| class | Kaskade::SymmetricPreconditionerWrapper< X, Xstar > |
| Wrapper class presenting a symmetric preconditioner interface for any preconditioner. More... | |
| struct | Kaskade::StaticIndexRange< first, last > |
| A compile-time index range. More... | |
| class | Kaskade::Tensor< Entry, Size0, Sizes > |
| A class for representing tensors of arbitrary static rank and extents. More... | |
| class | Kaskade::NumaCRSPatternCreator< Index > |
| A NUMA-aware creator for matrix sparsity patterns. More... | |
| class | Kaskade::NumaCRSPattern< Index > |
| A NUMA-aware compressed row storage sparsity pattern. More... | |
| class | Kaskade::NumaBCRSMatrix< Entry, Index > |
| A NUMA-aware compressed row storage matrix adhering mostly to the Dune ISTL interface (to complete...) More... | |
| class | Kaskade::ThreadedMatrixDetail::CRSChunkPatternInfo< Index > |
| A base class representing basic meta information about sparsity patterns of NUMA matrix chunks. More... | |
| class | Kaskade::ThreadedMatrixDetail::CRSChunkPatternCreator< Index > |
| A class supporting two-stage construction of sparsity patterns of NUMA matrix chunks. More... | |
| class | Kaskade::ThreadedMatrixDetail::CRSChunkPattern< Index > |
| This class maintains the sparsity structure of a couple of matrix rows (a NUMA matrix chunk). More... | |
| class | Kaskade::ThreadedMatrixDetail::CRSChunk< Entry, Index > |
| This class stores a couple of compressed row storage rows in memory allocated locally on a NUMA node. More... | |
| class | Kaskade::MatrixAsTriplet< Scalar, SparseIndexInt > |
| class | Kaskade::Determinant< dim, Scalar, byValue > |
| A class for computing determinants and their derivatives. More... | |
Typedefs | |
| template<int m, class LinearProductSpace> | |
| using | Component = typename LinearProductSpace::template Component<m> |
| The type of the m-th component of a product space. | |
Functions | |
| template<class CoordType, int dim, std::enable_if_t< std::is_floating_point_v< CoordType >, int > = 0> | |
| Dune::FieldVector< CoordType, dim > | Kaskade::projectToUnitSimplex (Dune::FieldVector< CoordType, dim > x) |
| Projects a vector onto the unit simplex. | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | Dune::operator+ (Dune::FieldVector< T, n > x, Dune::FieldVector< T, n > const &y) |
| Vector addition \( (x,y) \mapsto x+y \). | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | Dune::operator- (Dune::FieldVector< T, n > x) |
| Vector negation \( x \mapsto - x \). | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | Dune::max (Dune::FieldVector< T, n > x, Dune::FieldVector< T, n > const &y) |
| Componentwise maximum. | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | Dune::min (Dune::FieldVector< T, n > x, Dune::FieldVector< T, n > const &y) |
| Componentwise minimum. | |
| template<class T, int n, int m> | |
| Dune::FieldVector< T, n *m > | Dune::asVector (Dune::FieldMatrix< T, n, m > const &x) |
| Converts a matrix of size n x m to a vector of size n*m by concatenating all the columns. | |
| template<int n, int m, class T> | |
| Dune::FieldMatrix< T, n, m > | Dune::asMatrix (Dune::FieldVector< T, n *m > const &x) |
| Converts a vector of size nm to a matrix of size n x m by filling columns successively. | |
| template<class T, int n, int m> | |
| Dune::FieldMatrix< T, n, m > | Dune::outerProduct (Dune::FieldVector< T, n > const &x, Dune::FieldVector< T, m > const &y) |
| outer vector product \( (x,y) \mapsto x y^T \). | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | Dune::normalize (Dune::FieldVector< T, n > x) |
| returns the normalized vector | |
| template<class T, int n, int m> | |
| Dune::FieldVector< T, n+m > | Dune::vertcat (Dune::FieldVector< T, n > const &x, Dune::FieldVector< T, m > const &y) |
| Concatenation of vectors. | |
| template<class T> | |
| T | Dune::vectorProduct (Dune::FieldVector< T, 2 > const &x, Dune::FieldVector< T, 2 > const &y) |
| vector product \( (x,y) \mapsto x \times y \in \mathbb{R} \). | |
| template<class T> | |
| Dune::FieldMatrix< T, 1, 2 > | Dune::vectorProductMatrix (Dune::FieldVector< T, 2 > const &x) |
| the matrix \( A(x) \in \mathbb{R}^{1\times 2}\) satisfying \( A(x) b = x\times b \) for all \( b \) | |
| template<class T> | |
| Dune::FieldVector< T, 3 > | Dune::vectorProduct (Dune::FieldVector< T, 3 > const &x, Dune::FieldVector< T, 3 > const &y) |
| vector product \( (x,y) \mapsto x \times y \). | |
| template<class T> | |
| Dune::FieldMatrix< T, 3, 3 > | Dune::vectorProductMatrix (Dune::FieldVector< T, 3 > const &x) |
| the skew-symmetric matrix \( A(x)\in \mathbb{R}^{3\times 3} \) satisfying \( A(x) b = x\times b \) for all \( b \) | |
| template<class T, class S, int n, int m> | |
| Dune::FieldVector< S, n > | Dune::operator* (Dune::FieldMatrix< T, n, m > const &A, Dune::FieldVector< S, m > const &x) |
| Matrix-vector multiplication \( (A,x) \mapsto Ax \). | |
| template<class T, int n, int m> | |
| Dune::FieldMatrix< T, n, m > | Dune::operator- (Dune::FieldMatrix< T, n, m > const &A) |
| Matrix negation \( A \mapsto - A \). | |
| template<class Scalar, int n, class ... Rest> | |
| auto | Kaskade::horzcat (Dune::FieldVector< Scalar, n > const &a, Rest ... rest) |
| Concatenates an arbitrary number of column vectors and matrices with coinciding number of rows to a larger matrix. | |
| template<class Scalar, int n> | |
| Dune::FieldVector< Scalar, n *n > | Kaskade::vectorize (Dune::FieldMatrix< Scalar, n, n > const &A) |
| matrix entries as vector, concatenating columns | |
| template<int n, class Scalar> | |
| Dune::FieldMatrix< Scalar, n, n > | Kaskade::unvectorize (Dune::FieldVector< Scalar, n *n > const &v) |
| forming quadratic matrix columns of vector segments | |
| template<class T, int n, int m> | |
| T | Kaskade::contraction (Dune::FieldMatrix< T, n, m > const &A, Dune::FieldMatrix< T, n, m > const &B) |
| Matrix contraction (Frobenius product) \( (A,B) \mapsto A:B = \sum_{i,j} A_{ij} B_{ij} \). | |
| template<class T, int n> | |
| T | Dune::trace (Dune::FieldMatrix< T, n, n > const &A) |
| Matrix trace \( A \mapsto \mathrm{tr}\,A = \sum_{i} A_{ii} \). | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | diag (Dune::FieldMatrix< T, n, n > const &A) |
| Matrix diagonal as a vector. | |
| template<class T, int n> | |
| Dune::FieldMatrix< T, n, n > | unitMatrix () |
| Returns the identity matrix of size n \( \mapsto I \). | |
| template<class T> | |
| Dune::FieldMatrix< T, 3, 3 > | skewMatrix (Dune::FieldVector< T, 3 > v) |
| Returns the skew symmetric matrix related to the cross product with (3d) vector v. | |
| template<class T, int n> | |
| Dune::FieldVector< T, n > | unitVector (int i) |
| Returns the unit vector \( e_i \) with \( (e_i)_k = \delta_{ik} \). | |
| template<class MatrixZ, class Matrix> | |
| void | MatMult (MatrixZ &z, Matrix const &x, Matrix const &y) |
| Computes Z = X*Y. X and Y need to be compatible, i.e. X.M()==Y.N() has to hold. No aliasing may occur, i.e. &Z != &X and &Z != &Y must hold. Z is reshaped as needed. | |
| template<class B, class A, class OutIter> | |
| OutIter | Kaskade::vectorToSequence (Dune::BlockVector< B, A > const &v, OutIter iter) |
| copies the entries of a vector sequentially to the output iterator. | |
| template<class B, class A, class InIter> | |
| InIter | Kaskade::vectorFromSequence (Dune::BlockVector< B, A > &v, InIter in) |
| copies the elements obtained from the input iterator sequentially to the entries of the vector. | |
| template<class Index> | |
| std::vector< std::vector< Index > > | Kaskade::getBCRSIndicesFromTriplet (Index nrows, std::vector< Index > const &ridx, std::vector< Index > const &cidx, int nr=1, int nc=1) |
| Sorts the sparse matrix nonzero positions into row buckets. | |
| void | Kaskade::DynamicMatrixDetail::gemm (bool transposeA, bool transposeB, int m, int n, int k, double alpha, double const *A, int lda, double const *B, int ldb, double beta, double *C, int ldc) |
| computes \( C \leftarrow \alpha A B + \beta C \) | |
| template<class T, int n, int m> | |
| Dune::FieldMatrix< T, m, n > | Kaskade::transpose (Dune::FieldMatrix< T, n, m > const &A) |
| Matrix transposition \( A \mapsto A^T \). | |
| template<class Entry, int n> | |
| Dune::FieldMatrix< Entry, n, n > | Kaskade::diag (Dune::FieldVector< Entry, n > const &d) |
| Creates a fixed-size diagonal matrix from the given diagonal vector. | |
| template<int n, class Entry, int m, class A> | |
| Dune::BlockVector< Dune::FieldVector< Entry, n > > | Kaskade::reshapeBlocks (Dune::BlockVector< Dune::FieldVector< Entry, m >, A > const &x) |
| Reshapes a nested block vector to differen entry sizes. | |
| template<class Scalar, int n, class Index = size_t> | |
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, n, n >, Index > | Kaskade::sparseUnitMatrix (Index N) |
| creates a unit matrix in NUMA block compressed row storage format | |
| template<class Scalar, int n, int m, class Index = size_t> | |
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Index > | Kaskade::sparseZeroMatrix (Index N, Index M) |
| creates a zero matrix in NUMA block compressed row storage format | |
| template<class Scalar> | |
| void | Kaskade::deleteLowerTriangle (std::vector< int > &ridx, std::vector< int > &cidx, std::vector< Scalar > &data) |
| removes subdiagonal entries from the matrix entries stored in elementary triplet format | |
| void | umfpack_triplet_to_col (int rows, int cols, std::vector< long > const &ridx, std::vector< long > const &cidx, std::vector< double > const &values, std::vector< long > &Ap, std::vector< long > &Ai, std::vector< double > &Az) |
| Triplet to compressed column storage conversion . This is just a frontent to DirectType::UMFPACK utility routines. | |
| void | umfpack_triplet_to_col (int rows, int cols, std::vector< int > const &ridx, std::vector< int > const &cidx, std::vector< double > const &values, std::vector< int > &Ap, std::vector< int > &Ai, std::vector< double > &Az) |
| Triplet to compressed column storage conversion . This is just a frontent to DirectType::UMFPACK utility routines. | |
| void | umfpack_col_to_triplet (std::vector< long > const &Ap, std::vector< long > &Ti) |
| Compressed column storage to triplet storage conversion. This is just a frontent to DirectType::UMFPACK utility routines. | |
| void | umfpack_col_to_triplet (std::vector< int > const &Ap, std::vector< int > &Ti) |
| Compressed column storage to triplet storage conversion. This is just a frontent to DirectType::UMFPACK utility routines. | |
| template<class Scalar, int n> | |
| Dune::FieldVector< Scalar, n > | Kaskade::orthogonalTo (Dune::FieldVector< Scalar, n > const &x) |
| Find an (arbitrary) vector orthogonal to the given one. | |
| template<int m, class Scalar, class Sequence> | |
| auto const & | component (LinearProductSpace< Scalar, Sequence > const &x) |
| Provides access to the m-th component of a product space. | |
| template<class X0, class ... Xs> | |
| auto | cartesianProduct (X0 const &x0, Xs const &... xs) |
| Creates a cartesian product of the given vectors, i.e. a LinearProductSpace object. | |
| template<class Scalar, class Seq, class OutIter> | |
| OutIter | vectorToSequence (LinearProductSpace< Scalar, Seq > const &v, OutIter i) |
| writes the coefficients of a vector to a flat scalar sequence <Scalar,Seq> | |
| template<class Scalar, class Seq, class InIter> | |
| InIter | vectorFromSequence (LinearProductSpace< Scalar, Seq > &v, InIter i) |
| reads the coefficients of a vector from a flat scalar sequence <Scalar,Seq> | |
| template<class IndexP, class EntryP, class IndexA, class EntryA> | |
| auto | conjugation (NumaBCRSMatrix< EntryP, IndexP > const &P, NumaBCRSMatrix< EntryA, IndexA > const &A, bool onlyLowerTriangle=false, bool createDiagonal=false) |
| Creates the conjugation product \( P^T A P\). | |
| template<class Entry> | |
| DynamicMatrix< typename EntryTraits< Entry >::transpose_type > | transpose (DynamicMatrix< Entry > const &A) |
| Computes the transpose of a matrix \( A \mapsto A^T \). | |
| template<class Entry> | |
| std::tuple< DynamicMatrix< Dune::FieldMatrix< typename EntryTraits< Entry >::field_type, 1, 1 > >, std::vector< typename EntryTraits< Entry >::real_type >, DynamicMatrix< Dune::FieldMatrix< typename EntryTraits< Entry >::field_type, 1, 1 > > > | svd (DynamicMatrix< Entry > const &A, bool fullU=true, bool fullV=true) |
| Computes the singular value decomposition \( A = U \Sigma V^T \). | |
| template<class Entry> | |
| EntryTraits< Entry >::real_type | two_norm (DynamicMatrix< Entry > const &A) |
| Computes the spectral norm of the given matrix. | |
| template<class Entry> | |
| EntryTraits< Entry >::real_type | condition (DynamicMatrix< Entry > const &A) |
| Computes the condition number of the given square matrix. | |
| template<class Scalar, int d> | |
| bool | makePositiveSemiDefinite (Dune::FieldMatrix< Scalar, d, d > &A) |
| Computes a positive semi-definite approximation to \( A \) by cutting off negative eigenvalues. | |
| template<class Entry> | |
| bool | makePositiveSemiDefinite (DynamicMatrix< Entry > &A, typename ScalarTraits< typename EntryTraits< Entry >::field_type >::Real threshold=0) |
| Computes a positive semi-definite approximation to \( A \) by cutting off negative eigenvalues. | |
| template<class MEntry, class VEntry> | |
| auto | operator* (DynamicMatrix< MEntry > const &A, Dune::DynamicVector< VEntry > const &x) |
| matrix-vector product \( Ax \) | |
| template<class MEntry, class VEntry> | |
| auto | operator* (DynamicMatrix< MEntry > const &A, Dune::BlockVector< VEntry > const &x) |
| matrix-vector product \( Ax \) | |
| template<class MEntry> | |
| auto | operator* (typename Dune::FieldTraits< DynamicMatrix< MEntry > >::field_type x, DynamicMatrix< MEntry > A) |
| multiplication with scalar | |
| template<class MEntry> | |
| auto | operator- (DynamicMatrix< MEntry > const &A) |
| Multiplication with -1. | |
| template<class MEntry> | |
| auto | operator- (DynamicMatrix< MEntry > A, DynamicMatrix< MEntry > const &B) |
| matrix subtraction \( A-B \) | |
| template<class MEntry> | |
| auto | operator+ (DynamicMatrix< MEntry > A, DynamicMatrix< MEntry > const &B) |
| matrix addition \( A+B \) | |
| template<class EntryA, class EntryB> | |
| void | matrixMatrixProduct (DynamicMatrix< EntryA > const &A, DynamicMatrix< EntryB > const &B, DynamicMatrix< typename DynamicMatrixDetail::ProductTraits< EntryA, EntryB >::type > &C) |
| matrix-matrix product \( A B \) | |
| template<class EntryA, class EntryB> | |
| DynamicMatrix< typename DynamicMatrixDetail::ProductTraits< EntryA, EntryB >::type > | operator* (DynamicMatrix< EntryA > const &A, DynamicMatrix< EntryB > const &B) |
| matrix-matrix product \( A B \) | |
| template<class MEntry> | |
| DynamicMatrix< MEntry > | submatrix (DynamicMatrix< MEntry > const &A, int rowstart, int rowend, int colstart, int colend) |
| extracts contiguous submatrices, copying the data | |
| template<class EntryA, class EntryB> | |
| auto | kron (DynamicMatrix< EntryA > const &A, DynamicMatrix< EntryB > const &B) |
| Computes the Kronecker product of two matrices. | |
| template<class EntryA, class EntryB> | |
| auto | horzcat (DynamicMatrix< EntryA > const &A, DynamicMatrix< EntryB > const &B) |
| Concatenates two matrices horizontally. | |
| template<class EntryX, class EntryY> | |
| auto | vertcat (Dune::DynamicVector< EntryX > const &x, Dune::DynamicVector< EntryY > const &y) |
| Concatenes two (column) vectors vertically. | |
| template<class Entry> | |
| DynamicMatrix< Entry > | vertcat (DynamicMatrix< Entry > const &A, DynamicMatrix< Entry > const &B) |
| Concatenates two matrices vertically. | |
| template<class Entry> | |
| auto | dynamicUnitMatrix (Entry const &d, int n) |
| Returns the diagonal matrix with the given entry replicated on the diagonal. | |
| template<class Target, class Source, class RowIndices, class ColIndices> | |
| Target | submatrix (Source const &A, RowIndices const &ri, ColIndices const &ci) |
| extracts a sparse or dense submatrix of \( A \) | |
| template<class EntryA, class EntryB, class IndexA, class IndexB> | |
| auto | operator* (NumaBCRSMatrix< EntryA, IndexA > const &A, NumaBCRSMatrix< EntryB, IndexB > const &B) |
| Computes the matrix-matrix product \( (A,B) \mapsto AB \). | |
| template<class Entry, int Size0, int ... Sizes> | |
| Tensor< Entry, Size0, Sizes... > | operator* (typename EntryTraits< Entry >::field_type a, Tensor< Entry, Size0, Sizes... > A) |
| Scalar times tensor multiplication. | |
| template<class Entry, int n> | |
| Entry | trace (Tensor< Entry, n, n > const &A) |
| Trace of a square matrix-shaped tensor. | |
| template<class Entry, class Index> | |
| std::ostream & | operator<< (std::ostream &out, NumaBCRSMatrix< Entry, Index > const &A) |
| Writes a NumaBCRSMatrix to an output stream. | |
| template<class SparseMatrix> | |
| DynamicMatrix< typename SparseMatrix::block_type > | full (SparseMatrix const &A) |
| Converts a sparse NumaBCRSMatrix to a dense matrix. | |
| template<class SparseMatrix, class RowRange, class ColRange> | |
| DynamicMatrix< typename SparseMatrix::block_type > | full (SparseMatrix const &A, RowRange const &rows, ColRange const &cols) |
| Converts a subrange of a sparse matrix to a dense matrix. | |
| template<class Entry, class Index, class Index2> | |
| NumaBCRSMatrix< Entry, Index > | operator+ (NumaBCRSMatrix< Entry, Index > const &A, NumaBCRSMatrix< Entry, Index2 > const &B) |
| Matrix addition \( (A,B) \mapsto A+B \). The sparsity patterns of both matrices can be different. The size of the matrices have to be the same. Both must not have symmetric storage. | |
| template<class Entry, class Index> | |
| auto | transpose (NumaBCRSMatrix< Entry, Index > const &A) |
| Creates the transposed sparse matrix \( A^T \). | |
| template<class Target, class Source, class RowIndices, class ColIndices> | |
| Target | eraseRowsNCols (Source const &A, RowIndices const &ri, ColIndices const &ci) |
| "deletes" rows/columns by extracting a copy of the matrix keeping the non-deleted rows/columns. | |
| template<class Target, class Source, class RowIndices> | |
| Target | eraseRows (Source const &A, RowIndices const &ri) |
| "deletes" rows by extracting a copy of the matrix keeping only the non-deleted rows. | |
| template<class Target, class Source, class ColIndices> | |
| Target | eraseCols (Source const &A, ColIndices const &ci) |
| "deletes" columns by extracting a copy of the matrix keeping only the non-deleted columns. | |
| template<class Source> | |
| std::vector< size_t > | nonZeroColumns (Source const &A) |
| returns all indices of nonzero columns. | |
| template<int row2, int col2, int row1, int col1, class Scalar, class Index> | |
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, row2, col2 >, Index > | reshapeBlocks (NumaBCRSMatrix< Dune::FieldMatrix< Scalar, row1, col1 >, Index > const &A) |
| reshapes NumaBRCSMAtrix entry block structure | |
| template<int blockrows, int blockcols, class Scalar, class Index> | |
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > | horzcat (NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > const &A, NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > const &B) |
| concatenate two matrices horizontally | |
| template<int blockrows, int blockcols, class Scalar, class Index> | |
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > | vertcat (NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > const &A, NumaBCRSMatrix< Dune::FieldMatrix< Scalar, blockrows, blockcols >, Index > const &B) |
| concatenate two matrices vertically | |
| template<int blockrows, int blockcols, class Index = size_t> | |
| NumaBCRSMatrix< Dune::FieldMatrix< double, blockrows, blockcols >, Index > | diagcat (NumaBCRSMatrix< Dune::FieldMatrix< double, blockrows, blockcols >, Index > const &A, NumaBCRSMatrix< Dune::FieldMatrix< double, blockrows, blockcols >, Index > const &B) |
| concatenate two matrices diagonally, resulting matrix is zero on the off block-diagonal | |
Variables | |
| constexpr StaticIndexRange< 0, std::numeric_limits< int >::max()> | _ |
| Convenience static range denoting the full available range, analogous to Matlab's :. | |
| template<class T> | |
| constexpr int | Kaskade::rank = ScalarDetail::Rank<T>::value |
| Reports the rank of vector, matrix, and tensor types of static size. | |
Classes and functions for basic vector and matrix arithmetics.
|
The type of the m-th component of a product space.
Definition at line 476 of file linearspace.hh.
| Dune::FieldMatrix< T, n, m > Dune::asMatrix | ( | Dune::FieldVector< T, n *m > const & | x | ) |
Converts a vector of size nm to a matrix of size n x m by filling columns successively.
Definition at line 112 of file fixdune.hh.
| Dune::FieldVector< T, n *m > Dune::asVector | ( | Dune::FieldMatrix< T, n, m > const & | x | ) |
Converts a matrix of size n x m to a vector of size n*m by concatenating all the columns.
Definition at line 98 of file fixdune.hh.
|
Creates a cartesian product of the given vectors, i.e. a LinearProductSpace object.
Definition at line 488 of file linearspace.hh.
|
Provides access to the m-th component of a product space.
This simplifies the access to individual components of a product space, e.g., a variable set of finite element functions. Instead of
one can write
| m | the index of the component (nonnegative) |
| Scalar | a scalar type |
| Sequence | a boost::fusion sequence type |
Definition at line 458 of file linearspace.hh.
|
Computes the condition number of the given square matrix.
For invertible matrices, the condition number is given as \( \kappa(A) = \|A\| \, \|A^{-1}\| \). For singular matrices, \( +\infty \) is returned.
Currently, the condition is computed via the signular value decomposition, and takes \( O(n^3) \) time.
Definition at line 877 of file dynamicMatrix.hh.
|
Creates the conjugation product \( P^T A P\).
Note that for typical multigrid Galerkin projections the memory access patterns of the conjugation are quite bad for performance. Consider assembling the projected matrix directly on the coarser discretization.
| onlyLowerTriangle. | If true, we will only touch the lower triangle of A and only create the lower triangle of the resulting matrix P^T A P |
| createDiagonal. | If true, the diagonal of the result will be structurally nonzero, even if not resulting from the sparsity patterns of P and A. |
Definition at line 123 of file conjugation.hh.
| T Kaskade::contraction | ( | Dune::FieldMatrix< T, n, m > const & | A, |
| Dune::FieldMatrix< T, n, m > const & | B ) |
Matrix contraction (Frobenius product) \( (A,B) \mapsto A:B = \sum_{i,j} A_{ij} B_{ij} \).
Definition at line 457 of file fixdune.hh.
Referenced by Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::d0(), Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::d1(), and Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::d2().
| void Kaskade::deleteLowerTriangle | ( | std::vector< int > & | ridx, |
| std::vector< int > & | cidx, | ||
| std::vector< Scalar > & | data ) |
removes subdiagonal entries from the matrix entries stored in elementary triplet format
Definition at line 747 of file triplet.hh.
| Dune::FieldVector< T, n > diag | ( | Dune::FieldMatrix< T, n, n > const & | A | ) |
| Dune::FieldMatrix< Entry, n, n > Kaskade::diag | ( | Dune::FieldVector< Entry, n > const & | d | ) |
Creates a fixed-size diagonal matrix from the given diagonal vector.
Definition at line 351 of file dynamicMatrixOps.hh.
Referenced by Kaskade::CGBase< X, Xstar, CGImplementationType::STANDARD, TimerPolicy >::cond(), and Kaskade::CG_Detail::stev().
|
concatenate two matrices diagonally, resulting matrix is zero on the off block-diagonal
Requires the matrices to have same number of entry types of Dune::FieldMatrix<double,blockrows,blockcols>
| A | NumaBRCSMatrix, first submatrix (top left) |
| B | NumaBRCSMatrix, second matrix (bottom right) |
Definition at line 2132 of file threadedMatrix.hh.
|
Returns the diagonal matrix with the given entry replicated on the diagonal.
In order to obtain a unit matrix with m by m unit matrix entries on the diagonal, use
Definition at line 334 of file dynamicMatrixOps.hh.
|
"deletes" columns by extracting a copy of the matrix keeping only the non-deleted columns.
| Target | the target matrix format , usually Dune::BCRSMatrix. |
| Source | the source matrix, usually Dune::BCRSMatrix or NumaBCRSMatrix. |
| ColIndices | an STL sequence type |
Definition at line 1929 of file threadedMatrix.hh.
|
"deletes" rows by extracting a copy of the matrix keeping only the non-deleted rows.
| Target | the target matrix format , usually Dune::BCRSMatrix. |
| Source | the source matrix, usually Dune::BCRSMatrix or NumaBCRSMatrix. |
| RowIndices | an STL sequence type |
Definition at line 1909 of file threadedMatrix.hh.
|
"deletes" rows/columns by extracting a copy of the matrix keeping the non-deleted rows/columns.
| Target | the target matrix format , usually Dune::BCRSMatrix. |
| Source | the source matrix, usually Dune::BCRSMatrix or NumaBCRSMatrix. |
| RowIndices | an STL sequence type |
| ColIndices | an STL sequence type |
Definition at line 1878 of file threadedMatrix.hh.
|
Converts a sparse NumaBCRSMatrix to a dense matrix.
Be aware that, depending on the number of nonzeros in the sparse matrix, the memory requirement of the dense matrix may be much higher. Use this only for matrices up to 1000x1000, and rather less.
Definition at line 1713 of file threadedMatrix.hh.
|
Converts a subrange of a sparse matrix to a dense matrix.
This is equivalent to Matlab's full(A(rows,cols)) (except that we index 0-based).
| SparseMatrix | a sparse matrix type adhering to the Dune::BCRSMatrix interface (e.g., NumaBCRSMatrix) |
| rows | an STL range of row indices |
| cols | an STL range of column indices |
The row and column index ranges need not be sorted, but cols must not contain duplicates.
Be aware that, depending on the number of nonzeros in the sparse matrix, the memory requirement of the dense matrix may be much higher. Use this only for matrices up to 1000x1000, and rather less.
Definition at line 1740 of file threadedMatrix.hh.
| void Kaskade::DynamicMatrixDetail::gemm | ( | bool | transposeA, |
| bool | transposeB, | ||
| int | m, | ||
| int | n, | ||
| int | k, | ||
| double | alpha, | ||
| double const * | A, | ||
| int | lda, | ||
| double const * | B, | ||
| int | ldb, | ||
| double | beta, | ||
| double * | C, | ||
| int | ldc ) |
computes \( C \leftarrow \alpha A B + \beta C \)
\( A\in\R^{m\times k}, B\in\R^{k\times n}, C\in\R^{m\times n} \)
| std::vector< std::vector< Index > > Kaskade::getBCRSIndicesFromTriplet | ( | Index | nrows, |
| std::vector< Index > const & | ridx, | ||
| std::vector< Index > const & | cidx, | ||
| int | nr = 1, | ||
| int | nc = 1 ) |
Sorts the sparse matrix nonzero positions into row buckets.
From the row and column indices of a sparse matrix with scalar entries, e.g., in triplet format, obtain the row and column indices of a sparse matrix with nr-by-nc block-entries, as in Dune::BCRSMatrix<Dune::FieldMatrix<Scalar,nr,nc>>. The indices are stored by row.
| nrows | number of rows of BCRS target matrix (i.e. rows of triplet source / nr) |
| ridx | vector of row indices |
| cidx | vector of column indices |
| nr | row size of sparse matrix entries |
| nc | column size of sparse matrix entries |
Definition at line 440 of file crsutil.hh.
Referenced by Kaskade::AssemblyDetail::Fill< Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, 1, 1 >, Allocator > >::apply().
|
Concatenates two matrices horizontally.
A and B must have the same number of scalar rows.
Definition at line 285 of file dynamicMatrixOps.hh.
| auto Kaskade::horzcat | ( | Dune::FieldVector< Scalar, n > const & | a, |
| Rest ... | rest ) |
Concatenates an arbitrary number of column vectors and matrices with coinciding number of rows to a larger matrix.
This works as Matlab's [x,y,z] construction.
Definition at line 304 of file fixdune.hh.
|
concatenate two matrices horizontally
Requires the matrices to have same number of rows and entry types of Dune::FieldMatrix<Scalar,blockrows,blockcols>
| A | NumaBRCSMatrix, first submatrix (left) |
| B | NumaBRCSMatrix, second matrix (right) |
Definition at line 2039 of file threadedMatrix.hh.
|
Computes the Kronecker product of two matrices.
kron(A,B) with \( A\in \mathbf{R}^{n_a\times m_a} \) and \( B\in \mathbf{R}^{n_b\times m_b} \) computes a block matrix \( C \in\mathbf{R}^{n_a n_b \times m_a m_b}\) with \( n_b \times m_b \) blocks such that the \( (i,j)\)-block is \( A_{ij} B \). This is compatible with Matlab's kron function.
The entry types of A and B must be multiplicable.
Definition at line 206 of file dynamicMatrixOps.hh.
|
Computes a positive semi-definite approximation to \( A \) by cutting off negative eigenvalues.
\( A \) has to be symmetric.
|
Computes a positive semi-definite approximation to \( A \) by cutting off negative eigenvalues.
\( A \) has to be symmetric.
| void MatMult | ( | MatrixZ & | z, |
| Matrix const & | x, | ||
| Matrix const & | y ) |
Computes Z = X*Y. X and Y need to be compatible, i.e. X.M()==Y.N() has to hold. No aliasing may occur, i.e. &Z != &X and &Z != &Y must hold. Z is reshaped as needed.
Definition at line 565 of file fixdune.hh.
Referenced by Kaskade::TransferData< Space, CoarseningPolicy >::transferMatrix().
|
matrix-matrix product \( A B \)
Definition at line 123 of file dynamicMatrixOps.hh.
| Dune::FieldVector< T, n > Dune::max | ( | Dune::FieldVector< T, n > | x, |
| Dune::FieldVector< T, n > const & | y ) |
Componentwise maximum.
Definition at line 73 of file fixdune.hh.
Referenced by Kaskade::boundingBox(), and Kaskade::maxOrder().
| Dune::FieldVector< T, n > Dune::min | ( | Dune::FieldVector< T, n > | x, |
| Dune::FieldVector< T, n > const & | y ) |
Componentwise minimum.
Definition at line 85 of file fixdune.hh.
Referenced by Kaskade::boundingBox().
|
returns all indices of nonzero columns.
| Source | the source matrix, usually Dune::BCRSMatrix or NumaBCRSMatrix. |
Definition at line 1948 of file threadedMatrix.hh.
| Dune::FieldVector< T, n > Dune::normalize | ( | Dune::FieldVector< T, n > | x | ) |
returns the normalized vector
Definition at line 141 of file fixdune.hh.
| Dune::FieldVector< S, n > Dune::operator* | ( | Dune::FieldMatrix< T, n, m > const & | A, |
| Dune::FieldVector< S, m > const & | x ) |
Matrix-vector multiplication \( (A,x) \mapsto Ax \).
Definition at line 227 of file fixdune.hh.
|
matrix-matrix product \( A B \)
Definition at line 155 of file dynamicMatrixOps.hh.
|
matrix-vector product \( Ax \)
Definition at line 51 of file dynamicMatrixOps.hh.
|
matrix-vector product \( Ax \)
Definition at line 34 of file dynamicMatrixOps.hh.
|
multiplication with scalar
Definition at line 65 of file dynamicMatrixOps.hh.
|
Computes the matrix-matrix product \( (A,B) \mapsto AB \).
| EntryA | the type of entries of matrix A. Usually Dune::FieldMatrix<Real,na,ma>. |
| EntryB | the type of entries of matrix B. Usually Dune::FieldMatrix<Real,nb,mb>. |
As matrix entries \( A_{ij} B_{jk}\) have to be multiplied, the entry size must be compatible, i.e. ma==nb. As an extension, if entries of A or B are scalar (i.e. na==ma==1), we treat them implicitly as multiples of the unit matrix of compatible size.
Definition at line 37 of file matrixProduct.hh.
|
| Dune::FieldVector< T, n > Dune::operator+ | ( | Dune::FieldVector< T, n > | x, |
| Dune::FieldVector< T, n > const & | y ) |
Vector addition \( (x,y) \mapsto x+y \).
Definition at line 50 of file fixdune.hh.
|
matrix addition \( A+B \)
Definition at line 109 of file dynamicMatrixOps.hh.
|
Matrix addition \( (A,B) \mapsto A+B \). The sparsity patterns of both matrices can be different. The size of the matrices have to be the same. Both must not have symmetric storage.
Definition at line 1784 of file threadedMatrix.hh.
| Dune::FieldMatrix< T, n, m > Dune::operator- | ( | Dune::FieldMatrix< T, n, m > const & | A | ) |
Matrix negation \( A \mapsto - A \).
Definition at line 243 of file fixdune.hh.
| Dune::FieldVector< T, n > Dune::operator- | ( | Dune::FieldVector< T, n > | x | ) |
Vector negation \( x \mapsto - x \).
Definition at line 61 of file fixdune.hh.
|
matrix subtraction \( A-B \)
Definition at line 93 of file dynamicMatrixOps.hh.
|
Multiplication with -1.
Definition at line 82 of file dynamicMatrixOps.hh.
|
Writes a NumaBCRSMatrix to an output stream.
The matrix is written as text in triplet format, one scalar entry per row.
Definition at line 1683 of file threadedMatrix.hh.
| Dune::FieldVector< Scalar, n > Kaskade::orthogonalTo | ( | Dune::FieldVector< Scalar, n > const & | x | ) |
Find an (arbitrary) vector orthogonal to the given one.
Definition at line 52 of file vectorOps.hh.
| Dune::FieldMatrix< T, n, m > Dune::outerProduct | ( | Dune::FieldVector< T, n > const & | x, |
| Dune::FieldVector< T, m > const & | y ) |
outer vector product \( (x,y) \mapsto x y^T \).
Definition at line 127 of file fixdune.hh.
| Dune::FieldVector< CoordType, dim > Kaskade::projectToUnitSimplex | ( | Dune::FieldVector< CoordType, dim > | x | ) |
Projects a vector onto the unit simplex.
Definition at line 64 of file barycentric.hh.
|
reshapes NumaBRCSMAtrix entry block structure
Converts a NumaBCRSMAtrix with entry-type Dune::FieldMatrix<Scalar,row1,col1> to entry type Dune::FieldMatrix<Scalar,row2,col2>, i.e. the size of the contained blocks are reshaped. Row size row1 must be divisible by row2 and column size col1 must be divisible by col2.
| row1 | number of rows in input block |
| col1 | number of columns in input block |
| row2 | desired number of block-rows |
| col2 | desired number of column-rows |
| A | NumaBRCSMatrix whose entry-type is to be reshaped |
Definition at line 1986 of file threadedMatrix.hh.
| Dune::BlockVector< Dune::FieldVector< Entry, n > > Kaskade::reshapeBlocks | ( | Dune::BlockVector< Dune::FieldVector< Entry, m >, A > const & | x | ) |
Reshapes a nested block vector to differen entry sizes.
Use this to convert a vector [[1,2],[3,4]] to [1,2,3,4] or [[1],[2],[3],[4]].
| n | the static block size of the nested result vector |
| Entry | the type of entries in the nested vector |
| m | the static length of the nested source vector |
| x | a nested dynamic block vector |
n and x must be compatible, i.e. there must be some integer S such that n*S = m*N, where N is the size of the given block vector.
Definition at line 45 of file reshape.hh.
| Dune::FieldMatrix< T, 3, 3 > skewMatrix | ( | Dune::FieldVector< T, 3 > | v | ) |
Returns the skew symmetric matrix related to the cross product with (3d) vector v.
Definition at line 519 of file fixdune.hh.
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, n, n >, Index > Kaskade::sparseUnitMatrix | ( | Index | N | ) |
creates a unit matrix in NUMA block compressed row storage format
The entries are fixed-dimensional unit matrices.
| Scalar | the field type of entries |
| n | dimension of the entries |
| N | the size of the matrix to create (N blocks of size n each) |
Definition at line 1817 of file threadedMatrix.hh.
Referenced by makeJointPstack().
| NumaBCRSMatrix< Dune::FieldMatrix< Scalar, n, m >, Index > Kaskade::sparseZeroMatrix | ( | Index | N, |
| Index | M ) |
creates a zero matrix in NUMA block compressed row storage format
This is an empty sparsity pattern - all entries are structurally zero.
| Scalar | the field type of entries |
| n | dimension of the entries |
| N,M | the size of the matrix to create (NxM blocks of size n each) |
Definition at line 1841 of file threadedMatrix.hh.
|
extracts contiguous submatrices, copying the data
The submatrix is defined by half-open row and column ranges.
Definition at line 178 of file dynamicMatrixOps.hh.
|
extracts a sparse or dense submatrix of \( A \)
This works as Matlab's A(ri,ci) submatrix extraction.
| Target | the target matrix format, usually Dune::BCRSMatrix, NumaBCRSMatrix, or DynamicMatrix. |
| Source | the source matrix, usually Dune::BCRSMatrix or NumaBCRSMatrix. |
| RowIndices | an STL sequence type |
| ColIndices | an STL sequence type |
For target Dune::BCRSMatrix, the complexity is \( n_r n_c \log n_s \), where \( n_r \) is the size of ri, \( n_c \) the size of ci, and \( n_s \) the number of nonzeros per row in A.
Definition at line 183 of file matrixOps.hh.
Referenced by Kaskade::NumaBCRSMatrix< Dune::FieldMatrix< Scalar, 1, 1 >, Index >::operator()().
|
Computes the singular value decomposition \( A = U \Sigma V^T \).
If \( A \) is a \( n \times m \) matrix, then the SVD computes orthonormal \( U, V \) of size \( n\times n \) and \( m\times m\), respectively, and a \( n\times m\) matrix \( \Sigma \) with only nonnegative diagonal entries. Let \( k := \min(n,m) \).
| A | the matrix to be factored |
| fullU | if true, \( U \) is returned as a full \( n\times n\) matrix, otherwise only the first \( k \) columns corresponding to the first \( k \) left singular vectors are returned as a \( n\times k\) matrix. |
| fullV | if true, \( V \) is returned as a full \( m\times m\) matrix, otherwise only the first \( k \) columns corresponding to the first \( k \) right singular vectors are returned as a \( m\times k\) matrix. |
Definition at line 840 of file dynamicMatrix.hh.
| T Dune::trace | ( | Dune::FieldMatrix< T, n, n > const & | A | ) |
Matrix trace \( A \mapsto \mathrm{tr}\,A = \sum_{i} A_{ii} \).
Note: Instead of trace(A*B) use the equivalent, but faster contraction(A,B).
Definition at line 478 of file fixdune.hh.
|
|
Computes the transpose of a matrix \( A \mapsto A^T \).
This is a deep transpose, i.e. if the entries are non-scalar, they are transposed, too.
Definition at line 790 of file dynamicMatrix.hh.
Referenced by Kaskade::DynamicMatrix< Dune::FieldMatrix< Scalar, 1, 1 > >::usmtv().
|
Creates the transposed sparse matrix \( A^T \).
Definition at line 1855 of file threadedMatrix.hh.
| Dune::FieldMatrix< T, m, n > Kaskade::transpose | ( | Dune::FieldMatrix< T, n, m > const & | A | ) |
Matrix transposition \( A \mapsto A^T \).
This is a deep transpose, i.e. if the entries are non-scalar, they are transposed, too.
Definition at line 771 of file dynamicMatrix.hh.
|
Computes the spectral norm of the given matrix.
This computes \( \max_{\|v\|_2=1} \|Av\|_2 \).
Definition at line 857 of file dynamicMatrix.hh.
| void umfpack_col_to_triplet | ( | std::vector< int > const & | Ap, |
| std::vector< int > & | Ti ) |
Compressed column storage to triplet storage conversion. This is just a frontent to DirectType::UMFPACK utility routines.
| void umfpack_col_to_triplet | ( | std::vector< long > const & | Ap, |
| std::vector< long > & | Ti ) |
Compressed column storage to triplet storage conversion. This is just a frontent to DirectType::UMFPACK utility routines.
Referenced by Kaskade::MatrixAsTriplet< Scalar, SparseIndexInt >::operator+=(), and Kaskade::MatrixAsTriplet< Scalar, SparseIndexInt >::operator-=().
| void umfpack_triplet_to_col | ( | int | rows, |
| int | cols, | ||
| std::vector< int > const & | ridx, | ||
| std::vector< int > const & | cidx, | ||
| std::vector< double > const & | values, | ||
| std::vector< int > & | Ap, | ||
| std::vector< int > & | Ai, | ||
| std::vector< double > & | Az ) |
Triplet to compressed column storage conversion . This is just a frontent to DirectType::UMFPACK utility routines.
| void umfpack_triplet_to_col | ( | int | rows, |
| int | cols, | ||
| std::vector< long > const & | ridx, | ||
| std::vector< long > const & | cidx, | ||
| std::vector< double > const & | values, | ||
| std::vector< long > & | Ap, | ||
| std::vector< long > & | Ai, | ||
| std::vector< double > & | Az ) |
Triplet to compressed column storage conversion . This is just a frontent to DirectType::UMFPACK utility routines.
| rows | number of rows | |
| cols | number of columns | |
| [in] | ridx | row indices of matrix entries |
| [in] | cidx | column indices of matrix entries |
| [in] | values | matrix entries |
| [out] | Ap | column start array |
| [out] | Ai | row indices |
| [out] | Az | matrix entries |
The output arrays
Referenced by Kaskade::BoomerAMG< Op >::BoomerAMG(), Kaskade::Euclid< Op >::Euclid(), Kaskade::MatrixAsTriplet< Scalar, SparseIndexInt >::operator+=(), and Kaskade::MatrixAsTriplet< Scalar, SparseIndexInt >::operator-=().
| Dune::FieldMatrix< T, n, n > unitMatrix | ( | ) |
Returns the identity matrix of size n \( \mapsto I \).
Definition at line 506 of file fixdune.hh.
Referenced by Kaskade::Elastomechanics::IsochoricGreenLagrangeTensor< dim, Scalar >::d0(), Kaskade::Elastomechanics::IsochoricGreenLagrangeTensor< dim, Scalar >::d1(), Kaskade::DirichletNitscheBoundary< GridView, components, ScalarType >::d2(), Kaskade::DirichletPenaltyBoundary< GridView, components, ScalarType >::d2(), Kaskade::Elastomechanics::IsochoricGreenLagrangeTensor< dim, Scalar >::d2(), Kaskade::Elastomechanics::deviatoricPart(), Kaskade::getContactArea(), Kaskade::MultiLevelLocalGeometry< Grid >::jacobianInverseTransposed(), Kaskade::makeAuxiliarySpaceMultigridStack(), Kaskade::Elastomechanics::MaterialLaws::OrthotropicLinearMaterial< dim, Scalar >::OrthotropicLinearMaterial(), Kaskade::Elastomechanics::MaterialLaws::OrthotropicNonLinearMaterial< dim, Scalar >::OrthotropicNonLinearMaterial(), Kaskade::Elastomechanics::principalDirections(), Kaskade::InverseLocalMatrixStorageBase::regularize(), Kaskade::ScalarLaplace< Scalar, dim, isotropic >::ScalarLaplace(), Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::setLinearizationPoint(), Kaskade::sparseUnitMatrix(), Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::StVenantKirchhoff(), and Kaskade::Elastomechanics::MaterialLaws::StVenantKirchhoff< dim_, Scalar_ >::StVenantKirchhoff().
| Dune::FieldVector< T, n > unitVector | ( | int | i | ) |
Returns the unit vector \( e_i \) with \( (e_i)_k = \delta_{ik} \).
Definition at line 536 of file fixdune.hh.
| Dune::FieldMatrix< Scalar, n, n > Kaskade::unvectorize | ( | Dune::FieldVector< Scalar, n *n > const & | v | ) |
forming quadratic matrix columns of vector segments
Definition at line 438 of file fixdune.hh.
|
reads the coefficients of a vector from a flat scalar sequence <Scalar,Seq>
Definition at line 515 of file linearspace.hh.
Referenced by Kaskade::LinearProductSpace< Scalar, Functions >::read().
| InIter Kaskade::vectorFromSequence | ( | Dune::BlockVector< B, A > & | v, |
| InIter | in ) |
copies the elements obtained from the input iterator sequentially to the entries of the vector.
The value type of the input iterator must be convertible to the scalar entries of the vector. The input iterator is advanced by the number of scalar entries in the vector.
Definition at line 127 of file crsutil.hh.
| Dune::FieldVector< Scalar, n *n > Kaskade::vectorize | ( | Dune::FieldMatrix< Scalar, n, n > const & | A | ) |
matrix entries as vector, concatenating columns
Definition at line 422 of file fixdune.hh.
| T Dune::vectorProduct | ( | Dune::FieldVector< T, 2 > const & | x, |
| Dune::FieldVector< T, 2 > const & | y ) |
vector product \( (x,y) \mapsto x \times y \in \mathbb{R} \).
Definition at line 172 of file fixdune.hh.
| Dune::FieldVector< T, 3 > Dune::vectorProduct | ( | Dune::FieldVector< T, 3 > const & | x, |
| Dune::FieldVector< T, 3 > const & | y ) |
vector product \( (x,y) \mapsto x \times y \).
Definition at line 194 of file fixdune.hh.
| Dune::FieldMatrix< T, 1, 2 > Dune::vectorProductMatrix | ( | Dune::FieldVector< T, 2 > const & | x | ) |
the matrix \( A(x) \in \mathbb{R}^{1\times 2}\) satisfying \( A(x) b = x\times b \) for all \( b \)
Definition at line 182 of file fixdune.hh.
| Dune::FieldMatrix< T, 3, 3 > Dune::vectorProductMatrix | ( | Dune::FieldVector< T, 3 > const & | x | ) |
the skew-symmetric matrix \( A(x)\in \mathbb{R}^{3\times 3} \) satisfying \( A(x) b = x\times b \) for all \( b \)
Definition at line 207 of file fixdune.hh.
|
writes the coefficients of a vector to a flat scalar sequence <Scalar,Seq>
Definition at line 503 of file linearspace.hh.
Referenced by Kaskade::LinearProductSpace< Scalar, Functions >::write().
| OutIter Kaskade::vectorToSequence | ( | Dune::BlockVector< B, A > const & | v, |
| OutIter | iter ) |
copies the entries of a vector sequentially to the output iterator.
The Vector type can be Dune::BlockVector<B,A>, Dune::FieldVector<K,size>, or a finite element function. The type of the scalar entries of the vector must be convertible to the value type of the output iterator.
Definition at line 76 of file crsutil.hh.
| Dune::FieldVector< T, n+m > Dune::vertcat | ( | Dune::FieldVector< T, n > const & | x, |
| Dune::FieldVector< T, m > const & | y ) |
Concatenation of vectors.
Definition at line 154 of file fixdune.hh.
|
Concatenes two (column) vectors vertically.
Definition at line 296 of file dynamicMatrixOps.hh.
|
Concatenates two matrices vertically.
A and B must have the same number of columns.
Definition at line 309 of file dynamicMatrixOps.hh.
|
concatenate two matrices vertically
Requires the matrices to have same number of rows and entry types of Dune::FieldMatrix<Scalar,blockrows,blockcols>
| A | NumaBRCSMatrix, first submatrix (top) |
| B | NumaBRCSMatrix, second matrix (bottom) |
Definition at line 2086 of file threadedMatrix.hh.
|
constexpr |
Convenience static range denoting the full available range, analogous to Matlab's :.
Use this to take complete dimensions when slicing tensors:
Definition at line 74 of file tensor.hh.
Referenced by Kaskade::writeMarc().
|
constexpr |
Reports the rank of vector, matrix, and tensor types of static size.
Definition at line 153 of file scalar.hh.
Referenced by Kaskade::BDDC::MpiNodeTopology::configure(), horzcat(), horzcat(), and Kaskade::BDDC::MpiRoutingTraffic::printGlobal().