diff --git a/examples/helmholtz/crossPoints/ddm2D.cpp b/examples/helmholtz/crossPoints/ddm2D.cpp index 1e984dea580fa82a0c10cd1d713cb77a642a7f76..ebaf8f8cf3604fc9f7c8100e6e5a5c2bc584a6a1 100755 --- a/examples/helmholtz/crossPoints/ddm2D.cpp +++ b/examples/helmholtz/crossPoints/ddm2D.cpp @@ -136,6 +136,8 @@ namespace D2 { gmshDdm->userDefinedParameter(scalingPlot, "scaling"); bool saveMesh = false; gmshDdm->userDefinedParameter(saveMesh, "saveMesh"); + bool saveIteration = false; + gmshDdm->userDefinedParameter(saveIteration, "saveIteration"); if(benchmark == "scattering") { checkerboard(nDomX, nDomY, sizeX, sizeY, R, lc, (boundary == "pml"), pmlSize, (boundaryExt == "pml"), pmlSizeExt, meshOrder, 0, 0); @@ -788,6 +790,12 @@ namespace D2 { gmshfem::common::Timer pre = formulation.pre(); gmshfem::common::Timer solve = formulation.solve("gmres", res, iterMax); + if(saveIteration) { + gmshfem::common::CSVio file(fileName, ';', gmshfem::common::OpeningMode::Append); + file << N << thetaPade << formulation.numberOfIterations() << gmshfem::csv::endl; + file.close(); + } + for(unsigned int i = 0; i < nDomX; ++i) { for(unsigned int j = 0; j < nDomY; ++j) { unsigned int index = i * nDomY + j;