Commit 99a7f25d authored by Mohcine Chraibi's avatar Mohcine Chraibi

remove assert and try with an if

parent 688d670e
Pipeline #12072 failed with stages
in 8 minutes and 47 seconds
......@@ -1794,7 +1794,13 @@ void UnivFFviaFM::getDirectionToUID(int destID, long int key, Point& direction,
}
void UnivFFviaFM::getDirectionToUID(int destID, long int key, Point& direction){
assert(key > 0 && key < _nPoints);
//assert(key > 0 && key < _nPoints);
if(key <=0 || key>=_nPoints)
{
direction._x = 0.;
direction._y = 0.;
return;
}
if ((_gridCode[key] == OUTSIDE) || (_gridCode[key] == WALL)) {
//bresenham line (treppenstruktur) getKeyAtPoint yields gridpoint next to edge, although position is on edge
//find a key that belongs domain (must be one left or right and second one below or above)
......@@ -1872,4 +1878,4 @@ void UnivFFviaFM::getDir2WallAt(const Point &pos, Point &p) {
* to be done in Simulation::RunBody, where
* all cores are available
* - (WIP) fill subroom* array with correct values
* */
\ No newline at end of file
* */
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