[Gate-users] Geometry causes simulation run to abort

Hermann Fuchs hermann.fuchs at meduniwien.ac.at
Wed Nov 23 16:12:05 CET 2011


Hello

Have you checked your memory consumtion?
Especially with high resolution output, memory can run out pretty fast.
Bad_alloc could also mean that there is no more memory to use...


Cheers,
Hermann
On Fri, 2011-11-18 at 09:51 +0800, Jasper C wrote:
> Hello all,
> 
> I've been trying to run simulations with a line source phantom,
> consisting of a glass tube filled with water.  My F18 source is
> modeled as a cylinder the same size as the water.
> 
> My simulation will abort (GATE will crash) within 10 minutes, with the
> following error message:
> 
> --------------------------------------------------
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> Aborted
> --------------------------------------------------
> 
> I have been able to track this down to my use of a cylindrical
> phantom.  My code is as follows:
> 
> --------------------------------------------------
> #	Phantom body
> 
> /gate/world/daughters/name			phntmBody
> /gate/world/daughters/insert			cylinder
> /gate/phntmBody/placement/setTranslation	10.0 0.0 0.0 mm
> /gate/phntmBody/geometry/setRmax		0.9 mm
> /gate/phntmBody/geometry/setRmin		0.5 mm
> /gate/phntmBody/geometry/setHeight		128.0 mm
> /gate/phntmBody/setMaterial			Glass
> /gate/phntmBody/vis/forceWireframe
> /gate/phntmBody/vis/setColor		yellow
> /gate/phntmBody/vis/setVisible		1
> 
> #	Radioactive media in body
> 
> /gate/phntmBody/daughters/name		phntmMedia
> /gate/phntmBody/daughters/insert		cylinder
> /gate/phntmMedia/placement/setTranslation	0.0 0.0 0.0 mm
> /gate/phntmMedia/geometry/setRmax		0.5 mm
> /gate/phntmMedia/geometry/setRmin		0.0 mm
> /gate/phntmMedia/geometry/setHeight		128.0 mm
> /gate/phntmMedia/setMaterial		Water
> /gate/phntmMedia/vis/forceSolid
> /gate/phntmMedia/vis/setColor		red
> /gate/phntmMedia/vis/setVisible		1
> 
> 
> /gate/phntmBody/attachPhantomSD
> /gate/phntmMedia/attachPhantomSD
> --------------------------------------------------
> 
> What I have found is that having the Rmax of the inner cylinder set
> equal to the Rmin of the outer cylinder causes this crash.  If I set
> the outer Rmin to be slightly larger than the inner Rmax the
> simulation will run fine, ie:
> 
> --------------------------------------------------
> /gate/phntmBody/geometry/setRmin		0.5001 mm
> /gate/phntmMedia/geometry/setRmax		0.5 mm
> --------------------------------------------------
> 
> or
> 
> --------------------------------------------------
> /gate/phntmBody/geometry/setRmin		0.5 mm
> /gate/phntmMedia/geometry/setRmax		0.4999 mm
> --------------------------------------------------
> 
> My question is is this a bug in the implementation of the geometry, or
> is the correct way of implementing such things to leave a tiny gap in
> between the two objects?
> 
> Curiously, I have not seen this problem with my previous phantom,
> which was a solid sphere of sodium defined in (as a daughter of) a
> solid cube of plastic.
> 
> Thanks and best regards,
> 
> Jasper
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> 

-- 
-------------
DI Hermann Fuchs
Div. Medical Radiation Physics
Department of Radiotherapy
Med. Univ. Vienna / AKH Vienna
Währinger Gürtel 18-20
A-1090 Wien

Tel.  + 43 / 1 / 40 400 7271
Mail. hermann.fuchs at meduniwien.ac.at



More information about the Gate-users mailing list