Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #97

Merged
merged 63 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
8661d95
Prepare for multiphyiscs
cbritopacheco Jan 17, 2024
7073b15
Some work
cbritopacheco Jan 22, 2024
b7c2b25
Update README.md
cbritopacheco Jan 31, 2024
f49b3ae
Work on cathode/anode example
cbritopacheco Jan 31, 2024
c3dfe52
Merge branch 'develop' of github.com:cbritopacheco/rodin into develop
cbritopacheco Jan 31, 2024
e308cc0
Rename
cbritopacheco Jan 31, 2024
6233f08
Metaprogramming facilities
cbritopacheco Jan 31, 2024
a26a234
More template metaprogramming
cbritopacheco Feb 3, 2024
b893ab0
CI Errors
cbritopacheco Feb 3, 2024
e9efc05
Template metaprogramming
cbritopacheco Feb 3, 2024
d99a721
CI
cbritopacheco Feb 3, 2024
851ccfd
More template metaprogramming
cbritopacheco Feb 4, 2024
9bab89c
Commit from Lyon airport
cbritopacheco Feb 15, 2024
1ebb291
CathodeAnode works now
cbritopacheco Mar 4, 2024
1468aac
Small changes in the Assembly API
cbritopacheco Mar 4, 2024
8e4ed1f
Work on EMM example
cbritopacheco Mar 16, 2024
fc3ee5d
Add elasticity example
cbritopacheco Mar 22, 2024
e80305e
Work on PDE system assembly
cbritopacheco Mar 30, 2024
5eeca17
Darcy problem works but is unstable for P1
cbritopacheco Apr 10, 2024
65a7bcf
Workon on elasticity
cbritopacheco Apr 22, 2024
8f019d4
Component functionality
cbritopacheco Apr 24, 2024
20e8004
CI
cbritopacheco Apr 24, 2024
8fadb94
Time to push at 1am bc last year of PhD
cbritopacheco Apr 28, 2024
67efb76
One conference later....
cbritopacheco Jun 5, 2024
1f792ed
Update Build.yml
cbritopacheco Jun 5, 2024
b26db8d
Update Benchmarks.yml
cbritopacheco Jun 5, 2024
03be525
Update Tests.yml
cbritopacheco Jun 5, 2024
9a160d4
CI
cbritopacheco Jun 5, 2024
d221da7
CI Errors
cbritopacheco Jun 5, 2024
0060b7a
Update Build.yml
cbritopacheco Jun 5, 2024
cd580f9
Update Tests.yml
cbritopacheco Jun 5, 2024
6640e2e
Update Benchmarks.yml
cbritopacheco Jun 5, 2024
2eaf70a
Update Build.yml
cbritopacheco Jun 5, 2024
61c2de7
Update Benchmarks.yml
cbritopacheco Jun 5, 2024
dfecbb4
Update Tests.yml
cbritopacheco Jun 5, 2024
f5f9adc
CI Errors
cbritopacheco Jun 5, 2024
9e88fa0
Update Build.yml
cbritopacheco Jun 5, 2024
45ee82c
Update README.md
cbritopacheco Jun 5, 2024
cfd3035
Update Mainpage.dox
cbritopacheco Jun 5, 2024
cc46919
CI
cbritopacheco Jun 6, 2024
64b27c8
CI Errors
cbritopacheco Jun 6, 2024
b30c349
Template math types !
cbritopacheco Jun 27, 2024
1c94840
CI
cbritopacheco Jun 27, 2024
487302a
No error on flag
cbritopacheco Jun 27, 2024
9cd10e8
Template tensor type
cbritopacheco Jun 27, 2024
e8e65cf
Gear up for Complex type
cbritopacheco Jun 30, 2024
81f81c7
Tidy up traits
cbritopacheco Jun 30, 2024
1c205b2
CI Errors
cbritopacheco Jun 30, 2024
c1b1a08
CI Errors
cbritopacheco Jun 30, 2024
6bb8d11
Work towards generic Number types
cbritopacheco Jul 1, 2024
17e5112
Big-a refactor
cbritopacheco Jul 2, 2024
09001a5
Rename Scalar to Real
cbritopacheco Jul 2, 2024
c290135
Appropiate names
cbritopacheco Jul 2, 2024
e88b131
CI
cbritopacheco Jul 2, 2024
3e23cb7
CI
cbritopacheco Jul 2, 2024
f4164e1
Reenable optimizations
cbritopacheco Jul 3, 2024
aecf54e
LinearElasticity integral
cbritopacheco Jul 3, 2024
4ee0281
Elasticity bug
cbritopacheco Jul 3, 2024
a2d6665
Micro-optimization
cbritopacheco Jul 4, 2024
19a4030
Optimizations
cbritopacheco Jul 4, 2024
98e7525
Small bug in the Jacobian quadrature
cbritopacheco Jul 5, 2024
b7110ac
CI
cbritopacheco Jul 5, 2024
f5a3389
CI
cbritopacheco Jul 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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 @@ -39,7 +39,7 @@ make -j4

### 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 @@ -67,8 +67,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 @@ -80,15 +78,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 @@ -227,11 +222,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
Loading