From 3d379c055ba23fd488655e7f7d515113b88a52e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=B6rl?= <maximilian.hoerl@mathematik.uni-stuttgart.de> Date: Sun, 22 Mar 2020 13:42:32 +0100 Subject: [PATCH] [bugfix] fix index error in interface vtk output --- dune/mmdg/mmdg.hh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dune/mmdg/mmdg.hh b/dune/mmdg/mmdg.hh index 4ef53ce..7db35c5 100644 --- a/dune/mmdg/mmdg.hh +++ b/dune/mmdg/mmdg.hh @@ -46,6 +46,8 @@ public: (*Base::A).solve(Base::d, Base::b); + std::cout << "\n\n" << Base::b << "\n\n" << Base::d << "\n\n"; + // Dune::InverseOperatorResult result; // Dune::UMFPack<Matrix> solver(*Base::A); // solver.apply(Base::d, Base::b, result); @@ -471,8 +473,6 @@ private: (*Base::A)[iElemIdxSLE + i + 1][iElemIdxSLE + i + 1] += centerI * (interfaceUpdate1 - interfaceUpdate2); - std::cout << iElemIdxSLE + i + 1 << "\t" << interfaceUpdate3 << "\t" << centerI * (interfaceUpdate1 - interfaceUpdate2); - for (int j = 0; j < i; i++) { //NOTE: only relevant for n=3, requires quadrature rule for n=3 Coordinate KparDotTau_j; @@ -593,8 +593,6 @@ private: (*Base::A)[iElemIdxSLE + i + 1][iElemIdxSLE + i + 1] += centerI * (interfaceUpdate1 - 2.0 * interfaceUpdate2); - std::cout << iElemIdxSLE + i + 1 << "\t" << iFrame[i] << "\t" << center * iFrame[i] << "\t" << interfaceUpdate3 << "\t" << centerI * (interfaceUpdate1 - 2.0 * interfaceUpdate2) << "\n\n"; - for (int j = 0; j < i; i++) { //NOTE: only relevant for n=3, requires quadrature rule for n=3 Coordinate KparDotTau_j; @@ -670,7 +668,8 @@ private: for (const auto& iElem : elements(iGridView_)) { - const int iElemIdxSLE = bulkDOF + dim * iMapper_.index(iElem); + const int iElemIdxOutput = dim * iMapper_.index(iElem); + const int iElemIdxSLE = bulkDOF + iElemIdxOutput; const auto& iGeo = iElem.geometry(); //get basis of the interface coordinate system for evaluation of @@ -682,21 +681,21 @@ private: { if (Base::problem_.hasExactSolution()) { - exactIPressure[iElemIdxSLE + k] = + exactIPressure[iElemIdxOutput + k] = Base::problem_.exactInterfaceSolution(iGeo.corner(k)); } //contribution of the basis function // phi_iElem,0 (x) = indicator(iElem); //at the kth corner of iElem - iPressure[iElemIdxSLE + k] = Base::d[iElemIdxSLE]; + iPressure[iElemIdxOutput + k] = Base::d[iElemIdxSLE]; for (int i = 0; i < dim - 1; i++) { //contribution of the basis function // phi_iElem,i (x) = (x * tau[i]) * indicator(iElem); //at the kth corner of iElem - iPressure[iElemIdxSLE + k] += + iPressure[iElemIdxOutput + k] += Base::d[iElemIdxSLE + i + 1] * (iGeo.corner(k) * iFrame[i]); } } -- GitLab