Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look-up table for Hermite #16265

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ivweber
Copy link
Contributor

@ivweber ivweber commented Nov 13, 2023

This pull request adds a function to FEHermite to output a look-up table of DOFs, showing which basis functions correspond to which derivatives on each edge. This function is useful for various purposes, such as boundary implementations and cutFEM stabilisation terms.

…, showing which basis functions correspond to which derivatives on each edge.
Copy link
Member

@Rombur Rombur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a test.

*/
Table<2, unsigned int>
get_dofs_corresponding_to_outward_normal_derivatives(
const unsigned int derivative_order) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is derivative_order exactly?

const std::vector<unsigned int> l2h =
get_lexicographic_to_hierarchic_numbering();
const unsigned int dofs_per_cell = Utilities::pow(degree + 1, dim);
AssertDimension(dofs_per_cell, l2h.size());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AssertDimension(dofs_per_cell, l2h.size());
AssertDimension(Utilities::pow(degree + 1, dim), l2h.size());

or you can use [[maybe_unused]]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since dim is known at compile time can't we use Utilities::fixed_power : https://www.dealii.org/current/doxygen/deal.II/namespaceUtilities.html#a834c6b595ada6f8e73c78d9bbd8ec551

* batch index: Index of the current batch in the list of batches
* local_index: Index of the current DoF within a batch
*
* The variable correction is used because the pattern of relevant
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If correction is an offset, just call the variable offset

…showing its usage in calculating a cutFEM stabilisation matrix.

Table<2, unsigned int>
get_dofs_corresponding_to_outward_normal_derivatives(
const unsigned int derivative_order) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const unsigned int derivative_order) const;
const unsigned int derivative_order) const;

Comment on lines +600 to +602
Table<2, unsigned int> dofs_of_nonzero_values_on_faces =
dynamic_cast<const FE_Hermite<DIM> &>(dof_handler.get_fe())
.get_dofs_corresponding_to_outward_normal_derivatives(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this used?



/**
* Test for the FE_Hermite method function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not seem to do anything!?


for (unsigned int j = 5; j < 6; j += 2)
{
CutHermiteWaveCircle::WaveSolver system(system_parameters, j);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test seems to be quite large. How long does the test take? Do you really want to all of this or just a subset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants