The code uses integer division, followed by a double precision multiplication.
It is admittedly not immediately obvious what it is supposed to do. Clarify
that we really mean the integer division.
{
case RefinementCase<dim-1>::cut_x:
xi_scale=0.5;
- xi_translation=subface_no%2 * 0.5;
+ xi_translation = subface_no%2 * 0.5;
break;
case RefinementCase<dim-1>::cut_y:
eta_scale=0.5;
- eta_translation=subface_no%2 * 0.5;
+ eta_translation = subface_no%2 * 0.5;
break;
case RefinementCase<dim-1>::cut_xy:
xi_scale= 0.5;
eta_scale=0.5;
- xi_translation =subface_no%2 * 0.5;
- eta_translation=subface_no/2 * 0.5;
+ xi_translation = int(subface_no%2) * 0.5;
+ eta_translation = int(subface_no/2) * 0.5;
break;
default:
Assert(false,ExcInternalError());
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams