Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

1-D Error Estimation and Refinement

More
5 years 9 months ago - 5 years 9 months ago #595 by ddrake
Hi,
In adapting the Error Estimation and Refinement iTutorial to a use a 1-D mesh, I'm running into a couple of issues.

First, If I specify the 'multigrid' preconditioner as in the tutorial, I get a seg fault assembling the bilinear form. According to valgrind it happens in the BlockJacobiPreconditioner

==19959== Process terminating with default action of signal 11 (SIGSEGV)
==19959== Access not within mapped region at address 0xB104D5C0
==19959== at 0x14DBE9B7: ngla::BlockJacobiPrecond<double, double, double>::BlockJacobiPrecond(ngla::SparseMatrix<double, double, double> const&, std::shared_ptr<ngstd::Table<int> >) (blockjacobi.cpp:454)

I don't get the segfault if I specify 'local', 'direct', or 'bddc'.
If I don't specify a preconditioner, I can assemble and solve with no issues.
The segfault with 'multigrid' occurs whether or not inverse="sparsecholesky" is set.

Second, I get a seg fault if I try to create an HDiv space for the error recovery method. An HDiv space probably doesn't make much sense in a 1D context. Is there another approach to estimating error for marking and refinement?

I'm attaching my code...

Thanks!

Dow Drake

Edit: Also it seems that setting a refinement flag and refinement aren't supported for 1D meshes.
Code:
mesh.Refine()
and
Code:
for el in mesh.Elements(): mesh.SetRefinementFlag(el, el.nr > 5)
also produce seg faults.
It makes sense since 1D meshes must be created manually. It shouldn't be difficult to do the refinement in Python.
Last edit: 5 years 9 months ago by ddrake. Reason: to provide additional information
Time to create page: 0.156 seconds