101 if (materialName[0] ==
'G' && materialName[1] ==
'4') {
103 materialName.erase(0, 1);
104 materialName.erase(0, 1);
105 materialName.erase(0, 1);
108 std::ostringstream fileName;
109 fileName << path <<
"/microelec/Structure/Data_" + materialName +
".dat";
110 std::ifstream fichier(fileName.str().c_str());
123 fichier >> filler >> type;
124 materialName = filler;
125 if (type ==
"Compound") {isCompound =
true; Z = 0; }
126 else { isCompound =
false; Z = std::stoi(type); }
127 while(!fichier.eof()) {
129 getline(fichier, filler);
130 std::stringstream line(filler);
132 if (filler[0] ==
'#' || filler.empty()) {
continue;}
135 line >> nameParameter;
139 for (
int i = 0; i < varLength; i++)
141 line >> data; data = data*unitValue;
143 if(nameParameter ==
"WorkFunction")
147 if(nameParameter ==
"EnergyGap")
152 if(nameParameter ==
"EnergyPeak")
154 energyConstant.push_back(data);
156 if(nameParameter ==
"EnergyLimit")
158 LimitEnergy.push_back(data);
160 if(nameParameter ==
"EADL")
162 EADL_Enumerator.push_back(data);
165 if (nameParameter ==
"WeaklyBoundShell")
166 {
if (data == 0) { isShellWeaklyBoundVector.push_back(
false); }
167 else {isShellWeaklyBoundVector.push_back(
true);}}
169 if(nameParameter ==
"WeaklyBoundInitialEnergy")
171 initialEnergy = data;
174 if(nameParameter ==
"ShellAtomicNumber")
176 compoundShellZ.push_back(data);
179 if(nameParameter ==
"DielectricModelLowEnergyLimit_e")
181 flimitInelastic[0] = data;
183 if(nameParameter ==
"DielectricModelHighEnergyLimit_e")
185 flimitInelastic[1] = data;
187 if(nameParameter ==
"DielectricModelLowEnergyLimit_p")
189 flimitInelastic[2] = data;
191 if(nameParameter ==
"DielectricModelHighEnergyLimit_p")
193 flimitInelastic[3] = data;
196 if(nameParameter ==
"ElasticModelLowEnergyLimit")
198 flimitElastic[0] = data;
200 if(nameParameter ==
"ElasticModelHighEnergyLimit")
202 flimitElastic[1] = data;
210 str += fileName.str() +
" not found!";