diff --git a/src/CartBlock.C b/src/CartBlock.C index b4c58d0..8b21f80 100644 --- a/src/CartBlock.C +++ b/src/CartBlock.C @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "TiogaMeshInfo.h" #include "codetypes.h" #include "CartBlock.h" @@ -30,7 +32,6 @@ #include "linCartInterp.h" #include "linklist.h" #include "tioga_utils.h" -#include void CartBlock::registerData(int lid, TIOGA::AMRMeshInfo* minfo) { @@ -112,7 +113,8 @@ void CartBlock::getInterpolatedData( for (i = 0; i < listptr->nweights; i++) { int const cell_index = (cart_utils::get_cell_index( - dims[0], dims[1], nf, listptr->inode[3 * i], + dims[0], dims[1], nf, + listptr->inode[static_cast(3 * i)], listptr->inode[(3 * i) + 1], listptr->inode[(3 * i) + 2])); for (n = 0; n < nvar_cell; n++) { weight = listptr->weights[i]; @@ -169,7 +171,8 @@ void CartBlock::preprocess(CartGrid* cg) for (int n = 0; n < 3; n++) { dx[n] = cg->dx[(3 * global_id) + n]; } - dims[0] = cg->ihi[3 * global_id] - cg->ilo[3 * global_id] + 1; + dims[0] = cg->ihi[static_cast(3 * global_id)] - + cg->ilo[static_cast(3 * global_id)] + 1; dims[1] = cg->ihi[(3 * global_id) + 1] - cg->ilo[(3 * global_id) + 1] + 1; dims[2] = cg->ihi[(3 * global_id) + 2] - cg->ilo[(3 * global_id) + 2] + 1; nf = cg->nf; diff --git a/src/CartGrid.C b/src/CartGrid.C index 0027452..308258a 100644 --- a/src/CartGrid.C +++ b/src/CartGrid.C @@ -23,6 +23,7 @@ #include #include #include +#include #include "tioga_gpu.h" #include "TiogaMeshInfo.h" @@ -221,17 +222,19 @@ void CartGrid::search(double* x, int* donorid, int npts) } } } - if (myid == 2 && abs(x[3 * i] - 0.739573) < 1e-5 && + if (myid == 2 && + abs(x[static_cast(3 * i)] - 0.739573) < 1e-5 && abs(x[(3 * i) + 1] + 0.259310) < 1e-5 && abs(x[(3 * i) + 2] + 0.639614) < 1e-5) { printf( - "%d %d %f %f %f %d\n", myid, i, x[3 * i], x[(3 * i) + 1], + "%d %d %f %f %f %d\n", myid, i, + x[static_cast(3 * i)], x[(3 * i) + 1], x[(3 * i) + 2], donorid[i]); } if (donorid[i] == -1) { printf( - "%d %f %f %f\n", myid, x[3 * i], x[(3 * i) + 1], - x[(3 * i) + 2]); + "%d %f %f %f\n", myid, x[static_cast(3 * i)], + x[(3 * i) + 1], x[(3 * i) + 2]); } } // printf("CartGrid::search Processor %d located %d of %d diff --git a/src/MeshBlock.C b/src/MeshBlock.C index 1c99aa6..24a8d0b 100644 --- a/src/MeshBlock.C +++ b/src/MeshBlock.C @@ -988,7 +988,8 @@ void MeshBlock::writeFlowFile(int bid, double* q, int nvar, int type) for (i = 0; i < nc[n]; i++) { if (nvert == 4) { fprintf( - fp, "%d %d %d %d %d %d %d %d\n", vconn[n][nvert * i] + ba, + fp, "%d %d %d %d %d %d %d %d\n", + vconn[n][static_cast(nvert * i)] + ba, vconn[n][(nvert * i) + 1] + ba, vconn[n][(nvert * i) + 2] + ba, vconn[n][(nvert * i) + 2] + ba, @@ -1008,7 +1009,8 @@ void MeshBlock::writeFlowFile(int bid, double* q, int nvar, int type) vconn[n][(nvert * i) + 4] + ba); } else if (nvert == 6) { fprintf( - fp, "%d %d %d %d %d %d %d %d\n", vconn[n][nvert * i] + ba, + fp, "%d %d %d %d %d %d %d %d\n", + vconn[n][static_cast(nvert * i)] + ba, vconn[n][(nvert * i) + 1] + ba, vconn[n][(nvert * i) + 2] + ba, vconn[n][(nvert * i) + 2] + ba, @@ -1018,7 +1020,8 @@ void MeshBlock::writeFlowFile(int bid, double* q, int nvar, int type) vconn[n][(nvert * i) + 5] + ba); } else if (nvert == 8) { fprintf( - fp, "%d %d %d %d %d %d %d %d\n", vconn[n][nvert * i] + ba, + fp, "%d %d %d %d %d %d %d %d\n", + vconn[n][static_cast(nvert * i)] + ba, vconn[n][(nvert * i) + 1] + ba, vconn[n][(nvert * i) + 2] + ba, vconn[n][(nvert * i) + 3] + ba,