New warning message for missing boundary conditions

Issue #2651 resolved
Samuel Cupp created an issue

I have made a pull request adding a warning inside ApplyPhysicalBCsForGroupI for when variables have no boundary conditions registered. Originally, there was a cout statement only if a preprocessor flag was defined. I have found that this warning helped me discover several mistakes that would have been very difficult to track down without it. The associated pull request is here.

For example, it made me realize that I never properly changed over BaikalVacuum’s BC selection to also register boundary conditions with the driver. If I had put this comment in earlier, my confusion about why the code was trying to sync+apply BCs way too often would have been instantly solved.

As another example, one function in BaikalVacuum reads one group everywhere and another interior. I had both everywhere, but the interior-only one has no BCs because it is only ever read on the interior. As such, I was triggering syncs for no reason. This warning pointed me to the real problem in my simulation very quickly, and this was causing my code to sync variables 24 (RK4 * variables in group) times more per iteration.

Finally, it led to me finding that MoL’s scheduling was trying to sync scalars (see Ticket #2650). While not a performance issue like the above, this is incorrect behavior.

Comments (2)

  1. Log in to comment