Open matthiasneuner opened 2 years ago
Updated title and description to include the PR. Ping @dschwen
Oh, yeah, I think there is a simple fix for that. We need a MooseADWrapper
specialization. I think the specialization I added for std::array
breaks for Fastor tensors (Fastor::Tensor<double, 3>
) which also seem to match the pattern otherwise.
The MooseADWrapper is a helper structure to get the corresponding AD type for a non-AD type. This is required internally in the material property system.
Bug Description
Hi, I used to be able to use Fastor (https://github.com/romeric/Fastor) tensors as MaterialProperties, implementing my own dataStore functions (https://github.com/matthiasneuner/chamois/blob/e07fb99bd2120198a800a1a088d37cef15d5d555/include/utils/FastorHelper.h#L36), see an example here: https://github.com/matthiasneuner/chamois/blob/e07fb99bd2120198a800a1a088d37cef15d5d555/src/kernels/GradientEnhancedMicropolarDamage.C#L50
However, it seems that recent commit 2e8a4feb5528fd359348a5f1c342024f3d0b0480 breaks this functionality, leading to completely strange clashes with AD (I am not using AD at all in any of my source files):
On the other hand, parent commit 7b6285b5791df4d1ddf0a91882c717a9305708f7 still works fine. Unfortunately, I am not that much a MOOSE/libMesh/AD pro, so I have no real idea what this type of error means and why it is caused at all, so I have not much hope in resolving that issue. Just want to leave that here in case somebody else has similar problems.
Steps to Reproduce
Switch from commit 7b6285b5791df4d1ddf0a91882c717a9305708f7 to 2e8a4feb5528fd359348a5f1c342024f3d0b0480 from #20193.
Impact
Cannot use Fastor tensors anymore as material properties.