| 125 | } |
| 126 | |
| 127 | void Radiation::write_groups(ostream& os) |
| 128 | { |
| 129 | os << "# total number of groups = " << nGroups << std::endl; |
| 130 | |
| 131 | if (nGroups > 1) { |
| 132 | os << "# group center, group weight" << group_units << std::endl; |
| 133 | int oldprec = os.precision(10); |
| 134 | for (int i = 0; i < nGroups; i++) { |
| 135 | os.width(3); |
| 136 | os << i << ": "; |
| 137 | os.width(15); |
| 138 | os << nugroup[i] * group_print_factor << ", "; |
| 139 | os.width(15); |
| 140 | os << dnugroup[i] * group_print_factor << std::endl; |
| 141 | } |
| 142 | os.precision(oldprec); |
| 143 | } |
| 144 | |
| 145 | if (xnu.size() > 0) { |
| 146 | os << "# group lower boundaries" << std::endl; |
| 147 | for (int i = 0; i < xnu.size(); i++) { |
| 148 | os << "group(" << i << ") = " |
| 149 | << xnu[i] * group_print_factor << std::endl; |
| 150 | } |
| 151 | } |
| 152 | } |