Message: G4Tessellation and concave volumes | Not Logged In (login) |
Hello. I am having some problems when trying to use the G4TessellatedSolid. It seems that some points supposedly inside of the defined volume are considered to lie outside by G4TessellatedSolid::Inside(), as reported by running with geometry/navigator/check_mode 1. The error that I get is
*** G4Exception : FarOutsideCurrentVolume issued by : G4NormalNavigation::ComputeStep() Point is far outside Current Volume ! *** Fatal Exception *** core dump *** A larger snippet of the output is available at http://avkrok.net/~rickard/geant4/log , together with the gdml files used at http://avkrok.net/~rickard/geant4/geometry.gdml and http://avkrok.net/~rickard/geant4/testblock.gdml . I have tried to verify that all of my triangles are correctly oriented, by checking that each edge is used twice (once in each direction) and looking at one triangle to verify that it is correctly oriented. Looking at G4TessellatedSolid::Inside(), I think that at least part of the problem lies in the algorithm chosen for deciding what lies inside of the volume. As far as I can see, that method looks at the faces closest to the point (with a tolerance of kCarTolerance/2), plus one face further away (due to the itcut++ on line 357 in source/geometry/solids/specific/src/G4TessellatedSolid.cc), and if the point lies outside of any of the planes of the faces, the point is considered to lie outside of the volume. To the best of my understanding, that could not work for concave volumes with internal acute angles. I am using geant4.8.2-p01 and, in case it matters, GDML 2.8.0. I could upload some test cases if that would be helpful in the description of my problem. I wrote an alternative G4TessellatedSolid::Inside(), but it had some similar difficulties close to surfaces, so I would like to know if anyone here knows what would be needed to overcome this problem. Best regards
Rickard Holmberg |
Inline Depth: | Outline Depth: | Add message: |
to: |