Skip to content

Commit f6fd16d

Browse files
committed
set the float type
1 parent e1601ee commit f6fd16d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

source/module_basis/module_pw/pw_basis.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ PW_Basis::PW_Basis()
1616
PW_Basis::PW_Basis(std::string device_, std::string precision_) : device(std::move(device_)), precision(std::move(precision_)) {
1717
classname="PW_Basis";
1818
std::string fft_precison;
19-
fft_precison = this->precision;
19+
if ((this->precision=="single") || (this->precision=="mixing"))
20+
{
21+
fft_precison = "mixing";
22+
}
23+
else if (this->precision=="double")
24+
{
25+
fft_precison = "double";
26+
}
2027
#if (not defined(__ENABLE_FLOAT_FFTW) and (defined(__CUDA) || defined(__RCOM)))
2128
if (this->device == "gpu")
2229
{

source/module_basis/module_pw/test/pw_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class TestEnv : public testing::Environment
3636

3737
int main(int argc, char **argv)
3838
{
39-
4039
int kpar;
4140
kpar = 1;
4241
#ifdef __ENABLE_FLOAT_FFTW

0 commit comments

Comments
 (0)