adamantine-sim / adamantine

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

Add MechanicalOperator #160

Closed Rombur closed 2 years ago

Rombur commented 2 years ago

This adds the core of the MechanicalOperator class. There is still a lot of work to do before the class is done but I prefer to get smaller PR into the code. Right now, we can only solve an elastostatic problem, i.e., time-independent elastic problem.

stvdwtt commented 2 years ago

@Rombur I'm not sure if you already saw this, but it looks like there's an issue with finding a header file in the test for the mechanical operator.

/var/jenkins/workspace/adamantine/tests/test_mechanical_operator.cc:22:10: fatal error: weak_forms/weak_forms.h: No such file or directory
   22 | #include <weak_forms/weak_forms.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
Rombur commented 2 years ago

I forgot to enable dealii-weak_forms for the CI and to guard the test if deali-weak_forms is not enable. I remembered to do it for the source files but I forgot to do it for the tests.

Rombur commented 2 years ago

We are hitting a compiler bug with clang. deal.II has a way to deal with the compiler bug but because we compile deal.II with a version of gcc which doesn't have the bug, we don't use the work around. I will create a new image that uses clang to compile deal.II. Hopefully that should fix the problem.

Rombur commented 2 years ago

I cannot get the sanitizer to pass anymore. It dies on the standard library no matter what I do. I propose to disable the sanitizer for now and come back to this later. What do you think @stvdwtt ?

stvdwtt commented 2 years ago

@Rombur, I agree that disabling the sanitizer for now is the best path. There's no sense in getting bogged down since it doesn't seem like the issue is a real problem that prevents us from what we need to do with the code.

Rombur commented 2 years ago

OK this looks good now. I have disabled dealii-weak_forms when using clang and I have reenable the sanitizer. The problem might due to the fact that dealii-weak_forms is trying to use the release version of deal.II while adamantine is using the debug version. I need to rework the build system to make sure that everything works as intended but I won't get to it for a while.