MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / grad

Function grad

python/utils.py:33–47  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

31 return TangentialFacetFESpace(mesh, **args)
32
33def grad(func):
34 try:
35 # now in C++ code
36 # if "normal vector" in str(func):
37 # return specialcf.Weingarten(func.dim)
38 if func.derivname == "grad":
39 return func.Deriv()
40 except:
41 pass
42 add = func.Operator("grad")
43 if add:
44 return add
45 # if func.derivname != "grad":
46 raise Exception("cannot form grad")
47 # return func.Deriv()
48
49def Grad(func):
50 """ Jacobi-matrix"""

Callers 15

GetGradientFunction · 0.85
GenerateMatrixMethod · 0.85
GenerateMatrixMethod · 0.85
GenerateMatrixMethod · 0.85
GenerateMatrixMethod · 0.85
GenerateMatrixMethod · 0.85
GetGradientMethod · 0.85
GetGradientTransMethod · 0.85
GetGradientMethod · 0.85
GetGradientTransMethod · 0.85
GradFunction · 0.85

Calls 1

OperatorMethod · 0.45

Tested by 15

test_arnoldiFunction · 0.68
test_krylovspace_solversFunction · 0.68
jumpdnFunction · 0.68
test_periodicH1Function · 0.68
test_quasiperiodicFunction · 0.68
test_hdg1dFunction · 0.68
test_convection1d_dgFunction · 0.68
test_1dlaplaceFunction · 0.68
test_pickle_multidimFunction · 0.68