diff --git a/include/dftd_cutoff.h b/include/dftd_cutoff.h index 1bb192b..69d9323 100644 --- a/include/dftd_cutoff.h +++ b/include/dftd_cutoff.h @@ -29,34 +29,6 @@ class TCutoff { explicit TCutoff(); - /** - * @brief Set the cutoff for the two-body dispersion term. - * - * @param val New value for two-body dispersion cutoff. - */ - void set_disp2(double val); - - /** - * @brief Set the cutoff for the three-body dispersion term. - * - * @param val New value for three-body dispersion cutoff. - */ - void set_disp3(double val); - - /** - * @brief Set the cutoff for the DFT-D4 coordination number. - * - * @param val New value for DFT-D4 coordination number cutoff. - */ - void set_cn(double val); - - /** - * @brief Set the cutoff for the EEQ coordination number. - * - * @param val New value for EEQ coordination number cutoff. - */ - void set_cn_eeq(double val); - /** * @brief Set all cutoffs. * diff --git a/src/dftd_cutoff.cpp b/src/dftd_cutoff.cpp index b8c7c8d..4c75d33 100644 --- a/src/dftd_cutoff.cpp +++ b/src/dftd_cutoff.cpp @@ -40,10 +40,10 @@ TCutoff::TCutoff() { }; void TCutoff::set_all(int new_cutoff) { - disp2 = (double)new_cutoff; - disp3 = (double)new_cutoff; - cn = (double)new_cutoff; - cn_eeq = (double)new_cutoff; + disp2 = static_cast(new_cutoff); + disp3 = static_cast(new_cutoff); + cn = static_cast(new_cutoff); + cn_eeq = static_cast(new_cutoff); }; void TCutoff::set_all(double new_cutoff) { disp2 = new_cutoff; @@ -52,20 +52,4 @@ void TCutoff::set_all(double new_cutoff) { cn_eeq = new_cutoff; }; -void TCutoff::set_disp2(double val) { - disp2 = val; -}; - -void TCutoff::set_disp3(double val) { - disp3 = val; -}; - -void TCutoff::set_cn(double val) { - cn = val; -}; - -void TCutoff::set_cn_eeq(double val) { - cn_eeq = val; -}; - }; // namespace dftd \ No newline at end of file diff --git a/test/test_param.cpp b/test/test_param.cpp index 7e9dd2f..eed19b4 100644 --- a/test/test_param.cpp +++ b/test/test_param.cpp @@ -61,9 +61,9 @@ int test_param() { int info; TCutoff cutoff; - cutoff.set_disp2(60.0); - cutoff.set_disp3(15.0); - cutoff.set_cn(30.0); + cutoff.disp2 = 60.0; + cutoff.disp3 = 15.0; + cutoff.cn = 30.0; info = test_rational_damping(ref, cutoff); if (!info == EXIT_SUCCESS) return info;