Skip to content
Snippets Groups Projects
Select Git revision
  • 81a33828d805ddd340304108814c458e9a7277c7
  • develop default protected
  • feature/variational-hydro
  • origin/stage/bouguettaia
  • feature/gmsh-reader
  • feature/reconstruction
  • save_clemence
  • feature/kinetic-schemes
  • feature/local-dt-fsi
  • feature/composite-scheme-sources
  • feature/composite-scheme-other-fluxes
  • feature/serraille
  • feature/composite-scheme
  • hyperplastic
  • feature/polynomials
  • feature/gks
  • feature/implicit-solver-o2
  • feature/coupling_module
  • feature/implicit-solver
  • feature/merge-local-dt-fsi
  • master protected
  • v0.5.0 protected
  • v0.4.1 protected
  • v0.4.0 protected
  • v0.3.0 protected
  • v0.2.0 protected
  • v0.1.0 protected
  • Kidder
  • v0.0.4 protected
  • v0.0.3 protected
  • v0.0.2 protected
  • v0 protected
  • v0.0.1 protected
33 results

pugs

  • Clone with SSH
  • Clone with HTTPS
  • Stephane Del Pino's avatar
    Stéphane Del Pino authored
    The idea is to define functions this way
    ``
    let f : X -> Y, x -> y;
    ``
    where y is an expression of x and previously defined variables.
    - x is local to the function!
    - y cannot change *any* of its parameters (neither x or previously defined data)
    
    These will not be C/C++-like functions (which will be referred as routines)
    
    In this commit X and Y are basic types such as N, Z, R, B and string are
    allowed. The aim is to allow constructions like this, for instance:
    ``
    // definition
    let norm : R*R -> R, (x,y) -> sqrt(x*x + y*y);
    
    // usage
    R n = norm(2,3.2);
    ``
    
    Standard functions such as sin, cos, sqrt, abs, ... should be predefined
    functions of that kind.
    
    This commit only defines the simplest grammar. Definition is checked but use is
    still invalid (since function definition is not stored correctly according with
    regard to the function variable)
    81a33828
    History
    Name Last commit Last update