Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing N-dim vector_field to vtk file #270

Open
gnikit opened this issue Jun 3, 2020 · 1 comment
Open

Writing N-dim vector_field to vtk file #270

gnikit opened this issue Jun 3, 2020 · 1 comment

Comments

@gnikit
Copy link
Member

gnikit commented Jun 3, 2020

Hi,
I have been working on some complex problems with adaptivity and neutronics (using fetch2 which is built on fluidity) and while trying to visualise some arrays I came across a limitation of vector_fields which does not allow for the output of vector field if the dimension is > 3.
Which had me wondering if it would be possible to write a n-dimensional vector_field to a vtk file.

I have had a look at the VTK_Interfaces.F90 file and although the remap_field method will be a bit of an issue, the real problem is vtkwritefvn/ vtkwritedvn. From what I gather these are defined in vtkfortran.cpp and they take as arguments explicit pointers to x,y,z entries of the vector_field.
I think what I am suggesting is possible with some minor changes/ overloading, e.g. SetTuple3 will have to be changed to SetTuple and so will *vx, *vy, *vz to **v.

Do you think this is something that could go in master, because currently I am using an array of scalar fields to output my n x no_nodes vector and it is an absolute nightmare to post-process.

@stephankramer
Copy link
Contributor

Oh, that's some horrible old code in there. Yes, absolutely, sounds like a sensible addition. As long as the interface for vtk_interfaces doesn't change, I don't think anyone will care about what you do to libvtkfortran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants