Closed pbeckman closed 5 months ago
One other question that's likely easier to resolve --- what's the best way to load the binaries L_data.bin
, L_rowptr.bin
, L_colind.bin
that you generated with MFEM into a sparse bfMat *L
in bf_lbo.c
? Do you already have such a method?
I've refactored a bit to introduce a matPath
option that will point to a directory with the data
, rowptr
, and colind
files for M
and L
, so all I need is a method to load sparse matrices from binaries.
As a start, I just went ahead and merged this.
You'll want to read in L
and M
as BfMatCsrReal
, which has bfMatCsrRealNewFromBinaryFiles
. Just pass it the three paths.
If you want to convert to BfMat
after, use bfMatCsrRealToMat
.
Looking into $C^{-\top}$ in CHOLMOD now...
To be explicit, something like:
BfMat *L = bfMatCsrRealToMat(bfMatCsrRealNewFromBinaryFiles("rowptr.bin", "colind.bin", "data.bin"));
...
bfMatDelete(&L);
Minor bug fixes to new timing code in
lbo.c
Big refactor of
cheb_cov.c
to allow CHOLMOD sparse Cholesky instead of diagonal lumped mass matrices. I've added alumping
flag to the command line args.There are a number of places where we need to apply $C^{-\top}$ for a sparse Cholesky factor $C$. I've marked these as 'TODO' in
cheb_cov.c
. Is this possible using your existing CHOLMOD interface?Currently the code compiles and runs fine for me with lumping:
./cheb_cov ../butterfly-LBO-models/bunny0.obj 1e-4 0 10 128 1
but I have segfault problems when I change that last lumping flag to a0
, and even if the code did run, the result would be wrong because of the need for $C^{-\top}$ instead of $C^{-1}$.