Parallel Integral #120
-
Hello, I writing a function who performs the easiest approximation possible to do 3D integral, but I'm getting some weird results: whenever I change the number of processor in the parallel computation I get quite different results and don't know why. I guess the problem is not in the 3D vector inputs but in the way I'm managing data in order to get the 3d scalar at each time step. The function I wrote looks like this:
Maybe I'm wondering that do statement is wrong and I should write something like "do i = 1,xsize(1)" and same for j and k. Thanks for the help ps: the function is called inside the main xcompact3d.f90, and I'm 100% sure that the inputs epsni and epsrk have no problem, then the scalar Reeff is saved as follows |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, EDIT : avoid the comparison between i (k as well) and "one" because "one" is a floating point number EDIT2 : the loops |
Beta Was this translation helpful? Give feedback.
Hello,
Have you looked at the estimation of the bulk velocity in the channel flow subroutine ? See https://github.com/xcompact3d/Incompact3d/blob/master/src/BC-Channel-flow.f90#L320
In your case, some minor modification is probably needed at i=1, i=nx and when xstart(3)=1 or xend(3)=nz. But it should be a good starting point.
EDIT : avoid the comparison between i (k as well) and "one" because "one" is a floating point number
EDIT2 : the loops
do k=xstart(3),xsize(3)
anddo j=xstart(2),xend(2)
are not consistent withepsni(i,j,k)
. It should beepsni(i,j-xstart(2)+1,k-xstart(3)+1)
. The i loop is ok because xstart(1)=1 and xend(1)=xsize(1)=nx. Also, the ending index of the k loop is wrong.