B
Babak
Hello everyone,
I'm working on some Finite Elements(FE) codes in C and now I
encountered some problems in assembly stage. The main idea is that a
large number of 3 by 3 elemental stiffness matrices are calculated and
then they should mapped to specific elements in a very big and sparse
global stiffness matrix. I think the preferred storage format for the
sparse matrix is Compresses Row Storage (CRS) format because it is
compatible with many different sparse solver packages. Now the problem
is that I have no idea how to update and assemble "ia" (pointers to the
begining of each row), "ja" (column indices) and "a" (nonzero values)
arrays as each local stiffness matrix is calculated in the loop. Is it
a better idea to first calculate all the elemental stiffness matrices
and then assemble them in the global system once at the end or I should
update these three arrays each time a local matrix is calculated? I
think SPARSE function in MATLAB can do much of these works for me but I
can't find any similar fuction in C. Since this is my first Finite
Element program, any comments, algorithms or references on this issue
will be a great help.
I'm working on some Finite Elements(FE) codes in C and now I
encountered some problems in assembly stage. The main idea is that a
large number of 3 by 3 elemental stiffness matrices are calculated and
then they should mapped to specific elements in a very big and sparse
global stiffness matrix. I think the preferred storage format for the
sparse matrix is Compresses Row Storage (CRS) format because it is
compatible with many different sparse solver packages. Now the problem
is that I have no idea how to update and assemble "ia" (pointers to the
begining of each row), "ja" (column indices) and "a" (nonzero values)
arrays as each local stiffness matrix is calculated in the loop. Is it
a better idea to first calculate all the elemental stiffness matrices
and then assemble them in the global system once at the end or I should
update these three arrays each time a local matrix is calculated? I
think SPARSE function in MATLAB can do much of these works for me but I
can't find any similar fuction in C. Since this is my first Finite
Element program, any comments, algorithms or references on this issue
will be a great help.