You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 mandatoryrestore_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.
The text was updated successfully, but these errors were encountered:
All that function does is update a
mutable
member and call anotherconst
function. This would resolve the conundrum of being able to callget_array_read
on a const reference to aPetscVector
, but being unable to call the mandatoryrestore_array
after the read. Certain MOOSE apps circumvent this by castingconst
away, but the elegant solution here is to just markrestore_array
asconst
.The text was updated successfully, but these errors were encountered: