(self, c1, cf_type)
| 126 | class Test_fdf: |
| 127 | @pytest.mark.parametrize("cf_type", cutoff_function_types) |
| 128 | def test_boundaries(self, c1, cf_type): |
| 129 | c1.setCutoffType(cf_type) |
| 130 | |
| 131 | f, df = c1.fdf(0.0) |
| 132 | if cf_type not in [CutoffFunction.CT_TANHU]: |
| 133 | assert f == pytest.approx(1.0), ( |
| 134 | "Wrong cutoff function value.") |
| 135 | if cf_type not in [CutoffFunction.CT_TANHU, CutoffFunction.CT_TANH]: |
| 136 | assert df == pytest.approx(0.0), ( |
| 137 | "Wrong cutoff derivative value.") |
| 138 | |
| 139 | f, df = c1.fdf(cutoff_radius * cutoff_parameter) |
| 140 | if cf_type not in [CutoffFunction.CT_TANHU, CutoffFunction.CT_TANH]: |
| 141 | assert f == pytest.approx(1.0), ( |
| 142 | "Wrong cutoff function value.") |
| 143 | |
| 144 | f, df = c1.fdf(cutoff_radius) |
| 145 | assert f == pytest.approx(0.0), ( |
| 146 | "Wrong cutoff function value.") |
| 147 | assert df == pytest.approx(0.0), ( |
| 148 | "Wrong cutoff derivative value.") |
| 149 | @pytest.mark.parametrize("cf_type, cf_value, cf_dvalue", |
| 150 | zip(cutoff_function_types, |
| 151 | cutoff_function_values, |
nothing calls this directly
no test coverage detected