Commit 662bff21 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

still debugging

parent 68ed2280
...@@ -57,6 +57,7 @@ class DNS(_code): ...@@ -57,6 +57,7 @@ class DNS(_code):
'mail_address': '', 'mail_address': '',
'mail_events' : None} 'mail_events' : None}
self.generate_default_parameters() self.generate_default_parameters()
self.statistics = {}
return None return None
def set_precision( def set_precision(
self, self,
......
...@@ -1026,11 +1026,13 @@ void field<rnumber, be, fc>::symmetrize() ...@@ -1026,11 +1026,13 @@ void field<rnumber, be, fc>::symmetrize()
//this->ift(); //this->ift();
//this->dft(); //this->dft();
//this->normalize(); //this->normalize();
//return;
typename fftw_interface<rnumber>::complex *cdata = this->get_cdata(); typename fftw_interface<rnumber>::complex *cdata = this->get_cdata();
// symmetrize kx = 0 plane, line by line, for ky != 0 // symmetrize kx = 0 plane, line by line, for ky != 0
MPI_Status *mpistatus = new MPI_Status; MPI_Status *mpistatus = new MPI_Status;
typename fftw_interface<rnumber>::complex *buffer; typename fftw_interface<rnumber>::complex *buffer = new typename fftw_interface<rnumber>::complex[ncomp(fc)*this->clayout->sizes[1]];
buffer = fftw_interface<rnumber>::alloc_complex(ncomp(fc)*this->clayout->sizes[1]); //typename fftw_interface<rnumber>::complex *buffer;
//buffer = fftw_interface<rnumber>::alloc_complex(ncomp(fc)*this->clayout->sizes[1]);
/*ptrdiff_t tindex;*/ /*ptrdiff_t tindex;*/
int ranksrc, rankdst; int ranksrc, rankdst;
for (ptrdiff_t iy = 1; iy < ptrdiff_t(this->clayout->sizes[0]/2); iy++) for (ptrdiff_t iy = 1; iy < ptrdiff_t(this->clayout->sizes[0]/2); iy++)
...@@ -1072,7 +1074,7 @@ void field<rnumber, be, fc>::symmetrize() ...@@ -1072,7 +1074,7 @@ void field<rnumber, be, fc>::symmetrize()
{ {
ptrdiff_t izz = (this->clayout->sizes[1] - iz); ptrdiff_t izz = (this->clayout->sizes[1] - iz);
ptrdiff_t cindex = this->get_cindex(0, iyy, izz); ptrdiff_t cindex = this->get_cindex(0, iyy, izz);
DEBUG_MSG("iy = %ld, iz = %ld\n", iy, iz); //DEBUG_MSG("iy = %ld, iz = %ld\n", iy, iz);
for (int cc = 0; cc < int(ncomp(fc)); cc++) for (int cc = 0; cc < int(ncomp(fc)); cc++)
{ {
(*(cdata + ncomp(fc)*cindex + cc))[0] = (*(buffer + ncomp(fc)*iz+cc))[0]; (*(cdata + ncomp(fc)*cindex + cc))[0] = (*(buffer + ncomp(fc)*iz+cc))[0];
...@@ -1087,7 +1089,8 @@ void field<rnumber, be, fc>::symmetrize() ...@@ -1087,7 +1089,8 @@ void field<rnumber, be, fc>::symmetrize()
} }
} }
} }
fftw_interface<rnumber>::free(buffer); //fftw_interface<rnumber>::free(buffer);
delete[] buffer;
delete mpistatus; delete mpistatus;
// symmetrize kx = 0, ky = 0 line // symmetrize kx = 0, ky = 0 line
if (this->clayout->myrank == this->clayout->rank[0][0]) if (this->clayout->myrank == this->clayout->rank[0][0])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment