Skip to content

Mark PETSC Vector restore_array function as const #4155

Description

@dschwen

All that function does is update a mutable member and call another const function. This would resolve the conundrum of being able to call get_array_read on a const reference to a PetscVector, but being unable to call the mandatory restore_array after the read. Certain MOOSE apps circumvent this by casting const away, but the elegant solution here is to just mark restore_array as const.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions