Merge lp://staging/~fluidity-core/fluidity/speedup-vtudiff into lp://staging/fluidity

Proposed by Stephan Kramer
Status: Merged
Merged at revision: 4320
Proposed branch: lp://staging/~fluidity-core/fluidity/speedup-vtudiff
Merge into: lp://staging/fluidity
Diff against target: 386 lines (+101/-212)
2 files modified
manual/visualisation_and_diagnostics.tex (+1/-13)
python/vtktools.py (+100/-199)
To merge this branch: bzr merge lp://staging/~fluidity-core/fluidity/speedup-vtudiff
Reviewer Review Type Date Requested Status
Jon Hill Approve
Review via email: mp+201957@code.staging.launchpad.net

Description of the change

This speeds up the vtudiff script run on vtus with multiple fields, by only setting up the VTK probe once instead of once per field. It does not change anything in the way fields are probed.

There is also a little bit of cleaning up:
* removing the option to call vtktools as a main: this really doesn't make sense and should be in a separate script
* removing the "field manipulation" methods. These were basically vectorial operations on fields but implemented in a rather inefficient way. I see no reason to not simply use numpy vector operations for that, so instead of:

vtu.SubFieldFromField("fieldName", array, "newFieldName")

just do:

field = vtu.GetField("fieldName")
vtu.AddField("newFieldName", field-array)

To post a comment you must log in.
4308. By Stephan Kramer

For vtudiff: Also compute diff of cell-based fields (only works if both meshes are the same)

Revision history for this message
Jon Hill (jon-hill) :
review: Approve
Revision history for this message
Stephan Kramer (s-kramer) wrote :

Thanks Jon, will merge once I have a green buildbot.

4309. By Stephan Kramer

Maintain the same sign convention in vtudiff as before:

With "vtudiff A.vtu B.vtu C.vtu" we get fieldC = fieldA-fieldB
Also don't try to subtract vtkGhostLevels field.

4310. By Stephan Kramer

Merge in trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.