Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CyprienBosserelle committed Mar 9, 2018
1 parent 9cc3a78 commit 05a1f4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Flow_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ __global__ void ubnd1D(int nx, int ny, DECNUM dx, DECNUM dt, DECNUM g, DECNUM rh
unsigned int yminus = mminus(iy, ny);
unsigned int yplus = pplus(iy, ny);

DECNUM zsbnd = zsbndi + (zsbndn - zsbndi)*(iy / ny);
DECNUM zsbnd = zsbndi + (zsbndn - zsbndi)*(((float)iy) / ((float)ny));
DECNUM ui, vi, thetai, vert;

DECNUM ht, htr;
Expand Down Expand Up @@ -343,7 +343,7 @@ __global__ void ubnd1Dnowaves(int nx, int ny, DECNUM dx, DECNUM dt, DECNUM g, DE
unsigned int yminus = mminus(iy, ny);
unsigned int yplus = pplus(iy, ny);

DECNUM zsbnd = zsbndi + (zsbndn - zsbndi)*(iy / ny);
DECNUM zsbnd = zsbndi + (zsbndn - zsbndi)*(((float)iy) / ((float)ny));;
DECNUM ui, vi, thetai, vert;

DECNUM ht, htr;
Expand Down
3 changes: 3 additions & 0 deletions Wave_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,9 @@ void flowbnd(XBGPUParam Param, std::vector<SLBnd> slbnd, std::vector<WindBnd> wn
zsbndi = interptime(slbnd[SLstepinbnd].wlev0, slbnd[SLstepinbnd - 1].wlev0, slbnd[SLstepinbnd].time - slbnd[SLstepinbnd - 1].time, totaltime - slbnd[SLstepinbnd - 1].time);
zsbndn = interptime(slbnd[SLstepinbnd].wlev1, slbnd[SLstepinbnd - 1].wlev1, slbnd[SLstepinbnd].time - slbnd[SLstepinbnd - 1].time, totaltime - slbnd[SLstepinbnd - 1].time);

//printf("Wlev1=%f\n ", zsbndn);


if (Param.wavebndtype == 1)
{
timenext = wavebndvec[WAVstepinbnd].time - wavebndvec[WAVstepinbnd - 1].time;
Expand Down
1 change: 1 addition & 0 deletions read_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ std::vector<SLBnd> readWLfile(std::string WLfilename)
if (lineelements.size() > 2)
{
slbndline.wlev1 = std::stod(lineelements[2]);
//printf("Wlev1=%f\n ", slbndline.wlev1);
}

//slbndline = readBSHline(line);
Expand Down

0 comments on commit 05a1f4d

Please sign in to comment.