Problems with STL

Hi all,

still have a problem with an STL file.
I want to build a free surface model of a natural domain (an harbour). So from a bathymetric dataset, I produced an STL file.
After opened the file, I try to construct the following object:
VoxelizedDomain3D voxelDomain(*boundary, flowType, (plint)0, (plint)0, (plint)0, (plint)0);
The construction of that object generates a crash at run time with following messages:

terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
*** Process received signal ***
Signal: Aborted (6)
Signal code: (-6)
/lib/libpthread.so.0(+0xeff0) [0x7fb720469ff0]
[ 1] /lib/libc.so.6(gsignal+0x35) [0x7fb72012b1b5]
[ 2] /lib/libc.so.6(abort+0x180) [0x7fb72012dfc0]
[ 3] /usr/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x115) [0x7fb720bdbdc5]
[ 4] /usr/lib/libstdc++.so.6(+0xcb166) [0x7fb720bda166]
[ 5] /usr/lib/libstdc++.so.6(+0xcb193) [0x7fb720bda193]
[ 6] /usr/lib/libstdc++.so.6(+0xcb28e) [0x7fb720bda28e]
[ 7] /usr/lib/libstdc++.so.6(_Znwm+0x7d) [0x7fb720bda71d]
[ 8] /usr/lib/libstdc++.so.6(_Znam+0x9) [0x7fb720bda7d9]
[ 9] ./lbmrdc(ZN3plb13ScalarField3DISt6vectorIlSaIlEEEC1ElllS3+0x64) [0x4b69a4]
./lbmrdc(_ZN3plb18CreateTriangleHashIdE20processGenericBlocksENS_5Box3DESt6vectorIPNS_13AtomicBlock3DESaIS5_EE+0xb8) [0x4b6c68]
./lbmrdc(_ZN3plb14BoxProcessor3D7processEv+0xfa) [0x51bafa]
./lbmrdc(_ZN3plb20executeDataProcessorERKNS_24DataProcessorGenerator3DESt6vectorIPNS_13AtomicBlock3DESaIS5_EE+0xdf) [0x50943f]
./lbmrdc(_ZN3plb20executeDataProcessorERKNS_24DataProcessorGenerator3DESt6vectorIPNS_12MultiBlock3DESaIS5_EE+0x29b) [0x4e2cbb]
./lbmrdc(_ZN3plb25applyProcessingFunctionalEPNS_25BoxProcessingFunctional3DENS_5Box3DESt6vectorIPNS_12MultiBlock3DESaIS5_EE+0x117) [0x4e0857]
./lbmrdc(_ZN3plb8voxelizeIdEESt8auto_ptrINS_18MultiScalarField3DIiEEERKNS_21TriangularSurfaceMeshIT_EERKNS_5Box3DEl+0x49b) [0x4c491b]
./lbmrdc() [0x480c14]
./lbmrdc(_ZN16FreeSurfaceModel14initSimulationEv+0x87) [0x4811f7]
./lbmrdc(main+0x179) [0x4814b9]
/lib/libc.so.6(__libc_start_main+0xfd) [0x7fb720117c8d]
./lbmrdc() [0x475d39]
*** End of error message ***
Abandon

As I add the problem before, I think that I have an error (or more) in the STL file, i.e., the mesh is not correct.
So I use Meshlab software and applied filters such as “remove duplicated vertex”, etc… but with no changes.
Perhaps I should modified parameters of the VoxelizedDomain3D function call, but there are no explanations of the meaning of the parameters.
Does anybody have an idea of are to deal with that ?
Regards

Hi,

The std::bad_alloc exception implies that the program went out of memory. You should try voxelizing the STL file with a coarser resolution.

Cheers,
Jonas

Hi,

thanks for answer.
Do you have an idea or an evaluation of the limits, because during execution I follow the amount of memory taken by the process and when it crash, I still have some RAM available (cash memory in fact).
However, I will try with a less finer resolution.

Cheers

Epzt

Hi,
here after a screen capture of the memory use during execution

http://www.geoceano.fr/upload/gedit/1/Telechargement/crash.png

Hi,
an other precision, the domain I tried to build has 141700 faces and 142461 vertices.
Is that a too high number of faces/vertices ?

Cheers

Dear all,
I would be interested in finding out these limits as well, hasany min/max grid size / mesh size ratio been found up to now?
All the best,
Christian