Skip to content
Snippets Groups Projects
Commit 8842b2da authored by Christian Rheinbay's avatar Christian Rheinbay
Browse files

changed to random order

parent cbfc9237
No related branches found
No related tags found
No related merge requests found
......@@ -149,13 +149,18 @@ public:
Config::Get("AAORecalculateWFEveryOuter", initialAAO);
subproblems.resize(data_obs.size());
nonlinearEvaluations.resize(data_obs.size());
std::vector<int> order(data_obs.size());
std::iota(order.begin(), order.end(), 1);
std::random_device rd;
std::mt19937 gen(rd());
std::shuffle(order.begin(), order.end(), gen);
for (int i = 0; i < data_obs.size(); ++i) {
subproblems[i].resize(1);
nonlinearEvaluations[i].emplace_back(DGSeismogram(FWD.GetObservationOperator().GetSpaceOp().GetParaDat()),
Vectors(FWD.TConf.timeSteps+1,FWD.GetWaveVec()));
if (initialAAO)
nonlinearEvaluations[i].back().resetWaveData();
subproblems[i][0] = i;
subproblems[i][0] = order[i];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment