Periodic boundary conditions were not working when they were not declare as the last BC in the parameter file.
BC_type was changing value at every BC being parsed. "BC_type" was being checked later in the code (in dem.cc) to set "has_periodic_boundaries" to true or false. If the periodic BC was being declared before the an other BC, "BC_type" was not set to "BoundaryType::periodic", thus "has_periodic_boundaries = false".
Description of the solution
We store every BC type in a vector (BC_types).
We check each component of that vector, if it's equal to "BoundaryType::periodic", then "has_periodic_boundaries = true"
How Has This Been Tested?
Every test is passing.
I can modify one of our current test to add a dummy BC at the end of a parameter file, so that it check for this kind of problem.
Comments
Not gonna lie, it was not hard a bug spot in the code... wish I had spot this mistake earlier in my results....
Description of the problem
Description of the solution
How Has This Been Tested?
Comments