Skip to content

Commit

Permalink
Update mapping api (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd authored Apr 24, 2024
1 parent 2e42426 commit 41e6a6c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
7 changes: 4 additions & 3 deletions cpp/assemble_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,13 @@ void assemble_matrix_impl(
auto element1 = a.function_spaces().at(1)->element();
std::function<void(std::span<T>, const std::span<const std::uint32_t>,
const std::int32_t, const int)>
apply_dof_transformation
= element0->template get_pre_dof_transformation_function<T>();
apply_dof_transformation = element0->template dof_transformation_fn<T>(
dolfinx::fem::doftransform::standard);
std::function<void(std::span<T>, const std::span<const std::uint32_t>,
const std::int32_t, const int)>
apply_dof_transformation_to_transpose
= element1->template get_post_dof_transformation_function<T>();
= element1->template dof_transformation_right_fn<T>(
dolfinx::fem::doftransform::transpose);

const bool needs_transformation_data
= element0->needs_dof_transformations()
Expand Down
4 changes: 2 additions & 2 deletions cpp/assemble_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ void _assemble_vector(
const std::function<void(const std::span<T>&,
const std::span<const std::uint32_t>&, std::int32_t,
int)>
dof_transform
= element->template get_pre_dof_transformation_function<T>();
dof_transform = element->template dof_transformation_fn<T>(
dolfinx::fem::doftransform::standard);
const bool needs_transformation_data
= element->needs_dof_transformations() or L.needs_facet_permutations();
std::span<const std::uint32_t> cell_info;
Expand Down
7 changes: 4 additions & 3 deletions cpp/lifting.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,14 @@ void apply_lifting(
const std::function<void(const std::span<T>&,
const std::span<const std::uint32_t>&, std::int32_t,
int)>
dof_transform
= element0->template get_pre_dof_transformation_function<T>();
dof_transform = element0->template dof_transformation_fn<T>(
dolfinx::fem::doftransform::standard);
const std::function<void(const std::span<T>&,
const std::span<const std::uint32_t>&, std::int32_t,
int)>
dof_transform_to_transpose
= element1->template get_post_dof_transformation_function<T>();
= element1->template dof_transformation_right_fn<T>(
dolfinx::fem::doftransform::transpose);

// Loop over cell integrals and lift bc
if (a->num_integrals(dolfinx::fem::IntegralType::cell) > 0)
Expand Down
7 changes: 4 additions & 3 deletions cpp/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,8 @@ evaluate_basis_functions(const dolfinx::fem::FunctionSpace<U>& V,
auto push_forward_fn
= element->basix_element().template map_fn<xu_t, xU_t, xJ_t, xK_t>();

auto apply_dof_transformation
= element->template get_pre_dof_transformation_function<U>();
auto apply_dof_transformation = element->template dof_transformation_fn<U>(
dolfinx::fem::doftransform::standard);

mdspan3_t full_basis(output_basis.data(), reference_shape);
for (std::size_t p = 0; p < cells.size(); ++p)
Expand Down Expand Up @@ -1301,7 +1301,8 @@ std::pair<std::vector<U>, std::array<std::size_t, 2>> tabulate_dof_coordinates(
}

const auto apply_dof_transformation
= element->template get_pre_dof_transformation_function<U>();
= element->template dof_transformation_fn<U>(
dolfinx::fem::doftransform::standard);

const std::array<std::size_t, 4> bsize = cmap.tabulate_shape(0, X_shape[0]);
std::vector<U> phi_b(
Expand Down

0 comments on commit 41e6a6c

Please sign in to comment.