[Nek5000-users] Using a finite difference look up table as forcing in Nekton
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Jul 5 09:04:17 CDT 2018
Hey all,
This is a slightly long question and I appreciate your patience. I wanted
to use a finite difference lookup table as my forcing, specifically 'ffx'.
For this, I read in the finite difference array from a text file and used a
piecewise linear interpolant routine to interpolate onto the SEM grid given
by xm1(i,1,1,1) and ym1(i,1,1,1), where i=1,lx1*ly1*lz1*lelt.
Now, this worked fine in my smaller test domain having 6 elements,
calculated in just 1 processor. However, my actual problem size is big,
having 252 elements on 48 processors and I am having trouble with
parallelization.
I tried to load the input finite difference forcing onto each mpi rank and
then use the interpolation routine by using a previous suggestion by Paul.
subroutine usrdat2
include 'SIZE'
include 'TOTAL'
parameter (my_array_size=10000)
real my_array(my_array_size), work(my_array_size)
n = my_array_size
call rzero(my_array,n)
call rzero(work. ,n)
if (nid.eq.0) then
open (unit=49,file='myfile')
read(49,*) (my_array(k),k=1,n)
close(49)
endif
call gop(my_array,work,'+ ',n) ! Sum over all processors
return
end
However, I get a bunch of NaN s in the output log. I believe my troubles
are related to the parallelization part. Would like to know how to proceed.
Thanks,
Saikat
Saikat Mukherjee,
PhD Student,
Paul Research Group - http://www.me.vt.edu/mpaul/
Engineering Science and Mechanics,
Virginia Tech.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180705/95663efd/attachment.html>
More information about the Nek5000-users
mailing list