Go to the documentation of this file.00001 {
00002 
00003 bool foundCell = false;
00004 if (injectorCell >= 0)
00005 {
00006     const vector& C = mesh_.C()[injectorCell];
00007     injectionPosition += 1.0e-9*(C - injectionPosition);
00008     
00009     foundCell = mesh_.pointInCell
00010     (
00011         injectionPosition,
00012         injectorCell
00013     );
00014 }
00015 
00016 reduce(foundCell, orOp<bool>());
00017 
00018 
00019 
00020 
00021 
00022 
00023 if (!foundCell)
00024 {
00025     injectionPosition = it->position(n);
00026     injectorCell = mesh_.findCell(injectionPosition);
00027     
00028     if (injectorCell >= 0)
00029     {
00030         const vector& C = mesh_.C()[injectorCell];
00031         injectionPosition += 1.0e-6*(C - injectionPosition);
00032 
00033         foundCell = mesh_.pointInCell
00034         (
00035             injectionPosition,
00036             injectorCell
00037         );
00038     }
00039     reduce(foundCell, orOp<bool>());
00040 
00041     
00042     
00043     
00044     if (!foundCell)
00045     {
00046         injectorCell =
00047             mesh_.findNearestCell(injectionPosition);
00048         
00049         if (injectorCell >= 0)
00050         {
00051             
00052             const vector& C = mesh_.C()[injectorCell];
00053             injectionPosition += 1.0e-9*(C - injectionPosition);
00054             
00055             foundCell = mesh_.pointInCell
00056             (
00057                 injectionPosition,
00058                 injectorCell
00059             );
00060         }
00061         reduce(foundCell, orOp<bool>());
00062         
00063         if (!foundCell)
00064         {
00065             FatalError 
00066                 << "Cannot find injection position " 
00067                     << injectionPosition
00068                     << abort(FatalError);
00069         }
00070     }
00071 }
00072 
00073 }
00074 
00075