GithubHelp home page GithubHelp logo

dchang10 / jacobielliptic.jl Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 555 KB

Elliptic integrals and Jacobi elliptic functions that are GPU friendly

Home Page: http://dominic-chang.com/JacobiElliptic.jl/

License: MIT License

Julia 100.00%
elliptic-integrals gpu-acceleration jacobi-elliptic-functions metal cuda julia automatic-differentiation carlson-integrals fukushima enzyme-ad

jacobielliptic.jl's Introduction

JacobiElliptic

JacobiElliptic is an implementation of Toshio Fukushima's & Billie C. Carlson's for calculating Elliptic Integrals and Jacobi Elliptic Functions. The defaul algorithms are set to the Carlson algorithms.

Features

Documentation

Dev

Repo Status

Build Status Coverage

Incomplete Elliptic Integrals

Function Definition
F(φ, m) $F(\phi|m)$: Incomplete elliptic integral of the first kind
E(φ, m) $E(\phi|m)$: Incomplete elliptic integral of the second kind
Pi(n, φ, m) $\Pi(n;\,\phi|\, m)$: Incomplete elliptic integral of the third kind
J(n, φ, m) $J (n;\, \phi |\,m)=\frac{\Pi(n;\,\phi|\, m) - F(\phi,m)}{n}$: Associated incomplete elliptic integral of the third kind

Complete Elliptic Integrals

Function Definition
K(m) $K(m)$: Complete elliptic integral of the first kind
E(m) $E(m)$: Complete elliptic integral of the second kind
Pi(n, m) $\Pi(n|\, m)$: Complete elliptic integral of the third kind
J(n, m) $J (n|\,m)=\frac{\Pi(n|\, m) - K(m)}{n}$: Associated incomplete elliptic integral of the third kind

Jacobi Elliptic Functions

Function Definition
sn(u, m) $\text{sn}(u | m) = \sin(\text{am}(u | m))$
cn(u, m) $\text{cn}(u | m) = \cos(\text{am}(u | m))$
asn(u, m) $\text{asn}(u | m) = \text{sn}^{-1}(u | m)$
acn(u, m) $\text{acn}(u | m) = \text{cn}^{-1}(u | m)$

jacobielliptic.jl's People

Contributors

archermarx avatar dominic-chang avatar ptiede avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ptiede

jacobielliptic.jl's Issues

NaNs from ForwardDiff

For the specific value of phi=1.57079632 and m=0 in JacobiElliptic.E(phi, m), ForwardDiff outputs NaNs in the partial derivatives.
Here's a minimum working example:

using JacobiElliptic                  
using ForwardDiff                     
                                             
phi = 1.57079632                      
m = 0.0                               
                                      
func(x) = JacobiElliptic.E(x[1], x[2])
                                      
x = [phi, m]                          
ForwardDiff.gradient(func, x)         

EllipticFunctions.ellipticE() reports this gradient to be [1.0, 0.0]
Is this fixable?

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Jacobi J does not exist

When I try to call Jacobi J I get a symbol not found error. MWE

using JacobiElliptic

J(2, 0.5, 0.5)

ERROR: UndefVarError: `J` not defined
Stacktrace:
 [1] J(::Int64, ::Float64, ::Vararg{Float64})
   @ JacobiElliptic ~/.julia/dev/JacobiElliptic/src/JacobiElliptic.jl:44
 [2] top-level scope
   @ REPL[6]:1

From looking around, I see that CarlsonAlg doesn't define a J function.

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.