Domanda

I wrote a program in Fortran which calculates molecular movements (basically their centers in 3d space - xyz). I'd like to visualize these data in ParaView, which I'm capable of. My programs output is VTK file which I can load into ParaView and see everything I need clearly. But I'd like to somehow make this process autonomous.

Basically I'd like to do computations and after some steps I'd like to visualize molecules with ParaaView, take a screenshot from certain angle save images as png (or any other img format which ParaView supports). Because of a high number of iterations I can't do this myself, therefore I thought about incorporating some kind of script into my Fortran code or any other way to make this happen, but I don't even know if this is possible or how?

I do really hope you can help me I'm in a pinch here, I'm quite new to Fortran, so I hope what I'm asking for is not impossible.

I'd like to thank you very much for any help you can provide me with. (I'm not asking for a prepared script, but for some hint/guide how to do this if possible, but I'm not against examples either).

È stato utile?

Soluzione

As Kyle Kanos said, you can script Paraview using Python. Those scripts then can be called from Fortran using call SYSTEM('cmd',status) (pre-Fortran 2008, non-standard, but supported by at least gfortran and ifort) or call EXECUTE_COMMAND_LINE('cmd') (Fortran 2008).

Here is the GCC documentation: SYSTEM and EXECUTE_COMMAND_LINE.

Altri suggerimenti

Paraview has Python built into it for this exact purpose.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top