Coder Social home page Coder Social logo

juliavlasov / semilagrangian.jl Goto Github PK

View Code? Open in Web Editor NEW
1.0 9.0 0.0 3.72 MB

Advection implementation using Semi-Lagrangian numerical method

Home Page: https://juliavlasov.github.io/SemiLagrangian.jl/dev

License: Other

Julia 100.00%
julia-package semi-lagrangian-advection vlasov-solver

semilagrangian.jl's Introduction

SemiLagrangian.jl

Build Status codecov

Advection implementation in Julia using Semi-Lagrangian numerical method

!!! note

This package is difficult to use directly. There is still a lack of documentation 
and some parts like splines need to be optimized. This package has been developed 
to calculate the interpolations and advections used in the package 
[VlasovSolvers.jl](https://github.com/JuliaVlasov/VlasovSolvers.jl).

semilagrangian.jl's People

Contributors

github-actions[bot] avatar henry2004y avatar pnavaro avatar ymocquar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

semilagrangian.jl's Issues

Exemples dans la documentation

Bonjour Yves @ymocquar

Je suis en train de travailler dur la documentation, malheureusement je n'arrive pas à faire fonctionner les exemples...
J'ai le code suivant pour essayer de faire un amortissement Landau en 1d1v.
J'obtiens n'importe quoi sur l'énergie. Je ne comprends pas non plus à quoi sert le tableau tabst . Je n'ai pas trouvé la documentation sur cet argument.

J'espère que tu vas bien et que tu pourras m'aider...

Pierre

function run_simulation(nbdt, sz, dt, interp, tab_coef)
    
    epsilon = 0.001

    xmin, xmax, nx = 0., 4π, sz[1]
    vmin, vmax, nv = -6., 6., sz[2]

    mesh_x = UniformMesh(xmin, xmax, nx)
    mesh_v = UniformMesh(vmin, vmax, nv)

    tabst = [([1, 2], 1, 1, true), ([2, 1], 1, 2, true)]

    adv = Advection((mesh_x, mesh_v), [interp, interp], dt, tabst; 
        tab_coef = tab_coef, timeopt = NoTimeOpt)
    
    kx = 0.5 
    fct_x(x) = epsilon * cos(kx * x) + 1
    fct_v(v) = exp(-v^2 / 2) / sqrt(2π)

    lgn_x = fct_x.(mesh_x.points)
    lgn_v = fct_v.(mesh_v.points)

    data = dotprod((lgn_x, lgn_v))

    pvar = getpoissonvar(adv)

    advd = AdvectionData(adv, data, pvar)

    println("# dt=$(dt) eps=$(epsilon) size_x=$nx size_v=$nv")
    println("# x : from $(start(mesh_x)) to $(stop(mesh_x))")
    println("# v : from $(start(mesh_v)) to $(stop(mesh_v))")
    println("# interpolation : $interp order=$(get_order(interp))")
    println("# tab_coef : $tab_coef")
    println("# timeopt=$timeopt")
    println("# size(data)=$(size(data))")

    el = Float64[]
    @showprogress 1 for i = 1:nbdt
        while advection!(advd) end 
        push!(el, compute_ee(advd))
    end
    return el
end

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!

BuildPkg hanging on MacOS latest with removing JuliaFormatter

I have recently pushed two commits, one of them for removing JuliaFormatter as an explicit dependency af46f29 because that crashed my local test run on Ubuntu and the format library does not seem to be necessary for this library. However, for some unknown reason the CI hangs at building pkgs.

Right now I am not sure if this is an real issue. Besides, I also suggest remove test on Julia nightly version due to the stability of current language status. Even though I am granted the direct push permission to master, I am not sure if I should do that in the future because I am not familiar with the code design and may commit codes with unexpected changes.

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.