Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create zero_rows_and_columns API in SparseMatrix #3540

Open
lindsayad opened this issue May 1, 2023 · 3 comments
Open

Create zero_rows_and_columns API in SparseMatrix #3540

lindsayad opened this issue May 1, 2023 · 3 comments

Comments

@lindsayad
Copy link
Member

idaholab/moose#24209 has to cast to a petsc matrix and then manually call the corresponding PETSc API. We should be able to abstract that in libMesh

@zachmprince
Copy link
Contributor

MatMultTranspose would also be helpful. Probably would call it transpose_vec_mult.

@jwpeterson
Copy link
Member

@zachmprince It's not the most intuitive interface in the world, but possibly NumericVector::add_vector_transpose could work for your purposes.

  /**
   * Computes \f$ \vec{u} \leftarrow \vec{u} + A^T \vec{v} \f$,
   * i.e. adds the product of the transpose of a \p SparseMatrix \p A
   * and a \p NumericVector \p v to \p this.
   */
  virtual void add_vector_transpose (const NumericVector<T> & v,
                                     const SparseMatrix<T> & A) = 0;

@zachmprince
Copy link
Contributor

Thank you @jwpeterson! This does work. I didn't expect this to be in the NumericVector class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants