In the diffusion study the right edge of the grid was once set by the line u[:, 63] =…

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Research software practice, verification and validation · Research software practice, verification and validation

Scientific Computing for Physicists, Ch A repository others can build on: collaboration, history and workflows

Problem

In the diffusion study the right edge of the grid was once set by the line u[:, 63] = u[:, 62], a no-flux edge written for a grid 64 columns wide. Working from that commit, main replaced it with u[:, -1] = u[:, -2], so that the same line works at every resolution. Branch sink instead changed it to u[:, 63] = 0.0, because the study now models the right edge as a cold sink held at zero. Merging sink into main stops with a conflict, shown with the marker line of angle brackets and 'HEAD', then u[:, -1] = u[:, -2] with the comment 'no-flux right edge', then the marker line of equals signs, then u[:, 63] = 0.0 with the comment 'right edge held at zero', then the marker line of angle brackets and 'sink'. ((a)) Say whose version sits above the equals-sign marker line and whose sits below it. ((b)) Write the resolved line, and explain why keeping either side exactly as it stands is wrong. ((c)) State what must happen before the resolution is committed, and name a standing test (for example the known-answer test) that would fail on a grid 128 columns wide if the column index 63 survived the merge.

Browse the problem library