Skip to content

Commit

Permalink
correction order of derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
eve70a committed Jul 26, 2024
1 parent b23284c commit fc2a083
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/geometry_cexample.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ int main(int argc, char* argv[])
printf("Input #rows = %d, #cols = %d\n", rows(uvm), cols(uvm) );
for (int irow=0; irow<rows(uvm); irow++)
{
if (irow==0) { printf(" u: "); }
if (irow==1) { printf(" v: "); }
if (irow==0) { printf(" u: "); }
if (irow==1) { printf(" v: "); }
for (int icol=0; icol<cols(uvm); icol++)
printf(" %9.3f", uv[icol*nRows + irow]);
printf("\n");
Expand All @@ -59,9 +59,9 @@ int main(int argc, char* argv[])

printf("Positions : got #rows = %d, #cols = %d\n", out_rows, out_cols);
for (int irow=0; irow<out_rows; irow++) {
if (irow==0) { printf(" x: "); }
if (irow==1) { printf(" y: "); }
if (irow==2) { printf(" z: "); }
if (irow==0) { printf(" x: "); }
if (irow==1) { printf(" y: "); }
if (irow==2) { printf(" z: "); }
for (int icol=0; icol<out_cols; icol++) {
printf(" %9.3f", out_data[icol*out_rows + irow]);
}
Expand All @@ -79,16 +79,16 @@ int main(int argc, char* argv[])
printf("Derivatives : got #rows = %d, #cols = %d\n", out_rows, out_cols);
for (int irow=0; irow<out_rows; irow++) {
if (irow==0) { printf(" dx/du: "); }
if (irow==1) { printf(" dy/du: "); }
if (irow==2) { printf(" dz/du: "); }
if (irow==3) { printf(" dx/dv: "); }
if (irow==4) { printf(" dy/dv: "); }
if (irow==1) { printf(" dx/dv: "); }
if (irow==2) { printf(" dy/du: "); }
if (irow==3) { printf(" dy/dv: "); }
if (irow==4) { printf(" dz/du: "); }
if (irow==5) { printf(" dz/dv: "); }
for (int icol=0; icol<out_cols; icol++) {
printf(" %9.3f", out_data[icol*out_rows + irow]);
}
printf("\n");
if (irow==2) { printf("\n"); }
if (irow==1 | irow==3) { printf("\n"); }
}


Expand Down

0 comments on commit fc2a083

Please sign in to comment.