Rodin
Modern C++20 finite element method and shape optimization framework.
What is Rodin?
Rodin is a lightweight and modular C++20 finite element framework designed for solving partial differential equations (PDEs) and performing shape and topology optimization.


It is named after the French sculptor Auguste Rodin, considered the founder of modern sculpture.

Active development
The library is in active development and primarily maintained by Carlos Brito-Pacheco, who is actively looking for co-maintainers.
A simple example
The library provides a compositional form language that lets you express variational problems in C++ code that closely mirrors the mathematical notation. For example, the Poisson problem with homogeneous Dirichlet boundary conditions, in strong form, for a domain with boundary is
The corresponding weak form is: find such that
In the code one can implement it as such:
Mesh mesh; mesh = mesh.UniformGrid(Polytope::Type::Triangle, {16, 16}); mesh.getConnectivity().compute(1, 2); P1 vh(mesh); TrialFunction u(vh); TestFunction v(vh); Problem problem(u, v); problem = Integral(Grad(u), Grad(v)) - Integral(f, v) + DirichletBC(u, Zero()); Solver::CG(problem).solve();
Architecture
The core modules form the central stack. Models build on these interfaces to the left; third-party integrations and dependencies sit to the right. Shared services support the library across these layers.
Download and build
See the Installation guide for detailed instructions, dependency lists, and platform-specific notes.
Bash installation
git clone --recursive https://github.com/cbritopacheco/rodin cd rodin git lfs install git lfs pull # required for resources mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make -j4
Git LFS
If you only need the library and headers, configure with -DRODIN_INSTALL_RESOURCES=OFF and skip hydrating the Git LFS resources.
Where to start?
New to Rodin? Start by solving a complete problem. Follow the steps below to install the library, build a first program, solve the Poisson equation, and visualize the result.
1. Install Rodin
Set up the dependencies and build the library using the Installation guide.
2. Build your first program
Follow First Steps to learn how meshes, finite element spaces, trial and test functions, and solvers fit together.
3. Solve and visualize a problem
Work through Your First Problem to solve the Poisson equation, then use the I/O and visualization guide to export the solution for inspection in ParaView.
For examples of results produced with Rodin, visit the Gallery.
Philosophy behind Rodin
The architecture follows mosra's "batteries included, but screws not glued in" philosophy from the Magnum Engine project. For Rodin it means meshes, finite element spaces, forms, assembly, and solvers work together, while their interfaces remain accessible for extensions. A custom solver, constitutive law, or integrator can reuse the surrounding components.
The form language keeps the mathematics visible in C++. For real-valued scalar fields , , and on ,
Spaces, integrals, and boundary conditions are composed explicitly; assembly and the chosen solver realize the discrete problem. Module boundaries follow these responsibilities, allowing new models to reuse existing geometry, evaluation, and algebra.
Who can use it?
Anyone. Rodin is distributed under the Boost Software License 1.0, a permissive open-source license that allows its use, modification, and redistribution in academic, industrial, commercial, and proprietary projects. The aim is to make Rodin useful for research and general-purpose finite element applications with as few restrictions as possible.
Software that uses or links against Rodin can retain its own license, including a proprietary one. The Boost Software License is not copyleft: it does not require the source code of that software to be released or its license to be changed. When redistributing Rodin source code or modified portions of it, retain the original copyright notices and the complete license statement. This obligation applies to the redistributed Rodin code.
Acknowledgement
Acknowledgement is appreciated, but is not a licensing requirement.
If Rodin contributes to research, software, or other work, consider mentioning its use and linking to the project repository. For academic work, a software citation is also welcome. These acknowledgements make Rodin's use visible and support its continued development.
@misc{BritoPacheco2024Rodin, author = {Brito-Pacheco, Carlos}, title = {{Rodin}: A modern C++ finite element framework for shape and topology optimization}, year = {2024}, howpublished = {Computer software}, version = {0.0.1}, url = {https://github.com/cbritopacheco/rodin}, note = {Open-source finite element framework} }