Commit 4b302a63 authored by Robert K's avatar Robert K

[bugfix][periodic] only throw when absolutely no periodic boundaries

have been found.
parent b9965e9d
Pipeline #16814 failed with stage
in 111 minutes and 53 seconds
......@@ -482,16 +482,26 @@ void checkGrid( GridType& grid )
template <class GridType>
void checkForPeriodicBoundaries( GridType& grid )
{
bool foundPeriodicBnd = false ;
for (const auto& element : elements(grid.leafGridView()))
{
for (const auto& intersection : intersections(grid.leafGridView(), element))
{
if (intersection.neighbor() && intersection.boundary())
return;
{
foundPeriodicBnd = true ;
}
}
}
DUNE_THROW( Dune::InvalidStateException, "No periodic boundaries found!" );
// check if some process has found periodic bnds
// due to load balancing issues periodic bnds
// might only end up on one core
foundPeriodicBnd = grid.comm().max( foundPeriodicBnd );
if( ! foundPeriodicBnd )
{
DUNE_THROW( Dune::InvalidStateException, "No periodic boundaries found!" );
}
}
template <class GridType>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment