Moved serial mode to target mcelecron_serial.

Implemented parallelization with mpi.
This commit is contained in:
Christian
2019-07-18 14:02:19 +02:00
parent fd131afdd3
commit 578d673b65
35 changed files with 916 additions and 469 deletions
+10 -10
View File
@@ -54,21 +54,21 @@ template <class T_Map>
template <typename T>
void Average_Container<T_Map>::rec_calcMap(const T &subMap, std::deque<double> Points) {
double curVal, nextVal, avgVal;
typename T::const_iterator curItr, nextItr;
for (nextItr = ++(subMap.cbegin()); nextItr!= subMap.cend(); nextItr++) {
curItr = nextItr;
--curItr;
curVal = curItr->first;
nextVal = nextItr->first;
typename T::const_iterator curitr, nextitr;
for (nextitr = ++(subMap.cbegin()); nextitr!= subMap.cend(); nextitr++) {
curitr = nextitr;
--curitr;
curVal = curitr->first;
nextVal = nextitr->first;
avgVal = curVal + (nextVal-curVal)/2;
Points.push_back(avgVal);
rec_calcMap(curItr->second, Points);
rec_calcMap(curitr->second, Points);
Points.pop_back();
}
// insert last point as overflow value
curItr = (--subMap.cend());
Points.push_back(curItr->first);
rec_calcMap(curItr->second, Points);
curitr = (--subMap.cend());
Points.push_back(curitr->first);
rec_calcMap(curitr->second, Points);
}