EDSL for PDE solver composing


Latest Release License Downloads Format Build


OpFlow (运筹) is an embedded domain specific language (EDSL) for partial differential equation (PDE) solver composing. It adopts the meta programming facilities provided by modern C++ extensively to provide an expressive front-end user interface. With expression templates and stencil auto-generation, OpFlow is able to perform both explicit expression evaluation and implicit linear system solving. With isolated expression, operator & evaluation engine's implementation, OpFlow makes the algorithm, data structure and execution scheduler fully decoupled. OpFlow's advantages are:

  • Fully static. No dynamic dispatching on the critical path
  • Zero-cost abstraction. All operations are well-defined at compile time and force inlined
  • Automatic parallelization. Partition & evaluation of expressions are automatically parallelized by user defined strategies
  • Implicit equation solving. OpFlow can solve arbitrary user provided implicit equations as long as they are well-defined
  • Header only & C++ embedded. OpFlow itself is header-only and embedded in C++. It's straight forward to integrate OpFlow into existing numerical codes
  • Mathematical API notations. The front-end interface of OpFlow is very similar to mathematical notations. Little language noise will occur while writing equations
  • Proper level of abstraction. OpFlow tries to eliminate the need to write bare schemes while keeping all the transformations & operations performed at the front-end. It's straight forward to see how each term is discretized, while keeping all expressions in a unified fashion. This is different from packing all things into modules, or looping over each element on the front stage.


Quick start

  1. Install all dependencies:
  • Linux: (Ubuntu for example)
sudo apt install -y gcc-10 g++-10 libopenmpi-dev libhdf5-mpi-dev libhdf5-dev python3-pip python3-sphinx lcov
python3 -m pip install sphinx-rtd-dark-theme
  • macOS: (using Homebrew)
brew install [email protected] open-mpi hdf5-mpi sphinx lcov
python3 -m pip install sphinx-rtd-dark-theme
  1. Configure
mkdir build && cd build
  1. Build & Run
cmake --build . -t CONV1D && ./examples/CONV1D/CONV1D


Please refer to the documentation for installation instructions.

You might also like...
C implementation of a sudoku solver with backtracking algorithm
C implementation of a sudoku solver with backtracking algorithm

SUDOKU SOLVER Sudoku solver using backtracking algorithm Sudoku game To solve a sudoku, you need a sudoku. So i made a basic implmentation of one with

Wavelike and Particlelike Phonon Transport (WPPT) Solver

'WPPT': A solver for Wave- and Particle-like Phonon Transport (WPPT) Authors: Zhongwei Zhang [email protected] / [email protected], Inst

 The ROS version of ICP Mapping with QPEP Solver (Quadratic Pose Estimation Problems)
The ROS version of ICP Mapping with QPEP Solver (Quadratic Pose Estimation Problems)

The ROS version of ICP Mapping with QPEP Solver (Quadratic Pose Estimation Problems) The project is based on https://github.com/ethz-asl/ethzasl_icp_m

Muriqui Optimizer - A convex mixed integer nonlinear programming solver

Muriqui Optimizer Muriqui Optimizer is a solver for convex Mixed Integer Nonlinear Programming (MINLP) problems. For more informations and user manual

Contains a sudoku solver - OCR. Project done with classmates during third semester at EPITA.

sudokUwU sudokUwU is a sudoku solver made by 4 students at EPITA. This project is a mandatory work from S3 cycle! The Team Johan Tran Adrian Grillet V

Tic-Tac-Toe, Scientific calculator, Sudoku solver written in C.

Simple command line projects in C: Tic-Tac-Toe - A computer Tic-Tac-Toe player. No algorithms used, simply written using too many if statements. Sudok

DG-Mesh-Optimization - Discontinuous Galerkin (DG) solver coupled with a Quasi-Newton line-search algorithm to optimize the DG mesh.
DG-Mesh-Optimization - Discontinuous Galerkin (DG) solver coupled with a Quasi-Newton line-search algorithm to optimize the DG mesh.

Date written: December 2020 This project was pursued as my final project for MECH 579 (Multidisciplinary Design Optimization) at McGill University, ta

Openmind - Deduction framework with arbitrary mathematical system solver.

openmind Compilation: Debian/Ubuntu: sudo apt install cmake g++ git libboost-all-dev libxss-dev libx11-dev libxcb-screensaver0-dev ocl-icd-opencl-dev

Maya Soft IK Solver

Maya Soft IK Solver Our maya IK solver is an advanced solution for 2 bones setup. It fixes the annoying “pop” problem at full extension in the normal

Offline fluid simulation solver adopted from https://github.com/doyubkim/fluid-engine-dev.
Offline fluid simulation solver adopted from https://github.com/doyubkim/fluid-engine-dev.

FluidEngine This is a fluid simulation engine for computer graphics applications. I adopt it from Doyub Kim's fluid-engine-dev. It's built on C++11 an

A CLI based solver for the popular word guessing game WORDLE
A CLI based solver for the popular word guessing game WORDLE

Project WAR WAR stands for Wordle Answer and Resolver About Wordle is a web-based word game developed by Welsh-born software engineer Josh Wardle, for

Proletariat Graph-Learning Constraint Solver

Introduction Vertexy is a conflict-driven learning constraint solver that is focused on solving problems within graphs. Its primary development goal i

An active set-based NLP solver

SLEQP Introduction SLEQP is a software package for large-scale nonlinear optimization. It is designed to find (local) solutions of mathematical optimi

  • v0.3.7(Dec 30, 2022)

    What's Changed

    • Allow const & functor bc to return internal representation by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/71
    • Replace std::min/max with guided type deduce version by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/72
    • Update to a nicer doxygen style by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/73
    • Add more block based parallel domain split strategies by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/74
    • Update libfmt and spdlog to latest version by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/75

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.6...v0.3.7

    Source code(tar.gz)
    Source code(zip)
  • v0.3.6(Nov 13, 2022)

    What's Changed

    • Fix getting global bc values in MPI parallel case by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/70

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.5...v0.3.6

    Source code(tar.gz)
    Source code(zip)
  • v0.3.5(Oct 29, 2022)

    What's Changed

    • Fix building with TecIOMPI for installed version by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/67
    • Support numbering output files by step or time by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/68
    • Fix solve of equation set with MPI by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/69

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.4...v0.3.5

    Source code(tar.gz)
    Source code(zip)
  • v0.3.4(Sep 18, 2022)

    What's Changed

    • Fix split map to work with MT-only environment by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/65
    • Add new TecIO SZL API support by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/66

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.3...v0.3.4

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Jul 23, 2022)

    What's Changed

    • Introduce size control of fake_map by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/62
    • Add more controls to io streams by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/63
    • Typo fix by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/64

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.2...v0.3.3

    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Jul 10, 2022)

    What's Changed

    • Add benchmark for AMGCL & HYPRE solver by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/60
    • Fix CSR matrix generation performance issue by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/61

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.1...v0.3.2

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Jul 3, 2022)

    What's Changed

    • Extend Cartesian field's data type support for serializable objects by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/59

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.3.0...v0.3.1

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jun 28, 2022)

    What's Changed

    • Support scalar as argument for conditional expression by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/57
    • Make MPI work again by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/58

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.10...v0.3.0

    Source code(tar.gz)
    Source code(zip)
  • v0.2.10(Jun 19, 2022)

    What's Changed

    • Fix multiple dump range calculation by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/53
    • Fix TecplotBinaryStream::dumpMultiple by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/54
    • Add state report for equation solvers by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/55
    • Change default pin location of CSR matrix generator by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/56

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.9...v0.2.10

    Source code(tar.gz)
    Source code(zip)
  • v0.2.9(Jun 3, 2022)

    What's Changed

    • Fix operator= missing error by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/50
    • [CI] Use relative path in readme by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/51
    • Add all-in-one option for IOGroup by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/52

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.8...v0.2.9

    Source code(tar.gz)
    Source code(zip)
  • v0.2.8(May 15, 2022)

    What's Changed

    • Add dynamic interface for IOGroup by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/48
    • Add version printer by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/49

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.7...v0.2.8

    Source code(tar.gz)
    Source code(zip)
  • v0.2.7(Apr 17, 2022)

    What's Changed

    • Make forward computation fully const for input expressions by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/45
    • Unified upwind & downwind centered FDM operator by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/46
    • Normalized variable based flux limiters by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/47

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.6...v0.2.7

    Source code(tar.gz)
    Source code(zip)
  • v0.2.6(Apr 9, 2022)

    What's Changed

    • Add flux limiter based interpolator by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/44

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.5...v0.2.6

    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Apr 3, 2022)

    What's Changed

    • Fix doc build & update some docs by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/42
    • Fix build & test with MPI by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/43

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.4...v0.2.5

    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(Mar 25, 2022)

    What's Changed

    • Debug for periodic solving by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/39
    • Fix build for M1 Mac by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/40
    • Fix AMGCLEqnSolveHandler by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/41

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.3...v0.2.4

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Mar 18, 2022)

    What's Changed

    • Fix buffer overflow of PlainTensor by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/34
    • Add TecplotBinaryStream by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/35
    • Fix missing TECIO header by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/36
    • Fix mem leak in PlainTensor::operator=(PlainTensor&&) by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/37
    • Update ReadME for sponsored JetBrains license by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/38

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.2...v0.2.3

    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Mar 11, 2022)

    What's Changed

    • Make compile with Clang by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/32
    • Add vscode configs by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/33

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.1...v0.2.2

    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Mar 5, 2022)

    What's Changed

    • Code cleanup by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/30
    • Improve compatability with MSVC & Clang by @Luohaothu in https://github.com/OpFlow-dev/OpFlow/pull/31
    • Add more CI configurations

    Full Changelog: https://github.com/OpFlow-dev/OpFlow/compare/v0.2.0...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Feb 28, 2022)

    This release contains new features, refactors and bugfix.

    New features

    Core functions

    • Support equation set solving (#19)
    • Introduce the AMGCL based linear solver backend (#6, #15, #16)
    • Introduce pipeline based matrix generation processes (#29)
    • Use Intel TBB as the default implementation of rangeFor and rangeReduce (#18, #25)


    • Add QUICK interpolation (#12)
    • Add BinOpAdaptor (#10)


    • Add IOGroup for grouped IO (#26)
    • Add static_for for compile time iteration (#28)


    • Copy all dependencies' code to the repository (#5)
    • Add NO_DEFAULT_PATH to find_dependency for bundled packages (#23)
    • Update macOS test platform to macOS 11 (#20)
    • Refactor build scripts (#13)
    • Enable tests with MPI environment (#27)


    • Replace precise BC with padding (#11)
    • Refactor the interpolation APIs (#17)
    • Refactor the convolution operator to take kernel as runtime parameter (#4)


    • Fix EvenSplitStrategy (#7)
    • Fix HDF5 transpose bug (#8)

    Known issues

    • Some MPI examples currently not working
    • AMR related examples not tested
    • Docs have not been updated
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Sep 9, 2021)

  • v0.1.0(Aug 29, 2021)

    This is the first release of OpFlow. OpFlow is an EDSL for PDE solver composing. Core features include:

    • Explicit expression evaluation & Implicit PDE solving
    • Automatic parallelization with default or user specified configurations
    • Mathematical notations & syntax for natural developing experience

    Checkout the documents & examples for more details.

    Source code(tar.gz)
    Source code(zip)
Lee Thomason 299 Dec 10, 2022
Freecell Solver - a C library for automatically solving Freecell and some other variants of card Solitaire

The Freecell Solver Repository Root README Freecell Solver is an open source (distributed under the MIT/Expat licence) library, written in C, for atte

Shlomi Fish 55 Dec 23, 2022
Freecell Solver - a C library for automatically solving Freecell and some other variants of card Solitaire

The Freecell Solver Repository Root README Freecell Solver is an open source (distributed under the MIT/Expat licence) library, written in C, for atte

Shlomi Fish 55 Dec 23, 2022
This is the source code of SATCH a SAT solver written from scratch in C.

The main purpose of this solver is to provide a simple and clean code base for explaining and experimenting with SAT solvers. It is simpler than the source code of CaDiCaL and of Kissat in particular, while still featuring most important implementation techniques needed to obtain a state-of-the-art SAT solver

Armin Biere 73 Dec 16, 2022
SANM: A Symbolic Asymptotic Numerical Solver

SANM: A Symbolic Asymptotic Numerical Solver This repository is the official implementation of the SANM solver described in our paper to appear at SIG

Kai Jia 28 Sep 22, 2022
Pseudofermion functional renormalization group solver for (frustrated) quantum magnets in two and three spatial dimensions.

SpinParser SpinParser ("Spin Pseudofermion Algorithms for Research on Spin Ensembles via Renormalization") is a software platform to perform pseudofer

Finn Lasse Buessen 19 Sep 5, 2022
A Sudoku solver made in C++ using SDL for graphics.

sudoku_solver A Sudoku solver made in C++ using SDL for graphics. What is a Sudoku puzzle? Sudoku puzzles have been around for a very long time, origi

null 1 Nov 12, 2021
qpSWIFT is a light-weight sparse quadratic programming solver

qpSWIFT Light-weight sparse Quadratic Programming Solver Introduction qpSWIFT is light-weight sparse Quadratic Programming solver targetted for embedd

qpSWIFT 72 Dec 17, 2022
A crossword solver

Word Search Word search is a program that takes a corpus and searches for those words in a grid of letters using a trie and DFS. Quick start Word sear

Yuhan Liu 1 Nov 3, 2021
🚀 A open sourced, extremely efficient Texas Hold'em and short deck solver

?? A open sourced, extremely efficient Texas Hold'em and short deck solver

icybee 869 Dec 30, 2022