3 bool foundCell = false;
6 const vector& C = mesh_.C()[injectorCell];
7 injectionPosition += 1.0e-9*(C - injectionPosition);
9 foundCell = mesh_.pointInCell
16 reduce(foundCell, orOp<bool>());
19 // Due to the disc injection, the injectionPosition
20 // can be moved outside the domain.
21 // try point injection
25 injectionPosition = it->position(n);
26 injectorCell = mesh_.findCell(injectionPosition);
28 if (injectorCell >= 0)
30 const vector& C = mesh_.C()[injectorCell];
31 injectionPosition += 1.0e-6*(C - injectionPosition);
33 foundCell = mesh_.pointInCell
39 reduce(foundCell, orOp<bool>());
41 // if point injection also failed then
42 // find nearest cell and try that one
43 // the point is probably on an edge
47 mesh_.findNearestCell(injectionPosition);
49 if (injectorCell >= 0)
52 const vector& C = mesh_.C()[injectorCell];
53 injectionPosition += 1.0e-9*(C - injectionPosition);
55 foundCell = mesh_.pointInCell
61 reduce(foundCell, orOp<bool>());
66 << "Cannot find injection position "