[Nek5000-users] Using Cartesian grid lookup table in Nekton

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Jun 4 10:44:10 CDT 2018


Thanks Paul, I will try this.

Regarding the interpolation, do we have a subroutine that interpolates from
uniform grid to GLL grid in nek5000?

Thanks,
Saikat


Saikat Mukherjee,
PhD Student,
Paul Research Group - http://www.me.vt.edu/mpaul/
Engineering Science and Mechanics,
Virginia Tech.

On Mon, Jun 4, 2018 at 7:32 AM, <nek5000-users at lists.mcs.anl.gov> wrote:

>
> Hi Saikat,
>
>
> If it's not too big for loading onto each rank, I would do the following,
> which is not very parallel, but is quite effective up to modest array sizes:
>
>
>
>       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
>
>
> I've not tested this code... just wrote it here but it should work as is.
>
>
> Paul
>
>
> ------------------------------
> *From:* Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> on behalf
> of nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
> *Sent:* Sunday, June 3, 2018 11:11:29 PM
> *To:* nek5000-users
>
> *Subject:* Re: [Nek5000-users] Using Cartesian grid lookup table in Nekton
>
> Hey Paul,
>
> Thanks for the reply. I have never really used the mpi architecture of
> Nek5000. I am thinking this should be a separate subroutine on the .usr
> file where I have to copy it onto each mpi rank?
>
> My finite difference grid is not that big. So the interpolation into SEM
> points should be easy. I would like to know how to copy it onto each MPI
> rank.
>
> Thanks,
> Saikat
>
> Saikat Mukherjee,
> PhD Student,
> Paul Research Group - http://www.me.vt.edu/mpaul/
> Engineering Science and Mechanics,
> Virginia Tech.
>
> On Thu, May 31, 2018 at 7:58 AM, <nek5000-users at lists.mcs.anl.gov> wrote:
>
>
> Hi Saikat,
>
>
> How large is your finite-difference look up table?
>
>
> (1 million points?  1 billion?  1000?)
>
>
> If it's not too large you can just copy it onto each mpi rank
>
> and then call your own serial interpolation routine for each
>
> SEM point, x,y,z, and store the results into an array in a
>
> common block that you can then reference in users
>
>
> Presumably you'd have to do this interpolation only one
>
> time and then de-reference the values from the common
>
> block on each time step with fairly low overhead.
>
>
>
> Paul
>
>
> ------------------------------
> *From:* Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> on behalf
> of nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
> *Sent:* Wednesday, May 30, 2018 2:42:14 PM
> *To:* nek5000-users at lists.mcs.anl.gov
>
> *Subject:* Re: [Nek5000-users] Using Cartesian grid lookup table in Nekton
>
> There is nothing spectral element specific here. You could do e.g. a
> trilinear interpolation but that's something you have to code yourself.
>
> -----Original message-----
> > From:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
> > Sent: Wednesday 30th May 2018 21:26
> > To: nek5000-users <nek5000-users at lists.mcs.anl.gov>
> > Subject: Re: [Nek5000-users] Using Cartesian grid lookup table in Nekton
> >
> > The question is how to read in a discrete data set defined in a finite
> difference grid in ffx or forcing in the .usr file. It seems like there
> will be some sort of interpolation to the spectral element grid. So yes,
> that is my question.
> >
> > Thank you,
> > Saikat
> > <br clear="all" />Saikat Mukherjee,
> > PhD Student,
> > Paul Research Group - http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/>
> > Engineering Science and Mechanics,
> > Virginia Tech.
> >
> > On Wed, May 30, 2018 at 2:48 PM,  <nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>>
> wrote:
> > What’s your question? How to do the interpolation in your function f?
> >
> > On 30 May 2018, at 20:17, "nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>"
> <nek5000-users at lists.mcs.anl.gov <mailto:nek5000-users at lists.mcs.anl.gov
> <nek5000-users at lists.mcs.anl.gov>>> wrote:
> >
> > Hi,
> >
> > Thanks for the reply. My problem is f is given as a discrete data set
> described in finite difference grid. I want to interpolate this to ffx like
> you said in my .usr file. Would like to know how to proceed.
> >
> > Thanks,
> > Saikat
> > <br clear="all" />Saikat Mukherjee,
> > PhD Student,
> > Paul Research Group - http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/>
> > Engineering Science and Mechanics,
> > Virginia Tech.
> >
> > On Wed, May 30, 2018 at 1:36 PM,  <nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>>
> wrote:
> > Lets consider
> >
> > ffx = f(x,y,z)
> >
> > here f is an user function (something you have to provide) which get
> evaluated at x,y,z (your grid points). Interpolation is required if f is
> given by a discrete data set.
> >
> > hth
> >
> >
> > -----Original message-----
> > > From:nek5000-users at lists.mcs.anl.gov <mailto:From%3Anek5000-users at l
> ists.mcs.anl.gov <From%3Anek5000-users at lists.mcs.anl.gov>> <
> nek5000-users at lists.mcs.anl.gov <mailto:nek5000-users at lists.mcs.anl.gov
> <nek5000-users at lists.mcs.anl.gov>>>
> > > Sent: Wednesday 30th May 2018 19:19
> > > To: nek5000-users <nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>>
> > > Subject: Re: [Nek5000-users] Using Cartesian grid lookup table in
> Nekton
> > >
> > > Hi,
> > >
> > > Thanks for the reply. The look up table is in a finite difference
> grid. Are you saying I can still feed it to the .usr file and it should be
> fine?
> > >
> > > Thanks,
> > > Saikat
> > > <br clear="all" />Saikat Mukherjee,
> > > PhD Student,
> > > Paul Research Group - http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/> <http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/>>
> > > Engineering Science and Mechanics,
> > > Virginia Tech.
> > >
> > > On Sat, May 26, 2018 at 10:54 PM,  <nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>
> <mailto:nek5000-users at lists.mcs.anl.gov <mailto:nek5000-users at lists.mc
> s.anl.gov <nek5000-users at lists.mcs.anl.gov>>>> wrote:
> > > Hi Saikat,
> > >
> > > You can always do the reading from the look up table from .usr file,
> at once then feed the data to your ffx ffy and ffz through a common block.
> > >
> > > On Thu, May 24, 2018 at 10:55 PM,  <nek5000-users at lists.mcs.anl.gov <
> mailto:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>>
> <mailto:nek5000-users at lists.mcs.anl.gov <mailto:nek5000-users at lists.mc
> s.anl.gov <nek5000-users at lists.mcs.anl.gov>>>> wrote:
> > > Hey all,
> > >
> > > Just following up on the query. Would appreciate any input.
> > >
> > > Thanks,
> > > Saikat
> > > <br clear="all" />Saikat Mukherjee,
> > > PhD Student,
> > > Paul Research Group - http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/> <http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/>>
> > > Engineering Science and Mechanics,
> > > Virginia Tech.
> > >
> > > On Tue, May 22, 2018 at 4:47 PM, Saikat Mukherjee <msaikat6 at vt.edu <
> mailto:msaikat6 at vt.edu <msaikat6 at vt.edu>> <mailto:msaikat6 at vt.edu <
> mailto:msaikat6 at vt.edu <msaikat6 at vt.edu>>>> wrote:
> > > Hey Neks,
> > >
> > > I have a forcing function which is in the form of a look up table in
> X-Y cartesian grid. I would like to use this forcing function in the 2-D
> fluid momentum equation that Nekton solves. Is there a way to do this in
> the .usr file or elsewhere?
> > >
> > > Thanks,
> > > Saikat
> > >
> > >
> > > <br clear="all" />Saikat Mukherjee,
> > > PhD Student,
> > > Paul Research Group - http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/> <http://www.me.vt.edu/mpaul/ <
> http://www.me.vt.edu/mpaul/>>
> > > Engineering Science and Mechanics,
> > > Virginia Tech.
> > >
> > >
> > > _______________________________________________
> > > Nek5000-users mailing list
> > > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mc
> s.anl.gov <Nek5000-users at lists.mcs.anl.gov>> <mailto:
> Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov
> <Nek5000-users at lists.mcs.anl.gov>>>
> > > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users> <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>>
> > >
> > >
> > >
> > > _______________________________________________
> > > Nek5000-users mailing list
> > > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mc
> s.anl.gov <Nek5000-users at lists.mcs.anl.gov>> <mailto:
> Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov
> <Nek5000-users at lists.mcs.anl.gov>>>
> > > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users> <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>>
> > >
> > >
> > > _______________________________________________
> > > Nek5000-users mailing list
> > > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mc
> s.anl.gov <Nek5000-users at lists.mcs.anl.gov>>
> > > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
> > _______________________________________________
> > Nek5000-users mailing list
> > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov
> <Nek5000-users at lists.mcs.anl.gov>>
> > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
> >
> > _______________________________________________
> > Nek5000-users mailing list
> > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov
> <Nek5000-users at lists.mcs.anl.gov>>
> > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
> >
> > _______________________________________________
> > Nek5000-users mailing list
> > Nek5000-users at lists.mcs.anl.gov <mailto:Nek5000-users at lists.mcs.anl.gov
> <Nek5000-users at lists.mcs.anl.gov>>
> > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users <
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users>
> >
> >
> > _______________________________________________
> > Nek5000-users mailing list
> > Nek5000-users at lists.mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180604/203d44c7/attachment-0001.html>


More information about the Nek5000-users mailing list