Point sources/receivers shared by several elements
The current algorithm to find the sources and receivers will not stop looking for them once a point is located. For example, if a source or a receiver is on an internal edge shared by 4 elements, the point will be found on 4 neighbour elements and the constant terms will be calculated 4 times. With GPU this leads to incorrect source/receiver constant values. Note that these incorrect values are not reproducible: they vary from one run to another.
To Reproduce
Steps to reproduce the behavior:
Add some printf in AcousticWaveEquationSEMKernel.hpp or ElasticWaveEquationSEMKernel.hpp like: printf("Elem %d source %d sourceIsAccessible %d\n", k, isrc, sourceIsAccessible[isrc]); around L98 and printf("Node=%d Elem=%d sourceCoords=%.3f %.3f %.3f sourceConstants=%.3e \n", a,k,coords[0],coords[1],coords[2],sourceConstants[isrc][a]); inside for( localIndex a = 0; a < numNodesPerElem; ++a ){}
Recompile GEOS (with or without pyGEOS)
use the xml input below (the mesh file path is available in the xml)
Point sources/receivers shared by several elements The current algorithm to find the sources and receivers will not stop looking for them once a point is located. For example, if a source or a receiver is on an internal edge shared by 4 elements, the point will be found on 4 neighbour elements and the constant terms will be calculated 4 times. With GPU this leads to incorrect source/receiver constant values. Note that these incorrect values are not reproducible: they vary from one run to another.
To Reproduce Steps to reproduce the behavior:
Node=0 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=0 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=0 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=2.000e-01
Node=1 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=1 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=1 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=2 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=2 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=2.000e-01
Node=2 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=3 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=2.000e-01
Node=3 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=3 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=4 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=4 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=5 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=5 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=4 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=8.000e-01
Node=6 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=8.000e-01
Node=5 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=6 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Node=1 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=2.000e-01
Node=6 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=7 Elem=8127 sourceCoords=6325.000 3162.500 408.000 sourceConstants=8.000e-01 Node=7 Elem=8128 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=2 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=7 Elem=8256 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=3 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=4 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=5 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=8.000e-01 Node=6 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00 Node=7 Elem=8255 sourceCoords=6325.000 3162.500 408.000 sourceConstants=0.000e+00
Expected behavior Preferably make the source/receiver search yield a unique and consistent result.
Platform (please complete the following information):
xml input