aspect icon indicating copy to clipboard operation
aspect copied to clipboard

remove checks for invalid strain_rate

Open tjhei opened this issue 2 years ago • 2 comments

I am confused by the following: https://github.com/geodynamics/aspect/blob/0bb443da15a5eaf96baaa5a382100a5c0d959a75/source/material_model/rheology/visco_plastic.cc#L121-L122

I think only a SymmetricTensor filled with NaN would make this condition true. Why do we catch this situation here? Do we forget to fill it somewhere? If it is needed, we should use !std::isfinite() instead.

@naliboff Do you remember why this was added?

tjhei avatar Jul 02 '22 19:07 tjhei

I am looking back at this issue and seems to me that it is there so that at timestep 0 (where velocity and as such strainrate would be 0), we do not end up using 0 as a strainrate (or a minimum strainrate), but replace it with a reference strainrate. I guess this is ok?

tjhei avatar Feb 09 '23 17:02 tjhei

The second part of the condition is true if the strain rate is zero or very nearly so. (The condition is not a great choice because it is dimensionally not correct: the left hand side has units of strain, whereas the right hand side is an absolute number.)

If you had NaNs in the strain rate, then any comparison will return false, so the condition cannot be true.

bangerth avatar Jul 14 '23 01:07 bangerth