← Back to team overview

dolfin team mailing list archive

[Bug 600939] Re: broken transform_data on refine

 

Hopefully it was quite simple to trace this bug. Revision 4461
(2010-02-07 21:53:42) is found to be guilty :)

Could you please apply attached patch.


** Patch added: "solution for bug"
   http://launchpadlibrarian.net/51288953/dolfin-sawickib-20100702.patch

-- 
broken transform_data on refine
https://bugs.launchpad.net/bugs/600939
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.

Status in DOLFIN: New

Bug description:
I've realized that somewhere during last year refinement features has been broken. Not whole refinement, but only the part responsible for MeshData transformation between old and new mesh. This is code was written by me, so I'll try to fix it, but maybe some of you guys can take a quick look and help me which recent change could cause this problem. 

===== Code to repeat crash =====
#include<dolfin.h>
using namespace dolfin;
int main(){
 UnitCube mesh(10, 10, 10);
 mesh.data().create_mesh_function("material indicators", 3);
 MeshFunction<bool> mf(mesh, 3);
 mf = true;
 Mesh newmesh;
 newmesh = refine( mesh, mf);
}

===== Error messages =====
Refining simplicial mesh by recursive Rivara bisection.
a.out: dolfin/mesh/MeshFunction.h:136: const T& dolfin::MeshFunction<T>::operator[](dolfin::uint) const [with T = unsigned int]: Assertion `index < _size' failed.
[gaus:12683] *** Process received signal ***
[gaus:12683] Signal: Aborted (6)
[gaus:12683] Signal code:  (-6)
[gaus:12683] [ 0] /lib/libc.so.6 [0x7fe37c828100]
[gaus:12683] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7fe37c828095]
[gaus:12683] [ 2] /lib/libc.so.6(abort+0x110) [0x7fe37c829af0]
[gaus:12683] [ 3] /lib/libc.so.6(__assert_fail+0xef) [0x7fe37c8212df]
[gaus:12683] [ 4] /usr/lib/libdolfin.so.0(_ZN6dolfin19LocalMeshRefinement14transform_dataERNS_4MeshERKS1_RKNS_12MeshFunctionIjEERKSt6vectorIiSaIiEE+0x8e7) [0x7fe37d58cd57]
[gaus:12683] [ 5] /usr/lib/libdolfin.so.0(_ZN6dolfin19LocalMeshRefinement32refineRecursivelyByEdgeBisectionERKNS_4MeshERKNS_12MeshFunctionIbEE+0x139) [0x7fe37d58d899]
[gaus:12683] [ 6] /usr/lib/libdolfin.so.0(_ZN6dolfin6refineERKNS_4MeshERKNS_12MeshFunctionIbEE+0x9) [0x7fe37d51bbe9]
[gaus:12683] [ 7] ./a.out(_ZNK6dolfin4Mesh3strEb+0x592) [0x40a592]
[gaus:12683] [ 8] /lib/libc.so.6(__libc_start_main+0xf4) [0x7fe37c8141c4]
[gaus:12683] [ 9] ./a.out(_ZNK6dolfin4Mesh3strEb+0x209) [0x40a209]
[gaus:12683] *** End of error message ***
Aborted





Follow ups

References