CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

SparseMatrix

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 5, 2018, 08:02
Exclamation SparseMatrix
  #1
New Member
 
Join Date: Dec 2018
Posts: 2
Rep Power: 0
giuseppe03 is on a distinguished road
Hi everybody,

I'm looking for something like sparse matrix Kappa(DIM)

https://es.mathworks.com/help/matlab/ref/sparse.html

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



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!
giuseppe03 is offline   Reply With Quote

Reply

Tags
matrix, sparsematrix


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
scalarSquareMatrix to SparseMatrix giuseppe03 OpenFOAM Programming & Development 0 December 4, 2018 08:05


All times are GMT -4. The time now is 19:54.