Skip to content
Snippets Groups Projects

FD coefficients

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Andreas Klöckner
    Edited
    coeffs.txt 897 B
    Second order:
    
                           deps h - 2 eps        2 eps      deps h + 2 eps
          coeffs = [[a = - --------------, b = - -----, c = --------------]]
                                   2               2                2
                                2 h               h              2 h
    
    Fourth order:
                                
                   deps h - eps        2 deps h - 4 eps        5 eps
    coeffs = [[a = ------------, b = - ----------------, c = - -----, 
                          2                     2                 2
                      12 h                   3 h               2 h
                                             2 deps h + 4 eps        deps h + eps
                                         d = ----------------, e = - ------------]]
                                                      2                     2
                                                   3 h                  12 h
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment