LLNL / libROM

Model reduction library with an emphasis on large scale parallelism and linear subspace methods
https://www.librom.net
Other
198 stars 36 forks source link

version of ComputeCtAB not involving HypreParMatrix #198

Open gokhalen opened 1 year ago

gokhalen commented 1 year ago

Is there a version of ComputeCtAB in which A is a serial matrix, perhaps just a mfem matrix? I'm asking this because, if such a routine were available, I would be able to write my code in serial, reducing complexity.

dylan-copeland commented 1 year ago

We do not have such a version, but it is easy to construct a HypreParMatrix. Since libROM builds with a parallel build of MFEM, "serial" means 1 MPI rank. So even in the serial case you can use a HypreParMatrix. In MFEM, the simpler, serial class for a sparse matrix is SparseMatrix. If you prefer to compute a SparseMatrix on 1 MPI rank, then you can use that SparseMatrix to construct a HypreParMatrix, with row/col starts being 0:

HypreParMatrix(MPI_Comm comm, HYPRE_BigInt row_starts, HYPRE_BigInt col_starts, SparseMatrix *a);