- Thank you received: 3
1-D Error Estimation and Refinement
6 years 4 months ago - 6 years 4 months ago #595
by ddrake
1-D Error Estimation and Refinement was created 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.
and
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.
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()
Code:
for el in mesh.Elements():
mesh.SetRefinementFlag(el, el.nr > 5)
It makes sense since 1D meshes must be created manually. It shouldn't be difficult to do the refinement in Python.
Attachments:
Last edit: 6 years 4 months ago by ddrake. Reason: to provide additional information
Time to create page: 0.097 seconds