Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
D
dorie
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 31
    • Issues 31
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • dorie
  • dorie
  • Merge Requests
  • !150

Merged
Opened Apr 15, 2019 by Lukas Riedel@lriedelOwner5 of 5 tasks completed5/5 tasks

Use VTKReader as dictionary

  • Overview 10
  • Commits 6
  • Pipelines 2
  • Changes 8

What does this MR do?

Split VTKDataArray off VTKReader: Make VTKReader a mapping that returns data arrays based on their names. VTKDataArray is a wrapper around the underlying VTK data array and is then used for evaluating the data.

This split makes it possible to iterate over the range of data arrays without actually knowing their names beforehand.

Before:

# array_names = [ ... ]
reader = VTKReader("vtkfile.vtu")
for name in array_names:
    reader.set_data_array(name)
    val = reader.evaluate([0.0, 0.0, 0.0])

After:

# array_names = [ ... ]
reader = VTKReader("vtkfile.vtu")
array = reader[array_names[0]]

for name, array in reader.items():
    print("Operating on array {}".format(name))
    val = array.evaluate([0.0, 0.0, 0.0])

Additionally

  • Fix a bug where python_tests were run for target system_tests.
  • Remove namespace packaging from Python setup.

Is there something that needs to be double checked?

No.

Can this MR be accepted?

  • Implemented the new Python classes
  • Updated Python unit test
  • Updated user docs
  • Pipeline passing
  • Added entry to CHANGELOG.md

Related issues

Edited Apr 15, 2019 by Lukas Riedel
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: dorie/dorie!150
Source branch: vtkreader-as-dict

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.