adamantine-sim / adamantine

Software to simulate heat transfer for additive manufacturing
https://adamantine-sim.github.io/adamantine/
Other
39 stars 11 forks source link

Finish anisotropy #135

Closed Rombur closed 2 years ago

Rombur commented 2 years ago

This is the last PR for the anisotropy. It propagates the cosine and the sine from the material through the rest of the code and it uses it in ThermalOperator and ThermalOperatorDevice

Rombur commented 2 years ago

I don't know why the test is failing. It passes on when I run the container locally. The only thing that's different is the machine where the tests are run. The tests pass on fetnat but fail on jiminy

Rombur commented 2 years ago

jiminy uses a different kind of gpu than fetnat. jiminy uses V100s and fetnat uses V100. Not sure if it's the reason there is a problem but that's the only difference I know of.

Rombur commented 2 years ago

I found the bug and I am in the process of fixing it. There are two out-of-bound accesses in some std::vector The faulty code is on the CPU so I don't understand why the sanitizer doesn't report an error.

Rombur commented 2 years ago

This is ready to be merged but I need another review because I had to change quite a bit of code. Basically the problem was that the deposition cosine/sine was updated at the same than the matrix free. This works during initialization but when we add material or when the mesh is refined we first need to reinitialize the matrix free and then we can get the cosine/sine from the new mesh.