Skip to content

DynareJulia/Tasmanian.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tasmanian.jl

Wrapping the awesome tasmanian library.

Most of the functions for Sparsegrids are implemented, except the ones for manually constructed grids. In particular, Tasmanian.jl supports

  • global grids
  • sequence grids
  • local polynomial grids
  • wavelet grids
  • Fourier grids
  • refinements
  • differentiation
  • integration
  • acceleration via BLAS/LAPACK (via libblastrampoline) and OMP

Documentation

https://dynarejulia.github.io/Tasmanian.jl

Examples

Example 1: The Darth Vader Function

Approximating the function at increasing levels of grid refinement at 1000 randomly chosen points.

julia> using Tasmanian
julia> Tasmanian.ex2()
INFO: error on initial grid:    0.06798, with 13 points
INFO: refinement level 1 error: 0.02096, with 16 points
INFO: refinement level 2 error: 0.00896, with 36 points
INFO: refinement level 3 error: 0.00314, with 80 points
INFO: refinement level 4 error: 0.00097, with 176 points
INFO: refinement level 5 error: 0.00031, with 384 points
INFO: refinement level 6 error: 9.0e-5, with 824 points
INFO: refinement level 7 error: 2.0e-5, with 1688 points
INFO: Saved animation to /Users/74097/.julia/v0.6/Tasmanian/examples/ex2.gif
Plots.AnimatedGif("/Users/74097/.julia/v0.6/Tasmanian/examples/ex2.gif")

Example 2: Genz test function

This approximates f(x,y) = 1.0 / (abs(0.5 - x^4 - y^4) + 0.1).

Requirements

  • Julia 64bit >= v1.9
  • Recommended version: Julia 64 bit v1.10

Installation

To install julia package

Pkg.add("Tasmanian")

Build

libtasmanian.jl, Julia bindings for the C interface of the Tasmanian is auto-generated by CLANG.jl

The bindings can be regenerated with

cd Tasmanian.jl/gen
julia --project wraper.jl

Tasmanian_jll

The artifact Tasmanian_jll provides the Tasmanian library for all Julia plateforms.

The recipe to build the artifact is available in Yggdrasil.jl/T/Tasmanian

Todo

  • implement missing Sparsegrids functions
  • implement optimization
  • implement Dream
  • add plot recipes

About

Julia Wrapper to the Tasmanian library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%