Skip to content
Snippets Groups Projects
Forked from ogs / ogs
Source project has a limited visibility.
  • Dmitri Naumov's avatar
    23593770
    [MaL] Replace Gauss-Legendre algorithm with compile-time implementation. · 23593770
    Dmitri Naumov authored
    Any weighted sum of type sum(f(x_i)*w_i) can be computed at compile-time
    provided constexpr input. This is implemented in Integration.h file in
    WeightedSum<Method>::add(f).
    
    The integration method must provide values for x_i and w_i corresponding
    to its order. An example implementation is the Gauss-Legendre integration
    method up to fourth order.
    
    Even if constexpr is not available in every compiler some of them are able
    to perform same optimizations.
    23593770
    History
    [MaL] Replace Gauss-Legendre algorithm with compile-time implementation.
    Dmitri Naumov authored
    Any weighted sum of type sum(f(x_i)*w_i) can be computed at compile-time
    provided constexpr input. This is implemented in Integration.h file in
    WeightedSum<Method>::add(f).
    
    The integration method must provide values for x_i and w_i corresponding
    to its order. An example implementation is the Gauss-Legendre integration
    method up to fourth order.
    
    Even if constexpr is not available in every compiler some of them are able
    to perform same optimizations.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.