31 #include <boost/python.hpp> 32 #include "G4Version.hh" 33 #include "G4Element.hh" 46 const G4double* aVec= element-> GetRelativeAbundanceVector();
47 G4int niso= element-> GetNumberOfIsotopes();
48 for(G4int i=0; i<niso; i++) {
49 aList.append(aVec[i]);
69 class_<G4Element, G4Element*, boost::noncopyable>
70 (
"G4Element",
"element class", no_init)
72 .def(init<const G4String&, const G4String&, G4double, G4double>())
73 .def(init<const G4String&, const G4String&, G4int>())
75 .def(
"AddIsotope", &G4Element::AddIsotope)
76 .def(
"GetName", &G4Element::GetName,
77 return_value_policy<reference_existing_object>())
78 .def(
"GetSymbol", &G4Element::GetSymbol,
79 return_value_policy<reference_existing_object>())
80 .def(
"SetName", &G4Element::SetName)
81 .def(
"GetZ", &G4Element::GetZ)
82 .def(
"GetN", &G4Element::GetN)
83 .def(
"GetA", &G4Element::GetA)
84 .def(
"GetNbOfAtomicShells", &G4Element::GetNbOfAtomicShells)
85 .def(
"GetAtomicShell", &G4Element::GetAtomicShell)
86 .def(
"GetNumberOfIsotopes", &G4Element::GetNumberOfIsotopes)
87 .def(
"GetIsotopeVector", &G4Element::GetIsotopeVector,
88 return_internal_reference<>())
90 .def(
"GetIsotope", &G4Element::GetIsotope,
91 return_value_policy<reference_existing_object>())
92 .def(
"GetElementTable", &G4Element::GetElementTable,
93 return_value_policy<reference_existing_object>())
94 .staticmethod(
"GetElementTable")
95 .def(
"GetNumberOfElements", &G4Element::GetNumberOfElements)
96 .staticmethod(
"GetNumberOfElements")
97 .def(
"GetIndex", &G4Element::GetIndex)
98 .def(
"GetElement", &G4Element::GetElement,
99 return_value_policy<reference_existing_object>())
100 .staticmethod(
"GetElement")
101 .def(
"GetfCoulomb", &G4Element::GetfCoulomb)
102 .def(
"GetfRadTsai", &G4Element::GetfRadTsai)
103 .def(
"GetIonisation", &G4Element::GetIonisation,
104 return_internal_reference<>())
void Print(G4Element &ele)
list f_GetRelativeAbundanceVector(const G4Element *element)