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

fix of substep

parent a5882e17
No related branches found
No related tags found
No related merge requests found
......@@ -202,9 +202,6 @@ public:
mout << "after get iterate " << PPM->TotalMemoryUsage() << endl;
vout(2) << Name() + " problem " << prob << ": d(" << iter << ")" << endl;
FWD.NonlinearEvaluation(iterateNonlinear, nonlinearEvaluation, subproblems[prob]);
if (FWD.GetReconstructionType() == "AllAtOnce" && substep == 0) {
iterateNonlinear.getVectorsWrite() = 0.0;
}
mout << "after NonlinearEvaluation " << PPM->TotalMemoryUsage() << endl;
if (iter % writeSeismoToFileEvery == 0) {
nonlinearEvaluation[0].getSeismogram().WriteToFile(Config::GetDataPath() + "FWI/" +
......@@ -212,7 +209,9 @@ public:
std::to_string(iter));
}
FWD.CalculateDefect(dataObs, nonlinearEvaluation, defect, subproblems[prob]);
if (FWD.GetReconstructionType() == "AllAtOnce" && substep == 0) {
defect[0].getVectorsWrite() = 0.0;
}
mout << "after Defect " << PPM->TotalMemoryUsage() << endl;
if (defect.size() != nonlinearEvaluation.size()) {
Exit(" DataContainer sizes do not match")
......
......@@ -89,6 +89,7 @@ void ForwardModelAAO::CalculateDefect(const std::vector<FWIDataContainerRange> &
defect[i].getSeismogramWrite() = data_obs[subproblem[i]].getSeismogram();
defect[i].getSeismogramWrite() -= nonlinearEvaluation[i].getSeismogram();
Vectors RhsWF(TConf.timeSteps + 1, GetWaveVec());
RhsWF.MakeAdditive();
Vector Mat(0.0, GetMatVec());
Mat.SetAccumulateFlag(false);
FillVectorFromProblem(*problem_fwd, Mat);
......
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