|Message: Re: 2 GDML Questions||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
so, the reason why you see the warnings now, is because of the following change:
06-06-13 V.Ivanchenko (materials-V09-06-17) - G4Material - added warning if new material has doublicate name
I guess, the reason for that change is that Vladimir needs to access the materials *by name* in order create some cross section tables, or something. I will check with him what exactly is behind that. Now, if you had two different materials with the same name, that would of course be a problem and could lead to incorrect results. In our case the material is the same, so the simulation results should not be affected.
Now, how to solve it.... Well, at the level of GDML, I could make the modification (not a trivial one, but feasible) that when you use modularised GDML files, each module lives in his own 'namespace', or in other words, I could prepend to all the material names, the module name, making it unique. This would get rid of the warnings concerning duplicated material names, but of course, would not get rid of the duplication of material objects in memory.
To make sure that we do not waste CPU/memory we would need to somehow, every time we instantiate a new material, to compare it with all the materials that are already in memory. We cannot rely on the names, because we can have two GDML modules where there are _different_ materials with the same name, and vice-versa, we can have two identical materials with the same name.... Not clear how to deal with it.
Concerning your idea to tell the GDML parser not to read several times the same xml file, it would certainly be a very good solution, but I don't know if/how to do it right now. The xml ENTITY works simply like '#include'. We would need find a way to make it conditional (if not read yet...). Moreover, the assumption was that each GDML module file was fully self consistent. If now we want not to parse the materials file, we would need to find a way to refer to materials parsed within other modules. It is not clear to me if/how this could be done. I will try to investigate.
Concerning you second question, to be honest, I do not know why it worked for you before... When you do the 'composite' you need to add elements, so clearly you do need to have those elements defined. When you do 'mixture' you can mix materials, so yes, it works with materials. So, in other words, the current situation that you describe seems to be correct for me. I will try to understand better if there was some change in Geant4 that made the previous case (with only materials defined) to work (I would say, by chance) before.