SCECcode / awp

AWP with topography
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Testing acoustic materials #11

Open deanrockit opened 5 years ago

deanrockit commented 5 years ago

Tests with topography in presence of acoustic materials should be done to see how curvilinear grids work with water. I'll do the test and keep you guys posted.

ooreilly commented 5 years ago

@deanrockit thanks! could you please check both with and without a flat topography file? I'm concerned that there are division by zeros that will produce infs or nans irrespective of topography. I don't understand how the original code handles this case because it uses 1/mu in the computations.

ooreilly commented 5 years ago

@deanrockit will you also make PR once you have the test configured so that we can keep it for future use?

hzfmer commented 5 years ago

@ooreilly
We noticed this division-by-zero issue before. Somehow the compiler takes care of it, and 1 / ( 1 / mu) returns 0 at last, so there is no specific statements to handle it in the original code, if I remember it correctly.

Nonetheless, I am interested to see how it works with topography present.

deanrockit commented 5 years ago

@ooreilly That's right. It depends on how compiler deals with 1/0. Compiler on Summit doesn't like it and produced NaN. Therefore, there's a special treatment in mesh.c to tackle this scenario, by setting Vs to a very small value.