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

Fix compiler warning #13914

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions include/deal.II/matrix_free/evaluation_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -3697,6 +3697,15 @@ namespace internal
const unsigned int face_no,
const MatrixFreeFunctions::ShapeInfo<Number> &shape_info)
{
if (dim == 1)
Copy link
Member

Choose a reason for hiding this comment

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

Question: is it possible to have a 1D RT? If not one should probably also add here an assert!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is asserted in the class itself, but I might be mistaken

Copy link
Member

Choose a reason for hiding this comment

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

There is no assert here:

if (shape_info.element_type == MatrixFreeFunctions::tensor_raviart_thomas)
interpolate_generic_raviart_thomas<do_evaluate, add_into_output>(
n_components, input, output, flags, face_no, shape_info);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the one I was referring to

Assert(dim >= 2, ExcImpossibleInDim(dim));

{
// This should never happen since the FE_RaviartThomasNodal is not
// defined for dim = 1. It prevents compiler warnings of infinite
// recursion.
Assert(false, ExcInternalError());
return;
}

bool increase_max_der = false;
if ((flag & EvaluationFlags::hessians && max_derivative < 2) ||
(flag & EvaluationFlags::gradients && max_derivative < 1))
Expand Down