aspect
aspect copied to clipboard
Simplify fill_plastic_outputs that fills PlasticAdditionalOutputs
fill_plastic_outputs
in MM/R/visco_plastic.cc outputs the current friction angle and cohesion and whether yielding occurs or not. The function is called in MM/visco_plastic.cc after calculate_isostrain_viscosities
has been called. calculate_isostrain_viscosities
returns whether the material is yielding and the current friction angle per volume_fraction. Whether or not yielding occurs is averaged over the volume_fractions and passed as an argument to fill_plastic_outputs
.
In fill_plastic_outputs
, calculate_isostrain_viscosities
is called again to get the current friction angle. As it doesn't return the current cohesion, the cohesion is computed again (it is also done in calculate_isostrain_viscosities
) including strain weakening. Current friction angle and cohesion are then averaged over the volume fractions.
I propose to have calculate_isostrain_viscosities
also return the current cohesion per volume fraction, and to pass on yielding, friction and cohesion per volume fraction to fill_plastic_outputs
. fill_plastic_outputs
can then do the averaging only.
@naliboff , @bobmyhill Do you agree? If so, I'll make a PR.
@anne-glerum - Yes, this seems like a good idea!
Addressed by #4941