Giter Site home page Giter Site logo

interpolatexdmf's Introduction

InterpolateXDMF

InterpolateXDMF is a python package for easy accessing XDMF/HDF5 files as outputed by Finite Element software like OpenGeoSys. It uses the meshio and the VTK python wrapper and linear interpolation between time steps and grid points to access any points in space and time within the simulation domain.

0. Installation

Note: InterpolateXDMF requires the vtk wrapper for python. clone the repository and use pip to install the package

# pip install [--user] https://github.com/joergbuchwald/InterpolateXDMF/archive/refs/heads/master.zip

1. Documentation for InterpolateXDMF

You can find the documentation under https://joergbuchwald.github.io/InterpolateXDMF-doc/

2. Quick start

Unittests can be run via

# python tests/test_interpolate.py

from the project root directory.

3. FAQ/Troubleshooting

Installation:

  • If the vtk whell can't be found on PyPI you can checkout pyvista/pyvista#2064 for unofficial wheels.

As the input data is triangulated with QHull for the linear interpolation it might fail at boundaries or if a wrong input dimension is given. Possible solutions:

  • In order for interpolation to work correctly providing the correct dimension (set via dim keyword) of the problem is crucial.
  • As the dim keyword specifies also the coordinates to use, InterpolateXDMF assumes that dim=1 refers to the x coordinate and dim=2 implies that the problem lies in the xy-plane by default. This can be changed by specifying one_d_axis for one dimension or two_d_planenormal for two dimensions.
  • For some meshes it might help to adjust the number of points taken into account by the triangulation, which can be done using the nneighbors keyword. Default value is 20.
  • Especially along boundaries, linear interpolation with the QHULL method often fails, this can be resolved by using nearest neighbor interpolation.
  • Alternatively, you can change now the interpolation_backend from scipy to vtk and try out different interpolation kernels.

interpolatexdmf's People

Contributors

joergbuchwald avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.