Skip to content

Nonlinear solver generalizations - #4537

Open
lindsayad wants to merge 7 commits into
libMesh:develfrom
lindsayad:more-shell-matrix-support
Open

Nonlinear solver generalizations#4537
lindsayad wants to merge 7 commits into
libMesh:develfrom
lindsayad:more-shell-matrix-support

Conversation

@lindsayad

Copy link
Copy Markdown
Member

I want to use MATSHELL for the Jacobian and possibly MATAIJ for the preconditioning matrix so need to develop some additional support for that use case

lindsayad and others added 3 commits September 1, 2026 14:54
Importantly this both sets the wrapper as initialized
and instructs the wrapper not to destroy the PETSc
matrix on exit

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@moosebuild

moosebuild commented Sep 2, 2026

Copy link
Copy Markdown

Job Coverage, step Generate coverage on d8ad017 wanted to post the following:

Coverage

0a0a9d #4537 d8ad01
Total Total +/- New
Rate 65.94% 65.92% -0.01% 100.00%
Hits 79392 79405 +13 54
Misses 41014 41044 +30 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

lindsayad and others added 3 commits September 2, 2026 09:20
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…package

Co-Authored-By: Claude <noreply@anthropic.com>
@lindsayad
lindsayad marked this pull request as ready for review September 2, 2026 20:28
@lindsayad

Copy link
Copy Markdown
Member Author

Still waiting on that MOOSE master merge to get those solid mechanics test fixes!


explicit PetscMFFDMatrix(const Parallel::Communicator & comm_in);

PetscMFFDMatrix & operator=(Mat m);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this around for backwards compatibility? Pretty specialized so you can deprecate it if you want, but it's been around for two years and was never marked libmesh_experimental().

void
PetscMatrixShellMatrix<T>::zero()
{
libmesh_error();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we libmesh_error_msg("Called a method that is unimplemented for arbitrary shell matrices") or something, here and elsewhere in the new overloads?


/**
* An optional matrix to use as the actual Jacobian operator (Amat), distinct from \p matrix
* (used as the preconditioning matrix, Pmat). See set_operator_matrix().

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like the opposite of what I would have expected. implicit_system.h refers to its matrix as the "system matrix" in solves of "Ax=b" at one point, and as the Jacobian matrix at another. Shouldn't that stay "A", and "P" be the new matrix?

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

Successfully merging this pull request may close these issues.

3 participants