LoopStructural icon indicating copy to clipboard operation
LoopStructural copied to clipboard

[BUG] invalid indexing of tetrahedron when area is outside of tetrahedral mesh.

Open lachlangrose opened this issue 5 years ago • 0 comments

Describe the bug Using PLI if you try and evaluate the mesh outside of the model area it has an indexing problem. Seems to occur when modelling faults.

packages/LoopStructural/interpolators/structured_tetra.py", line 109, in evaluate_value values[inside] = np.sum(c[inside,:]*self.properties[prop][tetras[inside,:]],axis=1) IndexError: index 29086 is out of bounds for axis 0 with size 26880

Need to make sure that inside is working correctly and maybe add a unit test for this.

Minimal working example The minimal code required to reproduce the bug:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Python environment [anaconda, python3.6]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

lachlangrose avatar Nov 20 '20 04:11 lachlangrose