|
[Sponsors] |
December 4, 2018, 09:05 |
scalarSquareMatrix to SparseMatrix
|
#1 |
New Member
Join Date: Dec 2018
Posts: 2
Rep Power: 0 |
Hi everybody,
I wrote a script using: Code:
scalarSquareMatrix Kappa( DIM ,Zero); and I access to the element writing Kappa[i][j]; now I need a sparse matrix, because I'm increasing the size of this matrix. Can I just change the "declaration"? Or do I need to rewrite all the script in a different way? I'm looking for something like sparse matrix Kappa(DIM) https://es.mathworks.com/help/matlab/ref/sparse.html I tried with: LduMatrix<scalar,scalar,scalar> Kappa(DIM), but it doesn't work. At the end I solve a system like that: Code:
scalarField RHS(size, 0); LUscalarMatrix LU(Kappa); scalarField UU(LU.solve(RHS)); Thanks for the help in advance! Last edited by giuseppe03; December 5, 2018 at 09:11. |
|
Tags |
ldumatrix, matrix, sparse |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
inner product of a scalarSquareMatrix and scalarDiagonalMatrix. | sharonyue | OpenFOAM Programming & Development | 0 | June 3, 2014 04:37 |