Am 26.02.2014 um 17:11 schrieb Kirk, Benjamin (JSC-EG311) <[email protected]>:
> On Feb 26, 2014, at 9:59 AM, John Peterson <[email protected]> wrote: > >> This sounds like an interesting idea, but as you have discovered, VTKIO is >> pretty far away from being able to do that as it stands. >> >> At the very least, you might be able to use it for inspiration to do what >> you want... > > Agreed. An option could be to extend the VTKIO Constructor to take a > function object to call, providing it the pointer while it is valid. That > would result in libMesh calling your arbitrary code at some point. I'm not > sure I understand your use case, but you might also need a method to bypass > writing the resulting data structure to disk? I'm not so sure about it. As far as I understood it from digging into the headers and source code of vtkio, this class already has a private member called _vtk_grid, which is a vtkUnstructuredGrid*. This private member is already used in other private functions like nodes_to_vtk(), cells_to_vtk(), system_vectors_to_vtk(...) to fill it with the proper data. Actually, the public member functions like write_nodal_data(...), write(..), write_equation_systems(...) use these private functions to set up the _vtk_grid-variable before they use a vtkXMLPUnstructuredGridWriter to actually write the file to disk. All I would need is this kind of functionality without the final call to the unstructured grid writer. For example, I guess it would help to make the private functions public.. And just to clarify my use case a bit: It's just about visualizing simulation results in the same program that does the simulation. Up to now, I write a program that uses libmesh to solve a certain differential equation. Then an output file is written and I open Paraview to visualize it. Currently, I'm writing a little test program, that links against libmesh and VTK. The goal is to do the simulationa and visualization in the same program. One example where this might be useful are time-evolutions, where you can visualize the results right as they are computed by libmesh or consider a time-independent PDE with a certain set of free parameters you can adjust. As you change the parameters programmatically, I would like to see the results instantly after the computation in the same program without doing the cycle 'compute solution->write file to disk->open paraview to view it -> repeat it for the next parameter.. Cheers Erich ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
