Issue with KellyErrorEstimator after grid refinement in deal.II

53 views
Skip to first unread message

Devansh Sonigra

unread,
Mar 17, 2025, 9:42:25 AM3/17/25
to deal.II User Group
Hello everyone,

I am working with deal.II and encountering an issue with KellyErrorEstimator. I started with a code that solves the Laplace equation in a non-convex domain using adaptive refinement. The original code was designed for rectangular mesh, but I updated it to work with a triangular mesh. While KellyErrorEstimator runs fine on the initial mesh and first iteration of refinement, the code breaks on the second iteration, and the error seems to originate from KellyErrorEstimator.

Has anyone faced a similar issue or have any suggestions on what might be causing this? Any insights on debugging would be greatly appreciated.

Thanks in advance!

Best,
Devansh

Output:

  Number of active cells: 2400

   Total number of cells: 2400

   Number of degrees of freedom: 1281

   35 CG iterations needed to obtain convergence.

Computing error norms

Refining grid based on error estimator

Debug message - Before running KellyErrorEstimator

Debug message - After running KellyErrorEstimator

   Number of active cells: 2634

   Total number of cells: 2712

   Number of degrees of freedom: 1414

   53 CG iterations needed to obtain convergence.

Computing error norms

Refining grid based on error estimator

Debug message - Before running KellyErrorEstimator

Segmentation fault: 11


Rectangular_mesh.cc
Triangular_mesh.cc
Gamma.msh

Daniel Arndt

unread,
Mar 17, 2025, 12:07:02 PM3/17/25
to dea...@googlegroups.com
Devanash,

What does a backtrace look like when running in a debugger?

Best,
Daniel
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/dealii/b4386a30-773c-4bc3-bd5d-68fb843b11cen%40googlegroups.com.

Devansh Sonigra

unread,
Mar 17, 2025, 1:23:16 PM3/17/25
to deal.II User Group
Hi Daniel,

Below I have attached a text file which contains the backtrace message. It looks like the error originates from dealii::KellyErrorEstimator<2,2>::estimate and could involve dealii::hp::FESubfaceValues and QProjector. Could this be related to the way the triangulated mesh is handled in the estimator? 

Do you have any suggestions on how to debug this further?

Thanks,
Devansh.
backtrace.txt

Daniel Arndt

unread,
Mar 17, 2025, 5:46:43 PM3/17/25
to dea...@googlegroups.com
Devanash,

frame #7: 0x0000000105f4de3a
libdeal_II.g.9.6.0.dylib`dealii::deal_II_exceptions::internals::abort(dealii::ExceptionBase
const&) + 10
frame #8: 0x0000000100516d39 libdeal_II.g.9.6.0.dylib`void
dealii::deal_II_exceptions::internals::issue_error_noreturn<dealii::StandardExceptions::ExcNotImplemented>(dealii::deal_II_exceptions::internals::ExceptionHandling,
char const*, int, char const*, char const*, char const*,
dealii::StandardExceptions::ExcNotImplemented) + 201

tells you that you are trying to use some functionality that is not
yet implemented. The error message you get when running the code in
Debug mode should be much more descriptive than that stack trace.

Best regards,
Daniel
> To view this discussion visit https://groups.google.com/d/msgid/dealii/5121b014-5a78-4151-81cc-11662fe1632cn%40googlegroups.com.

Praveen C

unread,
Mar 17, 2025, 10:30:05 PM3/17/25
to Deal. II Googlegroup
I get this message in debug mode with dealii-9.6.2

--------------------------------------------------------

An error occurred in line <1597> of file </home/c.praveen_052/work/deal.II/9.6.2/source/base/qprojector.cc> in function

    static dealii::QProjector<dim>::DataSetDescriptor dealii::QProjector<dim>::DataSetDescriptor::subface(const dealii::ReferenceCell&, unsigned int, unsigned int, unsigned char, unsigned int, dealii::internal::SubfaceCase<dim>) [with int dim = 2]

The violated condition was: 

    reference_cell == ReferenceCells::Quadrilateral

Additional information: 

    You are trying to use functionality in deal.II that is currently not

    implemented. In many cases, this indicates that there simply didn't

    appear much of a need for it, or that the author of the original code

    did not have the time to implement a particular case. If you hit this

    exception, it is therefore worth the time to look into the code to

    find out whether you may be able to implement the missing

    functionality. If you do, please consider providing a patch to the

    deal.II development sources (see the deal.II website on how to

    contribute).


Once the triangular mesh has hanging nodes, it fails at this point.


best

praveen


Reply all
Reply to author
Forward
0 new messages