{"id":19770137,"url":"https://github.com/cbritopacheco/rodin","last_synced_at":"2025-04-30T17:32:07.171Z","repository":{"id":39584615,"uuid":"422234328","full_name":"cbritopacheco/rodin","owner":"cbritopacheco","description":"Modern C++20 finite element method and shape optimization framework.","archived":false,"fork":false,"pushed_at":"2025-04-29T15:10:57.000Z","size":166388,"stargazers_count":49,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T16:22:34.276Z","etag":null,"topics":["c-plus-plus","cpp","fem","finite-element-analysis","finite-element-methods","form-language","mesh","multiphysics","partial-differential-equations","pde","pde-solver","rodin","rodin-fem","shape-optimization","topology-optimization"],"latest_commit_sha":null,"homepage":"https://cbritopacheco.github.io/rodin/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbritopacheco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"cbritopacheco","custom":["paypal.me/carlosbritopacheco"]}},"created_at":"2021-10-28T14:22:55.000Z","updated_at":"2025-02-11T08:43:29.000Z","dependencies_parsed_at":"2024-04-29T00:22:02.694Z","dependency_job_id":"f5e7dda4-f479-4f54-86f1-258b066c0c21","html_url":"https://github.com/cbritopacheco/rodin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbritopacheco%2Frodin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbritopacheco%2Frodin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbritopacheco%2Frodin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbritopacheco%2Frodin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbritopacheco","download_url":"https://codeload.github.com/cbritopacheco/rodin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251751237,"owners_count":21637887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","cpp","fem","finite-element-analysis","finite-element-methods","form-language","mesh","multiphysics","partial-differential-equations","pde","pde-solver","rodin","rodin-fem","shape-optimization","topology-optimization"],"created_at":"2024-11-12T04:45:56.874Z","updated_at":"2025-04-30T17:32:02.145Z","avatar_url":"https://github.com/cbritopacheco.png","language":"C++","funding_links":["https://github.com/sponsors/cbritopacheco","paypal.me/carlosbritopacheco"],"categories":[],"sub_categories":[],"readme":"# Rodin [![License](https://img.shields.io/badge/license-BSL--1.0-green)](https://github.com/cbritopacheco/rodin/blob/master/LICENSE)\n\nRodin is a lightweight and modular finite element framework which provides many of the associated functionalities that are needed when implementing shape and topology optimization algorithms. These functionalities range from refining and remeshing the underlying shape, to providing elegant mechanisms to specify and solve variational problems.\n\nIt is named after the French sculptor Auguste Rodin, considered the founder of modern sculpture.\n\nThe library is still in development. It is primarily maintained by [Carlos Brito-Pacheco](https://edp-ljk.imag.fr/author/carlos-brito-pacheco/) and was developed to generate examples for his ongoing PhD.\n\nAny contributors are warmly encouraged and any help or comments are always appreciated!\n\n## Status\n\n| Branch      |  Matrix  | Tests | Code Coverage | Benchmarks | Documentation |\n|:-----------:|:--------:|:-----:|:-------------:|:----------:|:-------------:|\n| master      | [![Build](https://github.com/cbritopacheco/rodin/actions/workflows/Build.yml/badge.svg?branch=master)](https://github.com/cbritopacheco/rodin/actions/workflows/Build.yml?query=branch%3Amaster) | [![Tests](https://github.com/cbritopacheco/rodin/actions/workflows/Tests.yml/badge.svg?branch=master)](https://github.com/cbritopacheco/rodin/actions/workflows/Tests.yml?query=branch%3Amaster) | [![codecov](https://codecov.io/gh/cbritopacheco/rodin/branch/master/graph/badge.svg?token=gwEZOnQje1)](https://app.codecov.io/gh/cbritopacheco/rodin/tree/master)  | [![Benchmarks](https://github.com/cbritopacheco/rodin/actions/workflows/Benchmarks.yml/badge.svg?branch=master)](https://cbritopacheco.github.io/rodin/benchmarks/refs/heads/master/) | [![Documentation](https://github.com/cbritopacheco/rodin/actions/workflows/Documentation.yml/badge.svg?branch=master)](https://cbritopacheco.github.io/rodin/docs/refs/heads/master) |\n| develop     | [![Build](https://github.com/cbritopacheco/rodin/actions/workflows/Build.yml/badge.svg?branch=develop)](https://github.com/cbritopacheco/rodin/actions/workflows/Build.yml?query=branch%3Adevelop) | [![Tests](https://github.com/cbritopacheco/rodin/actions/workflows/Tests.yml/badge.svg?branch=develop)](https://github.com/cbritopacheco/rodin/actions/workflows/Tests.yml?query=branch%3Adevelop) | [![codecov](https://codecov.io/gh/cbritopacheco/rodin/branch/develop/graph/badge.svg?token=gwEZOnQje1)](https://app.codecov.io/gh/cbritopacheco/rodin/tree/develop) | [![Benchmarks](https://github.com/cbritopacheco/rodin/actions/workflows/Benchmarks.yml/badge.svg?branch=develop)](https://cbritopacheco.github.io/rodin/benchmarks/refs/heads/develop/) | [![Documentation](https://github.com/cbritopacheco/rodin/actions/workflows/Documentation.yml/badge.svg?branch=develop)](https://cbritopacheco.github.io/rodin/docs/refs/heads/develop) |\n\n## Table of Contents\n\n1. [Building the project](#building-the-project)\n2. [Features](#features)\n3. [Third-Party integrations](#third-party-integrations)\n5. [Requirements](#requirements)\n6. [CMake options](#cmake-options)\n7. [Building the documentation](#building-the-documentation)\n\n\n## Building the project\n\n```\ngit clone --recursive https://github.com/carlos-brito-pacheco/rodin\ncd rodin\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j4\n```\n\n## Features\n\n### Detailed documentation\n\nRodin comes with documentation that is built automatically on each merge, hence it's always up to date.\n\n[The documentation can be found here](https://cbritopacheco.github.io/rodin/).\n\n\n### Embedded form language for FEM modelling\n\nRodin comes with a native C++20 form language for assembling\nand solving variational formulations.\n\nFor example, given a domain $\\Omega$ with boundary $\\Gamma := \\partial \\Omega$, the Poisson problem:\n```math\n\\left\\{\n\\begin{aligned}\n -\\Delta u \u0026= f \u0026\u0026 \\text{in } \\Omega\\\\\n u \u0026= 0 \u0026\u0026 \\text{on } \\Gamma \\ ,\n\\end{aligned}\n\\right.\n```\nhas the associated weak formulation:\n```math\n\\text{Find} \\ u \\in H^1(\\Omega) \\quad \\text{s.t.} \\quad \\forall v \\in H^1_0(\\Omega), \\quad \\int_\\Omega \\nabla u \\cdot \\nabla v \\ dx = \\int_\\Omega f v \\ dx, \\quad \\text{with } \\quad H^1_0(\\Omega) := \\{ v \\in H^1(\\Omega) \\mid v = 0 \\text{ on } \\Gamma \\}\n```\n\nwhich can be quickly implemented via the following lines of code:\n\n```c++\n#include \u003cRodin/Solver.h\u003e\n#include \u003cRodin/Geometry.h\u003e\n#include \u003cRodin/Variational.h\u003e\n\nusing namespace Rodin;\nusing namespace Rodin::Geometry;\nusing namespace Rodin::Variational;\n\nint main(int, char**)\n{\n  Mesh Omega;\n  Omega = Omega.UniformGrid(Polytope::Type::Triangle, 16, 16);\n  mesh.getConnectivity().compute(1, 2);\n\n  P1 Vh(Omega);\n\n  TrialFunction u(Vh);\n  TestFunction v(Vh);\n\n  Solver::SparseLU solver;\n\n  Problem poisson(u, v);\n  poisson = Integral(Grad(u), Grad(v))\n          - Integral(v)\n          + DirichletBC(u, Zero());\n  poisson.solve(solver);\n\n  return 0;\n}\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"doc/README/Poisson.png\" alt=\"Poisson.png\" style=\"width:50%;\"\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      Solution of the Poisson equation.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Full high level mesh access and functionalities\n\n#### Cell, Face, Vertex Iterators\n\nThe API offers full support for iteration over _all_ polytopes of the mesh of some given dimension:\n\n```c++\nMesh mesh;\nmesh = mesh.UniformGrid(Polytope::Type::Triangle, 16, 16); // 2D Mesh\n\nfor (auto it = mesh.getCell(); it; ++it)\n{\n // Access information about the cell\n}\n\nfor (auto it = mesh.getFace(); it; ++it)\n{\n // Access information about the face\n}\n\nfor (auto it = mesh.getVertex(); it; ++it)\n{\n // Access information about the vertex\n}\n\nfor (auto it = mesh.getPolytope(1); it; ++it)\n{\n // Access information about the face (face dimension in 2D is equal to 1)\n}\n\n\n```\n\n#### Full connectivity computation\n\nRodin is able to compute any connectivity information on the mesh. For example, the following computes\nthe adjacency information from faces to cells:\n\n```c++\nMesh mesh;\nmesh = mesh.UniformGrid(Polytope::Type::Triangle, 16, 16); // 2D Mesh\n\nmesh.getConnectivity().compute(1, 2);\n```\n\nIn general, this means that given a face, we are able to obtain the incident (neighboring) cells.\n\nHowever, one can also compute any connectivity information on different dimensions.\nFor example, for a mesh $\\mathcal{T}_h \\subset \\mathbb{R}^d$, $d = 2$ of topological dimension $d$, we have:\n\n```c++\n// Compute connectivity between vertices and faces\n// i.e. Given a vertex, give me the incident edges\nmesh.getConnectivity().compute(0, 1);\n\n// Compute connectivity between faces and cells\n// i.e. Given a vertex, give me the incident cells\nmesh.getConnectivity().compute(0, 2); \n\n// Compute connectivity between faces\n// i.e. Given a face, give me the adjacent faces\nmesh.getConnectivity().compute(1, 1);\n\n// Compute connectivity between cells\n// i.e. Given a cell, give me the adjacent cells\nmesh.getConnectivity().compute(2, 2);\n\n// Compute connectivity between cells and faces\n// i.e. Given a cell, give me the adjacent faces\nmesh.getConnectivity().compute(2, 1);\n\n// Etc.\n```\n\n### Direct integration with Eigen solvers\n\n### Support for different finite elements\n\n### Support for different mesh and solution file formats\n\n- MFEM\n- MEDIT\n\n### Different quadrature formulae\n\nRodin supports different kinds of quadrature.\n\n- Grundmann-Moeller\n\n[See here for the full list](https://cbritopacheco.github.io/rodin/docs/refs/heads/master/group___rodin_quadrature.html).\n\n### SubMesh support\n\n## Third-Party integrations\n\n### MMG\n\n[MMG](https://github.com/MmgTools/mmg) is an open source software for bidimensional and tridimensional surface and volume remeshing.\n\n- Loading the mesh:\n  ```c++\n  MMG::Mesh Omega;\n  Omega.load(meshFile, IO::FileFormat::MEDIT);\n  ```\n\n- Optimizing the mesh:\n  ```c++\n  MMG::Optimizer().setHMax(hmax) // maximal edge size\n                  .setHMin(hmin) // minimal edge size\n                  .setGradation(hgrad) // ratio between two edges\n                  .setHausdorff(hausd) // curvature refinement\n                  .optimize(Omega);\n  ```\n\n## Roadmap\n\nList of features and modules that are in the works:\n  - Discontinuous Galerkin methods\n  - `Rodin::Plot` module\n  - H1\n  - L2\n  - HDiv\n  - HCurl\n  - P2\n  - P0\n  - PETSc\n  - METIS\n\n## Requirements\n\n- [CMake 3.16.0+](https://cmake.org/)\n- [Boost 1.74+](https://www.boost.org/)\n\nAny of these should be available for quick install from your standard package\nmanager.\n\n## CMake options\n\n| Option                 | Description                                       |\n|------------------------|---------------------------------------------------|\n| RODIN_BUILD_EXAMPLES   | Builds the examples in the `examples/` directory. |\n| RODIN_BUILD_DOC        | Builds the documentation using Doxygen            |\n| RODIN_USE_MCSS         | Builds the documentation using Doxygen and m.css  |\n| RODIN_BUILD_SRC        | Build the Rodin source code                       |\n| RODIN_BUILD_EXAMPLES   | Build the Rodin examples                          |\n| RODIN_BUILD_DOC        | Build the Rodin documentation                     |\n| RODIN_USE_MCSS         | Use m.css style documentation                     |\n| RODIN_WITH_PLOT        | Build the Rodin::Plot module                      |\n| RODIN_USE_MPI          | Build with MPI support                            |\n| RODIN_USE_OPENMP       | Build with OpenMP support                         |\n| RODIN_USE_SUITESPARSE  | Build with SuiteSparse support                    |\n| RODIN_SILENCE_WARNINGS | Silence warnings outputted by Rodin               |\n| RODIN_BUILD_PY         | Build Python bindings                             |\n\n## Building the documentation\n\nSee [this page](doc/README.md) to see how to build the documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbritopacheco%2Frodin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbritopacheco%2Frodin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbritopacheco%2Frodin/lists"}