title: Generation of random 2D integration path
body: <p>I'm trying to compute a direct spatial integration of a scalar field. For technical reasons, I want a single-point boundary condition to start the integration and I want a random integration path in order to avoid directivity effects in error accumulation. But here I have a problem trying to generate efficiently a random 2D integration path. Typically, what should be done is :</p>
  
  <ol>
  <li>Select one random grid index where boundary condition is applied and where the integration starts.</li>
  <li>Select randomly one adjacent grid index to integrate.</li>
  <li>Select randomly one grid index already integrated AND which has adjacent grid index not integrated.
  Then repeat 2. and 3. until the whole grid is integrated.</li>
  </ol>
  
  <p>I'm having an issue trying to find an efficient solution to generated such a path, without having to each time look at all the adjacent grid index of all the elements to check the condition in 2.</p>
  
  <p>Does anyone have a couple of leads to find a solution ?</p>
  
  <p>Thanks.</p>