Skip to content

FoamScience/LazyEvaluation-OpenFOAM-Exp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Investigating possible lazy evaluation implementations for OpenFOAM

Take a look at this blog post for a detailed discussion and possible updates on this issue.

This repository investigates the viability of switching lazy evaluation in OpenFOAM code. Switching is a good idea only if:

  • Lazy evaluation provides a significant performance improvement in meshfree context.
  • Using the API needs to stay straightforward. The API can be radically different than what OpenFOAM API looks like.

Other factors that may affect the decision to switch:

  • Planning to use multi-threading?
  • Computation on GPU

This requires G++13 or higher and we need to link against -std=c++23. And the benchmark include some copying time in lazy evaluation test cases (so they are in fact faster)

Also, OpenFOAM code needs to be fixed (very minor things) to compile with C++23

Benchmarks are performed using foamUT with Catch2 as a back-end. On Github's machines, the speedup is almost x3 for the few operations I test with.

About

Performance benchmarks for eager evaluation vs lazy evaluation (template expressions, and views/ranges)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published