Git Product home page Git Product logo

inductioneq's Introduction

Induction Equation

License DOI

This is a set of tools for numerically solving the nonlinear magnetic induction equation with OpenCL. It is intended as a research tool to investigate different properties of the linear and nonlinear induction equation for user specified testcases. All numerical aspects are encapsulated in OpenCL kernels. The OpenCL host side is abstracted with the help of MatCL, an OpenCL interface for MathWorks Matlab. This provides the user with an intuitive and easy way of handling and processing input and output data without any intricate knowledge of OpenCL and allows for interactive development. Support for Julia is currently under development and will be provided in the near future. Usage of the OpenCL kernels is not limited to Matlab or Julia; on the contrary they can be used with any kind of host code or application that supports OpenCL.

This project is the base of current mathematical and physics research. Hence, special emphasis is placed on the computational mathematics, meaning the form of discretization, methods of different order for spatial discretization and time integration and admissable boundary conditions for the linear and nonlinear induction equation. First results have been published on arXiv.org.

Exemplary testcases for the linear and nonlinear induction equation can be found in the examples folder. Specific readme files are available in the subfolders and additional comments are provided in the source files.

This is still very much work in progress. If you have any questions or want to contribute feel free to contact us.

Prerequisites & Setup

To run the examples the following must be installed:

  • OpenCL Driver (CPU or GPU)
  • OpenCL C++ Headers (e.g. provided by the OpenCL vendors SDKs)
  • Mathworks Matlab
  • MatCL

For ease of use you can add MatCL to the search path of Matlab.

Citation

This software can be cited as:

@misc{ranocha2018induction,
  title={{InductionEq}. {A} set of tools for numerically solving the nonlinear
         magnetic induction equation with {H}all effect in {OpenCL}.},
  author={Ranocha, Hendrik and Ostaszewski, Katharina and Heinisch, Philip},
  month={09},
  year={2018},
  howpublished={\url{https://github.com/IANW-Projects/InductionEq}},
  doi={10.5281/zenodo.1434408}
}

The accompagnying article describing the spatial discretizations in detail is:

@online{ranocha2018numerical,
  title={Numerical Methods for the Magnetic Induction Equation with Hall Effect
         and Projections onto Divergence-Free Vector Fields},
  author={Ranocha, Hendrik and Ostaszewski, Katharina and Heinisch, Philip},
  year={2018},
  month={10},
  note={Submitted},
  eprint={1810.01397},
  eprinttype={arxiv},
  eprintclass={math.NA}
}

License

This project is licensed under the terms of the Creative Commons CC BY-NC-ND 4.0 license.

Disclaimer

Product and company names may be trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or their affiliates. Everything is provided as is and without warranty. Use at your own risk!

inductioneq's People

Contributors

kostaszki avatar philipheinisch avatar ranocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

inductioneq's Issues

Julia Interface

We will add a simple Julia interface mimicking the Matlab scripts. Although it is not very Julian, it makes the usage and switching between both languages easier.

Add list with typical issues/errors

We should compose a list with issues/errors that may occur. Maybe in the form of an extended user guide? Examples would be:

  • Poor conditioning of a problem which may lead to NaN.
  • Data type handling in Matlab. Some variables need to explicitly be defined as integers.
  • Errors in OpenCL kernel typically lead to segmentation faults in Matlab.
  • Explicit casting and precision of OpenCL defines.

Naming of (Laplace) Coefficients

Actually, we are using the negative Laplace operator for the divergence cleaning method. This should be reflected in the names of the arrays containing the coefficients. We might want to reconsider the namimg of the other coefficient arrays, too.

Allow SBP operators with extended boundary closures (?)

The coefficients are already implemented, we just need the high-level interface.

However, no second derivative approximation have been derived for these extended operators. Thus, not all options (narrow stencil) for the divergence cleaning via projection would be available.

CI setup

We could use Appveyor and/or Travis.

WIP: PythonBackend/cl_run_kernel rewrite

Hi !
i started to write a PyOpenCl based backend and realized that all arrays are created in host memory. Afterwards they are copied to the OpenCL device, used by the kernel, and copied back by cl_run_kernel.
I would like to write functions which just create references to the arrays in OpenCL device memory and pass them around, because transfer to and from GPUs can be slow. What do you think ?

Use more default coefficients

We could use some default coefficients, e.g. for the adaptive dissipation:

// default values for the adaptive artificial dissipation given by Svärd & Mishra (2009)
#ifndef CMIN
#define CMIN 1
#endif
...

Additionally, such default values might be set for the configuration dictionaries. What do you think?

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.