Post-process the gfu, curl them

I want to post-process the gfu and curl them.

The type of A will be <class ‘ngsolve.fem.CoefficientFunction’> when after I do post-process.

Please tell me what to do. Thank you.

gfu = GridFunction(fes)
with TaskManager():
    solvers.CG(sol=gfu.vec, rhs=f.vec, mat=a.mat, pre=c.mat, printrates='\r', tol=1e-8, maxsteps=1000)

A = GridFunction(fes)
A = 5*gfu

B = curl(A)

<class ‘ngsolve.comp.GridFunction’>
<class ‘ngsolve.fem.CoefficientFunction’>
AttributeError: ‘ngsolve.fem.CoefficientFunction’ object has no attribute ‘derivname’

First use curl and then scale it. Only the gridfunction itself can give the curl, if you scale it it is only a coefficientfunction and this doesn’t implement a curl.

Understood. Thank you for telling me :slight_smile: