Some of the current operator-returning functions in MOLE.jl have been implemented using dense storage, rather than sparse.
We need to update these operators to take advantage of the sparsity and reduce the memory footprint.
We want to use sparse storage initializers, such as: spzeros, sparse(I, ...), sparse kron, and sparse concatenation.
Here is the list of operators to be updated:
- Gradient operators
gradNonPeriodic
gradPeriodic
gradNonUniform
- 2D
grad(...), gradNonPeriodic(...), gradPeriodic(...), gradNonUniform(...)
These, right now, use dense zeros, Matrix(I, ...), diagm, kron, and dense concatenation.
- Divergence operators
divNonPeriodic
divPeriodic
divNonUniform
- 2D
div(...), div2DNonUniform(...)
These also use dense zeros, Matrix(I, ...), diagm, kron, and dense concatenation.
- Laplacian operators
These are products of D * G, so they will become sparse once div and grad return sparse matrices.
- Interpolator
It imports SparseArrays but still allocates I = zeros(n_rows, n_cols), so it should also be changed to sparse storage.
Some of the current operator-returning functions in MOLE.jl have been implemented using dense storage, rather than sparse.
We need to update these operators to take advantage of the sparsity and reduce the memory footprint.
We want to use sparse storage initializers, such as:
spzeros,sparse(I, ...), sparse kron, and sparse concatenation.Here is the list of operators to be updated:
gradNonPeriodicgradPeriodicgradNonUniformgrad(...),gradNonPeriodic(...),gradPeriodic(...),gradNonUniform(...)These, right now, use dense zeros, Matrix(I, ...), diagm, kron, and dense concatenation.
divNonPeriodicdivPeriodicdivNonUniformdiv(...),div2DNonUniform(...)These also use dense zeros, Matrix(I, ...), diagm, kron, and dense concatenation.
lap(...)lap(...)These are products of D * G, so they will become sparse once div and grad return sparse matrices.
interpol(m, c)It imports SparseArrays but still allocates I = zeros(n_rows, n_cols), so it should also be changed to sparse storage.