Skip to content

Commit

Permalink
Missing third index in the write to file script
Browse files Browse the repository at this point in the history
In the commented out code for writing the solution to a file, the third index is missing. Just adding it here.
  • Loading branch information
zenineasa authored and svigerske committed Nov 22, 2022
1 parent a666652 commit 5de3177
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/ScalableProblems/MittelmannBndryCntrlDiri3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,9 @@ void MittelmannBndryCntrlDiriBase3D::finalize_solution(
for (Index i=0; i<=N_+1; i++) {
for (Index j=0; j<=N_+1; j++) {
fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]);
for (Index k=0; k<=N_+1; k++) {
fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]);
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion examples/ScalableProblems/MittelmannBndryCntrlDiri3D_27.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,9 @@ void MittelmannBndryCntrlDiriBase3D_27::finalize_solution(
for (Index i=0; i<=N_+1; i++) {
for (Index j=0; j<=N_+1; j++) {
fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]);
for (Index k=0; k<=N_+1; k++) {
fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]);
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion examples/ScalableProblems/MittelmannBndryCntrlDiri3Dsin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,9 @@ void MittelmannBndryCntrlDiriBase3Dsin::finalize_solution(
for (Index i=0; i<=N_+1; i++) {
for (Index j=0; j<=N_+1; j++) {
fprintf(fp, "y[%6d,%6d] = %15.8e\n", i, j, x[y_index(i,j)]);
for (Index k=0; k<=N_+1; k++) {
fprintf(fp, "y[%6d,%6d,%6d] = %15.8e\n", i, j, k, x[y_index(i,j,k)]);
}
}
}
Expand Down

0 comments on commit 5de3177

Please sign in to comment.