Skip to content
Snippets Groups Projects

Resolve "Fusion evaporation kinematics calculations are missing"

14 files
+ 441
112
Compare changes
  • Side-by-side
  • Inline
Files
14
+ 45
1
@@ -84,6 +84,15 @@ std::ostream &Conf::operator<<(std::ostream &os) const {
tmp<<os;
}
}
for(const auto& it: parAFI){
//if (it.second.val.empty()) throw std::runtime_error("Should not be initialized empty\n");
for(const auto& it2: it.second.val){
//Property<decltype(it.second.val)> tmp{it2, it.second.unit, it.second.comment};
Property<std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn>> tmp{it2.first, it.second.unit, it.second.comment};
os << it.first << "\t\t\t";
tmp<<os;
}
}
return os;
}
@@ -187,6 +196,15 @@ std::istream &Conf::operator>>(std::istream &is) {
continue;
}
}
{//Fragment of interest type parameters
auto it = parAFI.find(name);
if (it != parAFI.end()){
Property<std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn>> tmp;
tmp>>sstr;
it->second.val.emplace(tmp.val, true);
continue;
}
}
}
return is;
}
@@ -255,6 +273,26 @@ std::ostream& operator<< (std::ostream& os, const ReactionFragment::Ion& v){
os << v.A << " "<< v.Z;
return os;
}
std::istream& operator>> (std::istream& is, std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn>& v){
std::string str;
while(true){
is >> str;
if(str == "END") break;
int A, Z;
A = std::stoi(str);
is >> Z;
v.emplace(A,Z);
}
return is;
}
std::ostream& operator<< (std::ostream& os, const std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn>& v){
for(const auto& it: v){
os << it.A << " "<< it.Z << " ";
}
os << "END";
return os;
}
std::pair<int, int> operator*= (std::pair<int, int>& v, const double& d){
v.first *= static_cast<int>(d);
v.second *= static_cast<int>(d);
@@ -270,4 +308,10 @@ ReactionFragment::Ion operator*= (ReactionFragment::Ion& v, const double& d){
//v.Z *= static_cast<int>(d);
(void)d;
return v;
}
\ No newline at end of file
}
std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn> operator*= (std::unordered_set<ReactionFragment::Ion, ReactionFragment::Ion::hash_fn>& v, const double& d){
//v.A *= static_cast<int>(d);
//v.Z *= static_cast<int>(d);
(void)d;
return v;
}
Loading