MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / grad_ref_func

Function grad_ref_func

python/test/unit/fem/test_interpolation.py:1101–1105  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1099 return -3 * x[0] ** 2 + x[1] ** 2
1100
1101 def grad_ref_func(x):
1102 values = np.zeros((2, x.shape[1]), dtype=default_scalar_type)
1103 values[0] = -6 * x[0]
1104 values[1] = 2 * x[1]
1105 return values
1106
1107 def modified_grad(x):
1108 grad = grad_ref_func(x)

Callers 1

modified_gradFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected