Dear all,
I try to build a flow simulation using a domain simulation definition from an STL file (complex boundaries) with a free surface.
To do so, I try to mix two example codes, the first one from “aneurysm” for the STL side and the second, the “damBreak3d” for the free surface aspect.
As I’m at the beginning, I start to take part of the code located in the aneurysm.cpp file and go step by step.
I can read the STL file and print some information of the readed file.
I try then to go to the next step which is transform the surface geometry to a TriangleBoundary3D structure. I add the following lines:
DEFscaledMesh* defmesh = new DEFscaledMesh(*triangleSet,resolution,referenceDirection,margin,(plint)0);
TriangleBoundary3D boundary(*defmesh);
delete defmesh;
boundary.getMesh().inflate();
Fisrt, when I compile with this new lines, I get lots of warnings (but no errors). When I try to run the simulation, it take all the 6 Gb of RAM and finish to crash with following :
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
[teslac2050:04799] *** Process received signal ***
[teslac2050:04799] Signal: Aborted (6)
[teslac2050:04799] Signal code: (-6)
[teslac2050:04799] [ 0] /lib/libpthread.so.0(+0xeff0) [0x7f0a9f3b3ff0]
[teslac2050:04799] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7f0a9f0751b5]
[teslac2050:04799] [ 2] /lib/libc.so.6(abort+0x180) [0x7f0a9f077fc0]
[teslac2050:04799] [ 3] /usr/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x115) [0x7f0a9fb25dc5]
[teslac2050:04799] [ 4] /usr/lib/libstdc++.so.6(+0xcb166) [0x7f0a9fb24166]
[teslac2050:04799] [ 5] /usr/lib/libstdc++.so.6(+0xcb193) [0x7f0a9fb24193]
[teslac2050:04799] [ 6] /usr/lib/libstdc++.so.6(+0xcb28e) [0x7f0a9fb2428e]
[teslac2050:04799] [ 7] /usr/lib/libstdc++.so.6(_Znwm+0x7d) [0x7f0a9fb2471d]
[teslac2050:04799] [ 8] ./lbmrdc(_ZNSt6vectorIlSaIlEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPlS1_EERKl+0x11d) [0x48868d]
[teslac2050:04799] [ 9] ./lbmrdc(_ZN3plb21TriangularSurfaceMeshIdE11detectHolesEv+0x440) [0x4ae740]
[teslac2050:04799] [10] ./lbmrdc(_ZN3plb21TriangularSurfaceMeshIdE10closeHolesEv+0x26) [0x4ae946]
[teslac2050:04799] [11] ./lbmrdc(_ZN3plb18TriangleBoundary3DIdE10closeHolesEv+0x20) [0x4aecf0]
[teslac2050:04799] [12] ./lbmrdc() [0x475eff]
[teslac2050:04799] [13] ./lbmrdc(main+0x293) [0x477303]
[teslac2050:04799] [14] /lib/libc.so.6(__libc_start_main+0xfd) [0x7f0a9f061c8d]
[teslac2050:04799] [15] ./lbmrdc() [0x46fec9]
[teslac2050:04799] *** End of error message ***
How to resolve this.
Thanks.