#include "BSprivate.h" /*@ BScopy_nz - Copy the nonzero values from one matrix to another Input Parameters: . A - The source matrix Output Parameters: . newA - The destination matrix Returns: void Notes: Recall that (in the incomplete Cholesky case) A and another matrix are symmetric and generally share the square dense matrices (with the assumption that the diagonal of one matrix is either known or stored elsewhere) associated with the cliques. @*/ void BScopy_nz(BSpar_mat *A, BSpar_mat *newA) { int i, j, k; int size, len; BSinode *inodes, *new_inodes; /* first copy the clique blocks */ /* we now that both matrices point to the same blocks and */ /* that A is stored in the lower triangle and newA in the upper */ BScopy_cliques(A,newA); CHKERR(0); /* now copy the inodes */ inodes = A->inodes->list; len = A->inodes->length; new_inodes = newA->inodes->list; for (i=0;iclique2inode; new_cl2i = newA->clique2inode; for (i=0;inum_cols;i++) { matrix = cl2i->d_mats[i].matrix; new_matrix = new_cl2i->d_mats[i].matrix; size = cl2i->d_mats[i].size; for (j=0;jicc_storage) { for (k=0;k