You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fact that the test did not fail in spite of the bug removed in #1568 suggests that the test didn't test the method sufficiently. The test data uses sqrt(3) as dipole moment, so the unintended cast to int in the calculation of the total dipole moment should have made a difference.
The text was updated successfully, but these errors were encountered:
Also the test (dipolar_mdlc_p3m_scafacos_p2nfft.py) could be modernized:
remove print statements conveying the same information as one of the assertions
use float(np.genfromtxt()) instead of python2-style file open
deduce n_particle from the size of the particle array loaded from file
instantiate all particles at once with numpy slicing
maybe replace the duplicated code logic for err_* variables by a class static method to calculate the standard error or the mean from two input variables (the sample size can be deduced from those inputs, no need to involve data.shape[0])
fixes#1569closes#4046
This is based on #4046, minus the last commit.
Description of changes:
* Switch tests for dipolar interactions with open boundary conditions from comparing two methods against each other to comparing individual methods against reference data
* Use prefactor != 1 in dipolar 2d and 3d periodic tests
* Block DipolarDirectSumWithReplicaCpu from n_replica=0 and periodic bc, as it does not apply minimum image convention. Introducing minimum image convention there is not worth it, because that is provided by DipolarDirectSumCpu. The two methods should be merged anyway.
The fact that the test did not fail in spite of the bug removed in #1568 suggests that the test didn't test the method sufficiently. The test data uses sqrt(3) as dipole moment, so the unintended cast to int in the calculation of the total dipole moment should have made a difference.
The text was updated successfully, but these errors were encountered: