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

xml.etree.ElementTree usage #621

Merged
merged 4 commits into from
Jan 6, 2020
Merged

xml.etree.ElementTree usage #621

merged 4 commits into from
Jan 6, 2020

Conversation

gdmcbain
Copy link
Contributor

@gdmcbain gdmcbain commented Jan 6, 2020

This is for #620, being the first part of the splitting up of #610.

@gdmcbain gdmcbain changed the title get XML attributes xml.etree.ElementTree usage Jan 6, 2020
@gdmcbain
Copy link
Contributor Author

gdmcbain commented Jan 6, 2020

With this, the example from #620 gives:

{'Reference': 'XML'} 
                   /Xdmf/Domain/DataItem[@Name="Point Data"]
               {'Reference': 'XML'} 
                   /Xdmf/Domain/DataItem[@Name="Point Data"]
               
[[[0. 0. 0.]
  [1. 0. 0.]
  [1. 1. 0.]
  [0. 1. 0.]]

 [[0. 0. 2.]
  [1. 0. 2.]
  [1. 1. 2.]
  [0. 1. 2.]]]

[[[0. 0. 0.]
  [1. 0. 0.]
  [1. 1. 0.]
  [0. 1. 0.]]

 [[0. 0. 2.]
  [1. 0. 2.]
  [1. 1. 2.]
  [0. 1. 2.]]]

which is correct.

It's still not possible to meshio.read('ref.xdmf') because meshio mistakes the DataItem Name="Point Data" for a Grid; handling that requires the full #610 of which this is the first part.

@nschloe nschloe merged commit c8c7d11 into nschloe:master Jan 6, 2020
@gdmcbain gdmcbain deleted the 620-xdmf-et branch January 6, 2020 14:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants