FEniCS/basix

Improve maps

Closed this issue · 4 comments

The code in maps.h can be sped up and optimised

In particular, we should remove this switch:

basix/cpp/basix/maps.h

Lines 133 to 147 in e2137c8

switch (map_type)
{
case maps::type::identity:
return impl::identity(u, U, J, detJ, K);
case maps::type::covariantPiola:
return impl::covariant_piola(u, U, J, detJ, K);
case maps::type::contravariantPiola:
return impl::contravariant_piola(u, U, J, detJ, K);
case maps::type::doubleCovariantPiola:
return impl::double_covariant_piola(u, U, J, detJ, K);
case maps::type::doubleContravariantPiola:
return impl::double_contravariant_piola(u, U, J, detJ, K);
default:
throw std::runtime_error("Mapping not yet implemented");
}

Can we close this following #342?

Fixed (for now) in #342.

Future work could be to remove the xt::view, which can be slow.