libROM icon indicating copy to clipboard operation
libROM copied to clipboard

version of ComputeCtAB not involving HypreParMatrix

Open gokhalen opened this issue 1 year ago • 1 comments

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.

gokhalen avatar Mar 21 '23 08:03 gokhalen

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);

dylan-copeland avatar Mar 22 '23 18:03 dylan-copeland