|Message: Materials Definition||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)|
Good Evening all,
I am not sure I am posting this in the correct section of the forum for this I apologise.
I am having a few issues definine my materials in my DetectorConstruct file for lines 87 through 107 I have written
G4double a, z; G4double density, temperature, pressure; G4int nel;
//Water G4Element* H = new G4Element("Hydrogen", "H", z=2., a= 1.0079*g/mole); G4Element* O = new G4Element("Oxygen" , "O", z=8., a= 16.00*g/mole);
G4Material* Water = new G4Material("Water", density= 1*g/cm3); Water->AddElement(H, natoms=2); Water->AddElement(O, natoms=1);
//Steel G4Element* Fe = new G4Element("Iron", "Fe", z=26., a= 55.845*g/mole); G4Element* Cr = new G4Element("Chromium" , "Cr", z=24., a= 51.9961*g/mole); G4Element* Ni = new G4Element("Nickel", "Ni", z=28., a= 58.6934*g/mole);
G4Material* SSteel = new G4Material("SSteel", density= 8.03*g/cm3); SSteel->AddElement(Fe, 74*perCent); SSteel->AddElement(Cr, 18*perCent); SSteel->AddElement(Ni, 8*perCent);
I am being returned two errors one reading error C2661:'G4Material::G4Material' : no overloaded function takes 2 arguments which relates to lines 95 and 104 of my code and another reading error C2065:'natoms' : undeclared identifier which relates to 96 and 97.
I was wondering if anybody has a quick fix to this problem could advise me to where Ive gone wrong. Im pretty new to C++ (or programming of any nature) so I apologise for my rubbishness
gratitude in advance
|Inline Depth:||Outline Depth:||Add message:|