diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index c73d558c5f86680521af72543e459df959f67fe5..6f24e87dacf4f5148bb8b178c24d0a8fc0bb3856 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -1042,6 +1042,10 @@ operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) //- Inner-product of a Tensor and a Vector template<class Cmpt> +#if defined(__GNUC__) && !defined(__clang__) +// Workaround for gcc (11+) that fails to handle tensor dot vector +__attribute__((optimize("no-tree-vectorize"))) +#endif inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt>>::type operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v) {