[gmx-developers] question for gromacs-5.0 source code

xiexiaobin at sjtu.edu.cn xiexiaobin at sjtu.edu.cn
Thu Aug 21 09:58:26 CEST 2014

The functions in this file are like this:

//TODO: test with threads and more than 1 MPI ranks
TEST_F(FFFTest3D, Real5_6_9)
int ndata[] = {5, 6, 9};
real * rdata;
t_complex* cdata;
ivec local_ndata, offset, rsize, csize, complex_order;

gmx_parallel_3dfft_init(&fft_, ndata, &rdata, &cdata,
comm, TRUE, 1);

gmx_parallel_3dfft_real_limits(fft_, local_ndata, offset, rsize);
gmx_parallel_3dfft_complex_limits(fft_, complex_order,
local_ndata, offset, csize);
checker_.checkVector(rsize, "rsize");
checker_.checkVector(csize, "csize");
int size = csize[0]*csize[1]*csize[2];

memcpy(rdata, inputdata, size*sizeof(t_complex));
gmx_parallel_3dfft_execute(fft_, GMX_FFT_REAL_TO_COMPLEX, 0, NULL);
//TODO use std::complex and add checkComplex for it
reinterpret_cast<real*>(cdata), "forward");

memcpy(cdata, inputdata, size*sizeof(t_complex));
gmx_parallel_3dfft_execute(fft_, GMX_FFT_COMPLEX_TO_REAL, 0, NULL);
for (int i = 0; i < ndata[0]*ndata[1]; i++) //check sequence but skip unused data
checker_.checkSequenceArray(ndata[2], rdata+i*rsize[2],
gmx::formatString("backward %d", i).c_str());

xiexiaobin at sjtu.edu.cn
From: David van der Spoel
Date: 2014-08-21 15:53
To: gmx-developers
Subject: Re: [gmx-developers] question for gromacs-5.0 source code
On 2014-08-21 09:35, xiexiaobin at sjtu.edu.cn wrote:
> Hi,
> I saw a source file fft.cpp that contains some test functions under the
> path gromacs-5.0\src\gromacs\fft\tests.What is it used for?Dose any
> functions in other files will use this file's functions?
What does it look like? Testing. So the answer is probably no.
> BR,
> Steve
> ------------------------------------------------------------------------
> xiexiaobin at sjtu.edu.cn <mailto:xiexiaobin at sjtu.edu.cn>
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
Gromacs Developers mailing list
* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before posting!
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20140821/b2e8c1d3/attachment-0001.html>

More information about the gromacs.org_gmx-developers mailing list