- Thank you received: 0
VTKOutput
4 years 4 months ago #2955
by dfridline
New to NGSolve and trying out a few of the example cases but looking at the method for outputting solutions to view in Paraview.
In particular, I was trying out the simple Poisson problem and trying to use the VTKOutput but not very successful. When I issue the following commands, it throws up a TypeError
vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)
vtk.Do()
TypeError Traceback (most recent call last)
<ipython-input-11-5f2b227fbcc2> in <module>
----> 1 vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)
2 vtk.Do()
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. ngsolve.comp.VTKOutput(ma: ngsolve.comp.Mesh, coefs: list = [], names: list = [], filename: str = 'vtkout', subdivision: int = 0, only_element: int = -1)
Invoked with: kwargs: ma=<ngsolve.comp.Mesh object at 0x1218c6590>, coefs=[<ngsolve.comp.GridFunction object at 0x1218cf860>], names=, filename='poisson_solution', subdivisions=3
I am assuming that I am not pulling the correct solution variable out but unclear as to how I should properly format the solution.
Any help would be appreciated.
Thanks,
D Fridline
In particular, I was trying out the simple Poisson problem and trying to use the VTKOutput but not very successful. When I issue the following commands, it throws up a TypeError
vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)
vtk.Do()
TypeError Traceback (most recent call last)
<ipython-input-11-5f2b227fbcc2> in <module>
----> 1 vtk = VTKOutput(ma=mesh,coefs=[gfu],names=["u"],filename="poisson_solution",subdivisions=3)
2 vtk.Do()
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. ngsolve.comp.VTKOutput(ma: ngsolve.comp.Mesh, coefs: list = [], names: list = [], filename: str = 'vtkout', subdivision: int = 0, only_element: int = -1)
Invoked with: kwargs: ma=<ngsolve.comp.Mesh object at 0x1218c6590>, coefs=[<ngsolve.comp.GridFunction object at 0x1218cf860>], names=, filename='poisson_solution', subdivisions=3
I am assuming that I am not pulling the correct solution variable out but unclear as to how I should properly format the solution.
Any help would be appreciated.
Thanks,
D Fridline
Time to create page: 0.101 seconds