Opm::AutoDiffMatrix Class Reference
Detailed DescriptionAutoDiffMatrix is a wrapper class that optimizes matrix operations. Internally, an AutoDiffMatrix can be either Zero, Identity, Diagonal, or Sparse, and we utilize this to perform faster matrix operations. Member Typedef Documentation
Constructor & Destructor Documentation
Creates an empty zero matrix Referenced by createIdentity(), and operator*().
Creates a zero matrix with num_rows x num_cols entries
Creates a diagonal matrix from an Eigen diagonal matrix
Creates a sparse matrix from an Eigen sparse matrix
References swap(). Member Function Documentation
Referenced by operator+().
Referenced by operator+().
Referenced by operator+().
Referenced by operator+().
Referenced by operator+().
Referenced by operator+().
Returns element (row, col) in the matrix
Returns number of columns in the matrix Referenced by Opm::operator*(), and Opm::vertcatCollapseJacs().
Creates an identity matrix with num_rows_cols x num_rows_cols entries References AutoDiffMatrix(). Referenced by Opm::AutoDiffBlock< double >::variable().
Returns the sparse representation of this matrix. Note that this might be an expensive operation to perform if the internal structure is not sparse. If we are not a sparse matrix, our internal variable sparse_ is undefined, and hence changing it so that it happens to be a sparse representation of our true data does not change our true data, and hence justifies that we do not really violate the const qualifier. References toSparse().
Referenced by operator*().
References Opm::fastDiagSparseProduct(). Referenced by operator*().
References Opm::fastSparseDiagProduct(). Referenced by operator*().
References Opm::fastSparseProduct(). Referenced by operator*().
Returns number of non-zero elements in the matrix. Optimizes internally by exploiting that e.g., an n*n identity matrix has n non-zeros. Note that an n*n diagonal matrix is defined to have n non-zeros, even though several diagonal elements might be 0.0.
Multiplies two AutoDiffMatrices. Internally, this function optimizes the multiplication operation based on the structure of the matrix, e.g., multiplying M with a zero matrix will obviously yield a zero matrix. References AutoDiffMatrix(), mulDD(), mulDS(), mulSD(), and mulSS().
Multiplies an AutoDiffMatrix with a scalar. Optimizes internally by exploiting that e.g., an identity matrix multiplied by a scalar x yields a diagonal matrix with x the diagonal.
Multiplies an AutoDiffMatrix with a vector. Optimizes internally by exploiting that e.g., an identity matrix multiplied by a vector yields the vector itself.
Divides an AutoDiffMatrix by a scalar. Optimizes internally by exploiting that e.g., an identity matrix divided by a scalar x yields a diagonal matrix with 1/x on the diagonal.
References swap().
Returns number of rows in the matrix
Referenced by AutoDiffMatrix(), and operator=().
template<class Scalar , int Options, class Index >
Converts the AutoDiffMatrix to an Eigen SparseMatrix.This might be an expensive operation to perform for e.g., an identity matrix or a diagonal matrix. Referenced by Opm::collapseJacs(), and getSparse(). The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||