From 41e6a6c605e89e579915b526f08a41e04ddbc819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Wed, 24 Apr 2024 13:39:38 +0200 Subject: [PATCH] Update mapping api (#113) --- cpp/assemble_matrix.cpp | 7 ++++--- cpp/assemble_vector.cpp | 4 ++-- cpp/lifting.h | 7 ++++--- cpp/utils.h | 7 ++++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cpp/assemble_matrix.cpp b/cpp/assemble_matrix.cpp index d9669b19..fb9f25a8 100644 --- a/cpp/assemble_matrix.cpp +++ b/cpp/assemble_matrix.cpp @@ -560,12 +560,13 @@ void assemble_matrix_impl( auto element1 = a.function_spaces().at(1)->element(); std::function, const std::span, const std::int32_t, const int)> - apply_dof_transformation - = element0->template get_pre_dof_transformation_function(); + apply_dof_transformation = element0->template dof_transformation_fn( + dolfinx::fem::doftransform::standard); std::function, const std::span, const std::int32_t, const int)> apply_dof_transformation_to_transpose - = element1->template get_post_dof_transformation_function(); + = element1->template dof_transformation_right_fn( + dolfinx::fem::doftransform::transpose); const bool needs_transformation_data = element0->needs_dof_transformations() diff --git a/cpp/assemble_vector.cpp b/cpp/assemble_vector.cpp index b09ea1b1..79db30ef 100644 --- a/cpp/assemble_vector.cpp +++ b/cpp/assemble_vector.cpp @@ -119,8 +119,8 @@ void _assemble_vector( const std::function&, const std::span&, std::int32_t, int)> - dof_transform - = element->template get_pre_dof_transformation_function(); + dof_transform = element->template dof_transformation_fn( + dolfinx::fem::doftransform::standard); const bool needs_transformation_data = element->needs_dof_transformations() or L.needs_facet_permutations(); std::span cell_info; diff --git a/cpp/lifting.h b/cpp/lifting.h index a0d9bf85..0682dd88 100644 --- a/cpp/lifting.h +++ b/cpp/lifting.h @@ -203,13 +203,14 @@ void apply_lifting( const std::function&, const std::span&, std::int32_t, int)> - dof_transform - = element0->template get_pre_dof_transformation_function(); + dof_transform = element0->template dof_transformation_fn( + dolfinx::fem::doftransform::standard); const std::function&, const std::span&, std::int32_t, int)> dof_transform_to_transpose - = element1->template get_post_dof_transformation_function(); + = element1->template dof_transformation_right_fn( + dolfinx::fem::doftransform::transpose); // Loop over cell integrals and lift bc if (a->num_integrals(dolfinx::fem::IntegralType::cell) > 0) diff --git a/cpp/utils.h b/cpp/utils.h index 6c0e2af0..f19413a3 100644 --- a/cpp/utils.h +++ b/cpp/utils.h @@ -1179,8 +1179,8 @@ evaluate_basis_functions(const dolfinx::fem::FunctionSpace& V, auto push_forward_fn = element->basix_element().template map_fn(); - auto apply_dof_transformation - = element->template get_pre_dof_transformation_function(); + auto apply_dof_transformation = element->template dof_transformation_fn( + dolfinx::fem::doftransform::standard); mdspan3_t full_basis(output_basis.data(), reference_shape); for (std::size_t p = 0; p < cells.size(); ++p) @@ -1301,7 +1301,8 @@ std::pair, std::array> tabulate_dof_coordinates( } const auto apply_dof_transformation - = element->template get_pre_dof_transformation_function(); + = element->template dof_transformation_fn( + dolfinx::fem::doftransform::standard); const std::array bsize = cmap.tabulate_shape(0, X_shape[0]); std::vector phi_b(