The previous version of if_positive always returns a C-ordered array even if then_ is not C-ordered. This breaks artificial viscosity in Mirgecom when an array context uses a Fortran style data layout. This change makes the output have the same strides as then_ if the shape of then_ is known, otherwise it defaults to use the same layout as criterion.
The previous version of
if_positive
always returns a C-ordered array even ifthen_
is not C-ordered. This breaks artificial viscosity in Mirgecom when an array context uses a Fortran style data layout. This change makes the output have the same strides asthen_
if the shape ofthen_
is known, otherwise it defaults to use the same layout ascriterion
.