Skip to content

Commit

Permalink
Merge pull request #97 from cbritopacheco/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
cbritopacheco authored Jul 6, 2024
2 parents 63aded2 + f5a3389 commit ab5ac29
Show file tree
Hide file tree
Showing 341 changed files with 1,441,485 additions and 7,404 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/Benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
concurrency:
group: Benchmarks-${{ github.ref }}
cancel-in-progress: true

permissions:
deployments: write
contents: write
Expand All @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
compiler: [gcc-8]
compiler: [gcc-10]
build_type: ['Release']
fail-fast: false
env:
Expand All @@ -29,6 +29,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Cpp (C++ / C)
uses: aminya/setup-cpp@v0.37.0
with:
compiler: ${{ matrix.compiler }}
cmake: true
- name: Install dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
Expand All @@ -40,7 +45,7 @@ jobs:
libvulkan-dev
libsuitesparse-dev
libmetis-dev
libboost-all-dev
libboost1.74-all-dev
- name: Configure CMake
run: >
cmake
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [gcc-8, clang-7]
os: [ubuntu-latest]
compiler: [gcc-10, clang-10]
build_type: ['Release', 'Debug']
multithreaded: ['ON', 'OFF']
fail-fast: false
Expand All @@ -30,6 +30,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Cpp (C++ / C)
uses: aminya/setup-cpp@v0.37.0
with:
compiler: ${{ matrix.compiler }}
cmake: true
- name: Install dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
Expand All @@ -41,7 +46,7 @@ jobs:
libvulkan-dev
libsuitesparse-dev
libmetis-dev
libboost-all-dev
libboost1.74-all-dev
- name: Configure CMake
run: >
cmake
Expand All @@ -58,7 +63,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12]
os: [macos-12, macos-13, macos-latest]
build_type: ['Release', 'Debug']
multithreaded: ['ON', 'OFF']
fail-fast: false
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
compiler: [gcc-8]
compiler: [gcc-10]
build_type: ['Debug']
multithreaded: ['ON', 'OFF']
fail-fast: false
Expand All @@ -31,6 +31,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Cpp (C++ / C)
uses: aminya/setup-cpp@v0.37.0
with:
compiler: ${{ matrix.compiler }}
cmake: true
- name: Install dependencies
run: >-
sudo apt-get update && sudo apt-get install -y
Expand All @@ -42,7 +47,7 @@ jobs:
libvulkan-dev
libsuitesparse-dev
libmetis-dev
libboost-all-dev
libboost1.74-all-dev
- name: Configure CMake
run: >
cmake
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
[submodule "third-party/termcolor"]
path = third-party/termcolor
url = https://github.com/ikalnytskyi/termcolor
[submodule "third-party/basix"]
path = third-party/basix
url = https://github.com/FEniCS/basix
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required (VERSION 3.16)

cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0076 NEW)

Expand Down Expand Up @@ -34,6 +35,7 @@ option(RODIN_LTO "Compile with link time optimization"
option(RODIN_FEATURE_SUMMARY "Print Rodin feature summary" ON)
option(RODIN_THREAD_SAFE "Enforces thread-safety." OFF)
option(RODIN_MULTITHREADED "Utilizes multithreading capabalities." OFF)
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

if (RODIN_MULTITHREADED)
set(RODIN_THREAD_SAFE ON CACHE BOOL "" FORCE)
Expand All @@ -54,7 +56,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand All @@ -72,6 +74,11 @@ set(RODIN_INSTALL_INCLUDE_PATH include)
# ---- Set compile options for all the submodules ----------------------------
rodin_add_compile_options(LANG CXX OPTIONS -fvisibility=hidden)
rodin_add_compile_options(LANG CXX C OPTIONS -fcolor-diagnostics)
rodin_add_compile_options(LANG CXX C OPTIONS -Wno-error=old-style-cast -Wno-error=double-promotion)

add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
add_compile_definitions(__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_10_8)


if (RODIN_LTO)
rodin_add_compile_options(LANG CXX C OPTIONS -flto)
Expand All @@ -96,15 +103,15 @@ if (RODIN_BUILD_SRC)
endif()

# ---- Boost ----
add_compile_definitions(PRIVATE BOOST_ASIO_HAS_STD_INVOKE_RESULT=1)
# set(Boost_USE_STATIC_LIBS OFF)
# set(Boost_USE_STATIC_RUNTIME OFF)

if (RODIN_USE_MPI)
find_package(MPI REQUIRED)
find_package(Boost 1.65 REQUIRED COMPONENTS mpi serialization)
find_package(Boost 1.74 REQUIRED COMPONENTS mpi serialization)
endif()

find_package(Boost 1.65 REQUIRED
find_package(Boost 1.74 REQUIRED
COMPONENTS
system
filesystem)
Expand All @@ -128,6 +135,9 @@ if (RODIN_BUILD_SRC)
"${PROJECT_BINARY_DIR}/third-party/eigen"
"${PROJECT_BINARY_DIR}/third-party/eigen/cmake")

# ---- Basix ------
add_subdirectory(third-party/basix/cpp EXCLUDE_FROM_ALL)

# ---- Spectra ----
message(STATUS "Configuring Spectra...")
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Rodin comes with documentation that is built automatically on each merge, hence

### Embedded form language for FEM modelling

Rodin comes with a native C++17 form language for assembling
Rodin comes with a native C++20 form language for assembling
and solving variational formulations.

For example, given a domain $\Omega$ with boundary $\Gamma := \partial \Omega$, the Poisson problem:
Expand Down Expand Up @@ -74,8 +74,6 @@ using namespace Rodin;
using namespace Rodin::Geometry;
using namespace Rodin::Variational;

const Geometry::Attribute Gamma = 1;

int main(int, char**)
{
Mesh Omega;
Expand All @@ -87,15 +85,12 @@ int main(int, char**)
TrialFunction u(Vh);
TestFunction v(Vh);

ScalarFunction f(1.0);
ScalarFunction g(0.0);

Solver::SparseLU solver;

Problem poisson(u, v);
poisson = Integral(Grad(u), Grad(v))
- Integral(f, v)
+ DirichletBC(u, g).on(Gamma);
- Integral(v)
+ DirichletBC(u, Zero());
poisson.solve(solver);

return 0;
Expand Down Expand Up @@ -234,11 +229,19 @@ Rodin supports different kinds of quadrature.
List of features and modules that are in the works:
- Discontinuous Galerkin methods
- `Rodin::Plot` module
- H1
- L2
- HDiv
- HCurl
- P2
- P0
- PETSc
- METIS
## Requirements
- [CMake 3.16.0+](https://cmake.org/)
- [Boost 1.65+](https://www.boost.org/)
- [Boost 1.74+](https://www.boost.org/)
Any of these should be available for quick install from your standard package
manager.
Expand Down
2 changes: 1 addition & 1 deletion dev/Requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
contourpy==1.1.0
Jinja2==3.1.2
jinja2>=3.1.3
MarkupSafe==2.1.3
networkx==3.1
numpy==1.24.4
Expand Down
2 changes: 1 addition & 1 deletion doc/Mainpage.dox
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
@mainpage Rodin
* *Modern C++17 finite element method and shape optimization framework.*
* *Modern C++20 finite element method and shape optimization framework.*


@section what-is-rodin What is Rodin?
Expand Down
41 changes: 39 additions & 2 deletions examples/BoundaryOptimization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
add_executable(BoundaryHeatConductivity BoundaryHeatConductivity.cpp)
target_link_libraries(BoundaryHeatConductivity
add_executable(WaveConcealing WaveConcealing.cpp)
target_link_libraries(WaveConcealing
PUBLIC
Rodin::Geometry
Rodin::Solver
Rodin::Variational
Rodin::External::MMG
)

add_executable(WaterTankSupport WaterTankSupport.cpp)
target_link_libraries(WaterTankSupport
PUBLIC
Rodin::Geometry
Rodin::Solver
Rodin::Variational
Rodin::External::MMG
)

add_executable(ClampingLocator ClampingLocator.cpp)
target_link_libraries(ClampingLocator
PUBLIC
Rodin::Geometry
Rodin::Solver
Rodin::Variational
Rodin::External::MMG
)

add_executable(CathodeAnode CathodeAnode.cpp)
target_link_libraries(CathodeAnode
PUBLIC
Rodin::Geometry
Rodin::Solver
Rodin::Variational
Rodin::External::MMG
)


add_executable(CoolingMaterial CoolingMaterial.cpp)
target_link_libraries(CoolingMaterial
PUBLIC
Rodin::Geometry
Rodin::Solver
Expand Down
Loading

0 comments on commit ab5ac29

Please sign in to comment.