FEM sparse matrix assembly c++

HI
I have C++ FEM code wrote long time ago with its own functions. Now, i am trying to upgrade this code to be faster. i am trying to convert the existing linear system function to the mkl linear system functions. the bottelneck here is the assembly of the global stiffness matrix in csr format. i want to use PARDISO solver, so i have to assemble the global matrix in csr format taking in consideration that we do not know the No. of nonzero elements (NNZ) so we have to maximize NNZ to the max possible number.

Is there any exsiting function/s that can do this?
Also, if assembling in coo format is easier and more efficient, how can i do this?

Any Ideas will be appreciated.
Topic archived. No new replies allowed.