MCPcopy Create free account
hub / github.com/CompPhysVienna/n2p2 / test_boundaries

Method test_boundaries

test/python/test_CutoffFunction.py:108–114  ·  view source on GitHub ↗
(self, c1, cf_type)

Source from the content-addressed store, hash-verified

106class Test_df:
107 @pytest.mark.parametrize("cf_type", cutoff_function_types)
108 def test_boundaries(self, c1, cf_type):
109 c1.setCutoffType(cf_type)
110 if cf_type not in [CutoffFunction.CT_TANHU, CutoffFunction.CT_TANH]:
111 assert c1.df(0.0) == pytest.approx(0.0), (
112 "Wrong cutoff derivative value.")
113 assert c1.df(cutoff_radius) == pytest.approx(0.0), (
114 "Wrong cutoff derivative value.")
115 @pytest.mark.parametrize("cf_type, cf_dvalue",
116 zip(cutoff_function_types,
117 cutoff_function_dvalues))

Callers

nothing calls this directly

Calls 2

setCutoffTypeMethod · 0.80
dfMethod · 0.45

Tested by

no test coverage detected