Skip to content

Commit

Permalink
Fix the VtkGrid writing order
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin D. Weinberg committed Feb 4, 2025
1 parent 575d863 commit 33179b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exputil/VtkGrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ void VtkGrid::Add(const std::vector<double>& data, const std::string& name)
//
int I = 0;

for (int i=0; i<nx; i++) {
for (int k=0; k<nz; k++) {
for (int j=0; j<ny; j++) {
for (int k=0; k<nz; k++) {
for (int i=0; i<nx; i++) {
dataSet[newName][I++] = static_cast<float>(data[(k*ny + j)*nx + i]);
}
}
Expand Down

0 comments on commit 33179b7

Please sign in to comment.