1

我目前正在使用 matlab 研究 FEM。

我的代码是这样的

function [A,rhs] = Assemble()

pre_process();
[IA,JA,A,rhs] = assemble(pre_processed_parameters); // mex-func
// IA : row index 
// JA : col index
//  A : value

A = sparse(IA,JA,A);

A的大小是什么时候ten million x ten million

pre_process不到 1 秒

assemble大约需要 5 秒

sparse大约需要 820 秒

主要耗时的线路是单行sparse

有没有更快的收集方法?

的性质IA和是JAA

  1. Pair 对(IA[k],JA[k])all 具有所有不同的值k

  2. 得到的矩阵 ,A是下三角矩阵并且具有块结构

4

0 回答 0