@@ -17,6 +17,7 @@ PW_Basis::PW_Basis(std::string device_, std::string precision_) : device(std::mo
1717 classname=" PW_Basis" ;
1818 this ->ft .set_device (this ->device );
1919 this ->ft .set_precision (this ->precision );
20+ this ->ft1 .setfft (this ->device ,this ->precision );
2021}
2122
2223PW_Basis:: ~PW_Basis ()
@@ -57,9 +58,19 @@ void PW_Basis::setuptransform()
5758 this ->distribute_g ();
5859 this ->getstartgr ();
5960 this ->ft .clear ();
60- if (this ->xprime ) this ->ft .initfft (this ->nx ,this ->ny ,this ->nz ,this ->lix ,this ->rix ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
61- else this ->ft .initfft (this ->nx ,this ->ny ,this ->nz ,this ->liy ,this ->riy ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
61+ this ->ft1 .clear ();
62+ if (this ->xprime )
63+ {
64+ this ->ft .initfft (this ->nx ,this ->ny ,this ->nz ,this ->lix ,this ->rix ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
65+ this ->ft1 .initfft (this ->nx ,this ->ny ,this ->nz ,this ->lix ,this ->rix ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
66+ }
67+ else
68+ {
69+ this ->ft .initfft (this ->nx ,this ->ny ,this ->nz ,this ->liy ,this ->riy ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
70+ this ->ft1 .initfft (this ->nx ,this ->ny ,this ->nz ,this ->liy ,this ->riy ,this ->nst ,this ->nplane ,this ->poolnproc ,this ->gamma_only , this ->xprime );
71+ }
6272 this ->ft .setupFFT ();
73+ this ->ft1 .setupFFT ();
6374 ModuleBase::timer::tick (this ->classname , " setuptransform" );
6475}
6576
0 commit comments