i compute a solution for a 3D Magnetostatic problem using ngsolve.
u = GridFunction(fes) ... u.vec.data = solver * f.vec
I’d like to compute the energy stored in the field. Therefore i need the solutionvector (in a flat manner) and the assembled load vector (in the same order).
At the moment i’m stuck how to transform the ngsolve vectors into scipy/numpy vectors. I can’t find any documentation. The method NumPy() doesn’t seem to exist for the u and f vector.
With best regards