Skip to content

Commit

Permalink
Document transpose data storate for blocked elements (#3156)
Browse files Browse the repository at this point in the history
* Add dof transformation docs

* Doc updates

* correct (?) and document transpose data storage for blocked elements

* that's a permutation not a transformation

* Update cpp/dolfinx/fem/FiniteElement.h

* Update cpp/dolfinx/fem/FiniteElement.h

* better doc

---------

Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
  • Loading branch information
mscroggs and garth-wells committed Apr 22, 2024
1 parent e520be2 commit 91d3bee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/dolfinx/fem/FiniteElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ FiniteElement<T>::dof_permutation_fn(bool inverse, bool scalar_element) const
}
else if (!scalar_element)
{
// Vector element
// Blocked element
std::function<void(std::span<std::int32_t>, std::uint32_t)>
sub_element_function = _sub_elements[0]->dof_permutation_fn(inverse);
int dim = _sub_elements[0]->space_dimension();
Expand Down
8 changes: 6 additions & 2 deletions cpp/dolfinx/fem/FiniteElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class FiniteElement
}
else if (!scalar_element)
{
// Vector element
// Blocked element
std::function<void(std::span<U>, std::span<const std::uint32_t>,
std::int32_t, int)>
sub_function
Expand Down Expand Up @@ -438,7 +438,11 @@ class FiniteElement
}
else if (!scalar_element)
{
// Vector element
// Blocked element
// The transformation from the left can be used here as blocked
// elements use xyzxyzxyz ordering, and so applying the DOF
// transformation from the right is equivalent to applying the DOF
// transformation from the left to data using xxxyyyzzz ordering
std::function<void(std::span<U>, std::span<const std::uint32_t>,
std::int32_t, int)>
sub_function
Expand Down

0 comments on commit 91d3bee

Please sign in to comment.