Operator¶
-
(Abstract) Operator < handle & matlab.mixin.Copyable
Abstract superclass for operators. Both implicit and explicit.
Functions¶
-
this = Operator(state, eqSettings, varargin)
Construct a new instance of this class.
-
matrixHasChanged = generateOperatorMatrix(this,runIndex, inputArg)
generateOperatorMatrix implementation should modify operatorMatrix to match the parameters at time index runIndex in state object
-
M = getMatrix(this)
The functions below are all utilities for building sparse matrices:¶
-
resetSparseCreator
(this)¶
Resets the sparse values.
-
clearSparseResidue
(this)¶
Reduce the memory footprint by removing the vectors used for building the sparse matrix once they are no longer needed
-
addToSparse
(this, i, j, s)¶
Adds values to the sparse matrix s at index (i,j) to matrix
-
addSparseBlock
(this, rowIndices, colIndices, block)¶
Adds a block to the sparse matrix. rowIndices and colIndices should be vectors. numel(rowIndices) should equal the number of rows in ‘block’. numel(colIndices) should equal the number of columns in ‘block’.
-
sparseMatrix = createSparse(this)
After you are done adding elements to the sparse matrix using addToSparse() and addSparseBlock(), call this function to finalize the matrix.