MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / test_function

Function test_function

scripts/fem_check.py:23–28  ·  view source on GitHub ↗

f(x,y,z) = 1.0 / sqrt(x*x + y*y + z*z);

(charges)

Source from the content-addressed store, hash-verified

21 return parser.parse_args();
22
23def test_function(charges):
24 """
25 f(x,y,z) = 1.0 / sqrt(x*x + y*y + z*z);
26 """
27 return lambda pts: np.sum([1.0 / numpy.linalg.norm(pts - c, axis=1)
28 for c in charges], axis=0);
29
30def test_function_grad(charges):
31 """

Callers 1

mainFunction · 0.85

Calls 1

normMethod · 0.80

Tested by

no test coverage detected