Skip to content

Commit 9e76da3

Browse files
Storage and integration performance improvements (#29)
Significant improvements in storage memory layout, interpolation, and integration performance
1 parent e4a5400 commit 9e76da3

File tree

141 files changed

+7466
-4538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+7466
-4538
lines changed

.github/workflows/build-ci.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ jobs:
66
build_and_test:
77
name: "Run build and tests"
88
runs-on: ubuntu-latest
9+
env:
10+
CC: gcc-13
11+
CXX: g++-13
912
steps:
1013

1114
- name: Install dependencies
1215
run: |
13-
sudo apt-get -y update
16+
sudo apt-get -y update
1417
sudo apt-get install -y pkg-config cmake
18+
sudo apt-get install -y libtbb-dev
1519
sudo apt-get install -y libhdf5-mpi-dev libharminv-dev libfftw3-dev libgsl-dev libgslcblas0
1620
sudo apt-get install -y python3-setuptools cython3 python3-matplotlib python3-mpi4py
1721
sudo apt-get install -y python3-meep-mpi-default libmeep-mpi-default-dev
@@ -23,16 +27,10 @@ jobs:
2327
run: |
2428
mkdir -p build &&
2529
pushd build &&
26-
cmake -DBUILD_PYTHON=ON -DBUILD_WFC=ON -DBUILD_TESTS=ON ../ &&
30+
cmake -DBUILD_MEEP=ON -DBUILD_TESTS=ON ../ &&
2731
VERBOSE=1 make &&
2832
popd
2933
3034
- name: Run C++ tests
3135
run: |
32-
bash tests/run_tests.sh build/
33-
34-
- name: Run python tests
35-
run: |
36-
source build/setup.sh &&
37-
python3 -m unittest discover -s cpython/tests/
38-
36+
bash tests/run_tests.sh build/

CMakeLists.txt

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
cmake_minimum_required( VERSION 3.20 FATAL_ERROR )
22

3+
set(CMAKE_CXX_STANDARD 20)
4+
set(CMAKE_CXX_STANDARD_REQUIRED YES)
5+
6+
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wpedantic -Wextra -ftree-vectorize -ffast-math -ftree-vectorizer-verbose=2 -funroll-loops -march=native -save-temps -fverbose-asm -g")
7+
38
project(eisvogel)
49

5-
option(BUILD_PYTHON "Build with python support." OFF)
6-
option(BUILD_WFC "Also build weighting field creator." OFF)
710
option(BUILD_TESTS "Build tests." OFF)
11+
option(BUILD_MEEP "Also build weighting field creator." OFF)
12+
option(BUILD_EXTERN "Build external tools." OFF)
813

9-
add_subdirectory(cmake)
10-
add_subdirectory(src)
14+
add_subdirectory(eisvogel)
1115
add_subdirectory(examples)
12-
add_subdirectory(extern)
1316

14-
if(BUILD_PYTHON)
15-
add_subdirectory(cpython)
16-
endif(BUILD_PYTHON)
17+
if(BUILD_EXTERN)
18+
add_subdirectory(extern)
19+
endif(BUILD_EXTERN)
1720

1821
if(BUILD_TESTS)
1922
add_subdirectory(tests)

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,10 @@ make -j5
2424
source setup.sh
2525
```
2626

27-
To build with `python` support, do
27+
To also build the components for the calculation of the Green's function do
2828

2929
```
30-
cmake -DBUILD_PYTHON=ON ..
31-
```
32-
33-
and to also build the components for the calculation of the Green's function do
34-
35-
```
36-
cmake -DBUILD_WFC=ON ..
30+
cmake -DBUILD_MEEP=ON ..
3731
```
3832

3933
If you want to build the C++ unit tests, add

cmake/CMakeLists.txt

-4
This file was deleted.

cmake/setup.sh.in

-4
This file was deleted.

cpython/.gitignore

-1
This file was deleted.

cpython/CMakeLists.txt

-17
This file was deleted.

cpython/__init__.py

Whitespace-only changes.

cpython/ccoordutils.pxd

-21
This file was deleted.

cpython/ccurrent.pxd

-13
This file was deleted.

cpython/csignalcalculator.pxd

-9
This file was deleted.

cpython/cweightingfield.pxd

-11
This file was deleted.

cpython/cweightingfieldutils.pxd

-7
This file was deleted.

cpython/eisvogel.pyx

-146
This file was deleted.

cpython/libeisvogel.pxd

-2
This file was deleted.

cpython/setup.py

-29
This file was deleted.

eisvogel/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
add_subdirectory(core)
2+
3+
if(BUILD_MEEP)
4+
add_subdirectory(meep)
5+
endif(BUILD_MEEP)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
#include <filesystem>
4+
#include "Vector.hh"
5+
6+
namespace GreensFunctionCalculator::Analytic {
7+
8+
void ElectricDipole(std::filesystem::path gf_path, const RZCoordVector& start_coords, const RZCoordVector& end_coords, scalar_t t_end, scalar_t ior,
9+
scalar_t filter_t_peak, unsigned int filter_order, scalar_t r_min,
10+
scalar_t os_factor = 10, std::size_t max_pts_in_chunk = 400);
11+
12+
}
13+
14+
#include "AnalyticGreensFunctionCalculator.hxx"

0 commit comments

Comments
 (0)