Skip to content

Commit aad3482

Browse files
authored
v3.4 (#203)
1 parent 7717e0e commit aad3482

File tree

448 files changed

+28791
-14979
lines changed

Some content is hidden

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

448 files changed

+28791
-14979
lines changed

.github/ISSUE_TEMPLATE/application_execution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
***The application officially distributed requires AVX support. Please make sure your CPU supports AVX.***
10+
***The application officially distributed requires AVX2 support. Please make sure your CPU supports AVX2.***
1111

1212
***If possible, please try to compile the application locally first to see if it executes.***
1313

.github/workflows/dev-all.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
fi
7575
go build Checker/updater.go
7676
mkdir build && cd build
77-
cmake -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DTEST_COVERAGE=${{ env.COVERAGE }} -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=$MT -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=${{ env.IOMP }} -DCMAKE_INSTALL_PREFIX=dist ..
77+
cmake -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DTEST_COVERAGE=${{ env.COVERAGE }} -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=$MT -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=${{ env.IOMP }} -DCMAKE_INSTALL_PREFIX=dist ..
7878
make install -j"$(nproc)" && make package
7979
- name: Pack
8080
run: |
@@ -124,12 +124,14 @@ jobs:
124124
for SRC in `find . | egrep '\.o'`; do gcov -n $SRC > /dev/null; done
125125
- name: Report
126126
if: env.COVERAGE == 'ON'
127-
uses: codecov/codecov-action@v3
127+
uses: codecov/codecov-action@v4
128128
with:
129-
gcov: true
129+
plugin: gcov
130+
env:
131+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
130132
macos-dev:
131133
if: ${{ !contains(github.event.head_commit.message, '[skip]') }}
132-
runs-on: macos-11
134+
runs-on: macos-13
133135
timeout-minutes: 100
134136
strategy:
135137
matrix:
@@ -142,10 +144,6 @@ jobs:
142144
steps:
143145
- name: Clone
144146
uses: actions/checkout@v4
145-
- name: Golang
146-
uses: actions/setup-go@v5
147-
with:
148-
cache: false
149147
- name: VTK
150148
if: matrix.vtk == 'ON'
151149
run: |
@@ -154,17 +152,18 @@ jobs:
154152
brew install glfw glew
155153
- name: Compile
156154
run: |
155+
brew install go libomp
157156
go build Checker/updater.go
158157
mkdir build && cd build
158+
export CXXFLAGS="-Wl,-ld_classic"
159+
export FC=gfortran-11
159160
if [ "${{ matrix.compiler }}" == "clang" ]; then
160161
export CC=$(brew --prefix llvm@15)/bin/clang
161162
export CXX=$(brew --prefix llvm@15)/bin/clang++
162-
export FC=gfortran-11
163163
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
164164
else
165165
export CC=gcc-11
166166
export CXX=g++-11
167-
export FC=gfortran-11
168167
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
169168
fi
170169
make install -j4
@@ -219,7 +218,7 @@ jobs:
219218
run: |
220219
go build Checker/updater.go
221220
mkdir build && cd build
222-
cmake -G "${{ matrix.compiler }}" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_AVX=${{ matrix.avx }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
221+
cmake -G "${{ matrix.compiler }}" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_AVX2=${{ matrix.avx }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
223222
cmake --build . --target install --config ${{ matrix.build }} -j 4
224223
- name: Pack
225224
shell: bash

.github/workflows/master-all.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
go build Checker/updater.go
4343
mkdir build && cd build
44-
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=OFF -DCMAKE_INSTALL_PREFIX=dist ..
44+
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=OFF -DCMAKE_INSTALL_PREFIX=dist ..
4545
make install -j"$(nproc)" && make package
4646
- name: Pack
4747
run: |
@@ -76,18 +76,14 @@ jobs:
7676
prerelease: true
7777
overwrite: true
7878
macos-master:
79-
runs-on: macos-11
79+
runs-on: macos-13
8080
timeout-minutes: 100
8181
strategy:
8282
matrix:
8383
vtk: [ ON, OFF ]
8484
steps:
8585
- name: Clone
8686
uses: actions/checkout@v4
87-
- name: Golang
88-
uses: actions/setup-go@v5
89-
with:
90-
cache: false
9187
- name: Prepare
9288
run: |
9389
echo "SP_TIME=daily-$(date +''%y%m%d'')" >> $GITHUB_ENV
@@ -99,11 +95,13 @@ jobs:
9995
brew install glfw glew
10096
- name: Compile
10197
run: |
98+
brew install go libomp
10299
go build Checker/updater.go
103100
mkdir build && cd build
104101
export CC=$(brew --prefix llvm@15)/bin/clang
105102
export CXX=$(brew --prefix llvm@15)/bin/clang++
106103
export FC=gfortran-11
104+
export CXXFLAGS="-Wl,-ld_classic"
107105
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=Release -DUSE_VTK=${{ matrix.vtk }} -DBUILD_MULTITHREAD=ON -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
108106
make install -j4
109107
- name: Pack
@@ -156,7 +154,7 @@ jobs:
156154
run: |
157155
go build Checker/updater.go
158156
mkdir build && cd build
159-
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
157+
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
160158
cmake --build . --target install --config Release -j 4
161159
- name: Pack
162160
shell: bash

.github/workflows/stale.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Stale
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
jobs:
6+
stale:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/stale@v9
10+
with:
11+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
12+
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
13+
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
14+
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
15+
days-before-issue-stale: 30
16+
days-before-pr-stale: 60
17+
days-before-issue-close: 5
18+
days-before-pr-close: 10

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44

55
1. The `MKL` includes outdated `FEAST`, the external names in `FEAST` library are modified to avoid linking error.
66
2. The `SPIKE` solver may occasionally freeze, to circumvent, try to avoid mixing compilers from different vendors.
7-
3. The `MUMPS` solver throws segfaults with large matrices.
7+
3. The `MUMPS` solver throws segfaults with large matrices, appears to be quite slow.
88
4. The `FGMRES` solver requires refinements.
99

10+
## version 3.4
11+
12+
1. update `Armadillo` to version `12.8.2` [#193](https://github.com/TLCFEM/suanPan/pull/193)
13+
2. plane strain Duncan-Selig soil model [#195](https://github.com/TLCFEM/suanPan/pull/195)
14+
3. update `Catch2` to version `3.5.4`
15+
4. update `TBB` to version `2021.12.0` [#199](https://github.com/TLCFEM/suanPan/pull/199)
16+
5. update `MUMPS` to version `5.7.1` [#202](https://github.com/TLCFEM/suanPan/pull/202)
17+
1018
## version 3.3
1119

1220
1. (breaking) revise syntax for `ConcreteTsai`, `Concrete21` and `Concrete22` using a more consistent definition

CITATION.cff

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ keywords:
2828
- IGA
2929
- Solid Mechanics
3030
license: GPL-3.0
31-
version: '3.2'
32-
date-released: '2024-01-24'
31+
version: '3.4'
32+
date-released: '2024-05-11'

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
413413
set(CPACK_PACKAGE_ICON ${ROOT}/Resource/suanPan-ua.svg)
414414
set(CPACK_PACKAGE_RELEASE 1)
415415
set(CPACK_PACKAGE_VENDOR "tlcfem")
416-
set(CPACK_PACKAGE_VERSION "3.3.0")
416+
set(CPACK_PACKAGE_VERSION "3.4.0")
417417
set(CPACK_PACKAGE_DESCRIPTION "An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework")
418418
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/TLCFEM/suanPan")
419419

Checker/updater.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ func downloadLatestVersion(versionString string) error {
9393
fmt.Printf(" If performance degradation is spotted on your platform, consider switch to `openblas` version.\n")
9494
fmt.Printf(" `vtk` uses VTK for visualisation.\n")
9595
fmt.Printf(" Visualisation may be useful when it comes to post-processing, but it requires OpenGL support. Please make sure the corresponding packages are installed.\n")
96-
fmt.Printf(" `no-avx` disables AVX.\n")
97-
fmt.Printf(" For CPUs that do not support AVX, please use this version.\n")
96+
fmt.Printf(" `no-avx` disables AVX2.\n")
97+
fmt.Printf(" For CPUs that do not support AVX2, please use this version.\n")
9898
fmt.Printf("\nDownload the new version:\n")
9999

100100
var package_array []string

Domain/Factory.hpp

+24-12
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ template<sp_d T> class Factory final {
9292
SolverType solver = SolverType::LAPACK;
9393
SolverSetting<T> setting{};
9494

95+
SolverType sub_solver = SolverType::LAPACK;
96+
9597
T error = T(0); // error produced by certain solvers
9698

9799
Col<T> ninja; // the result from A*X=B
@@ -204,7 +206,10 @@ template<sp_d T> class Factory final {
204206
[[nodiscard]] bool is_nonviscous() const;
205207

206208
void set_solver_type(SolverType);
207-
[[nodiscard]] SolverType get_solver_type() const;
209+
[[nodiscard]] bool contain_solver_type(SolverType) const;
210+
211+
void set_sub_solver_type(SolverType);
212+
[[nodiscard]] bool contain_sub_solver_type(SolverType) const;
208213

209214
void set_solver_setting(const SolverSetting<double>&);
210215
[[nodiscard]] const SolverSetting<double>& get_solver_setting() const;
@@ -726,7 +731,11 @@ template<sp_d T> bool Factory<T>::is_nonviscous() const { return nonviscous; }
726731

727732
template<sp_d T> void Factory<T>::set_solver_type(const SolverType E) { solver = E; }
728733

729-
template<sp_d T> SolverType Factory<T>::get_solver_type() const { return solver; }
734+
template<sp_d T> void Factory<T>::set_sub_solver_type(const SolverType E) { sub_solver = E; }
735+
736+
template<sp_d T> bool Factory<T>::contain_solver_type(const SolverType ST) const { return ST == solver; }
737+
738+
template<sp_d T> bool Factory<T>::contain_sub_solver_type(const SolverType ST) const { return ST == sub_solver; }
730739

731740
template<sp_d T> void Factory<T>::set_solver_setting(const SolverSetting<double>& SS) { setting = SS; }
732741

@@ -1475,34 +1484,37 @@ template<sp_d T> unique_ptr<MetaMat<T>> Factory<T>::get_basic_container() {
14751484
switch(storage_type) {
14761485
case StorageScheme::FULL:
14771486
#ifdef SUANPAN_CUDA
1478-
if(SolverType::CUDA == solver) return std::make_unique<FullMatCUDA<T>>(n_size, n_size);
1487+
if(contain_solver_type(SolverType::CUDA)) return std::make_unique<FullMatCUDA<T>>(n_size, n_size);
14791488
#endif
14801489
return std::make_unique<FullMat<T>>(n_size, n_size);
14811490
case StorageScheme::BAND:
1482-
if(SolverType::SPIKE == solver) return std::make_unique<BandMatSpike<T>>(n_size, n_lobw, n_upbw);
1491+
if(contain_solver_type(SolverType::SPIKE)) return std::make_unique<BandMatSpike<T>>(n_size, n_lobw, n_upbw);
1492+
#ifdef SUANPAN_MAGMA
1493+
if(contain_solver_type(SolverType::MAGMA)) return std::make_unique<BandMatMAGMA<T>>(n_size, n_lobw, n_upbw);
1494+
#endif
14831495
return std::make_unique<BandMat<T>>(n_size, n_lobw, n_upbw);
14841496
case StorageScheme::BANDSYMM:
14851497
return std::make_unique<BandSymmMat<T>>(n_size, n_lobw);
14861498
case StorageScheme::SYMMPACK:
14871499
return std::make_unique<SymmPackMat<T>>(n_size);
14881500
case StorageScheme::SPARSE:
1489-
if(SolverType::MUMPS == solver) return std::make_unique<SparseMatMUMPS<T>>(n_size, n_size, n_elem);
1490-
if(SolverType::LIS == solver) return std::make_unique<SparseMatLis<T>>(n_size, n_size, n_elem);
1491-
if(SolverType::SUPERLU == solver) return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
1501+
if(contain_solver_type(SolverType::MUMPS)) return std::make_unique<SparseMatMUMPS<T>>(n_size, n_size, n_elem);
1502+
if(contain_solver_type(SolverType::LIS)) return std::make_unique<SparseMatLis<T>>(n_size, n_size, n_elem);
1503+
if(contain_solver_type(SolverType::SUPERLU)) return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
14921504
#ifdef SUANPAN_MKL
1493-
if(SolverType::PARDISO == solver) return std::make_unique<SparseMatPARDISO<T>>(n_size, n_size, n_elem);
1494-
if(SolverType::FGMRES == solver) return std::make_unique<SparseMatFGMRES<T>>(n_size, n_size, n_elem);
1505+
if(contain_solver_type(SolverType::PARDISO)) return std::make_unique<SparseMatPARDISO<T>>(n_size, n_size, n_elem);
1506+
if(contain_solver_type(SolverType::FGMRES)) return std::make_unique<SparseMatFGMRES<T>>(n_size, n_size, n_elem);
14951507
#endif
14961508
#ifdef SUANPAN_CUDA
1497-
if(SolverType::CUDA == solver) return std::make_unique<SparseMatCUDA<T>>(n_size, n_size, n_elem);
1509+
if(contain_solver_type(SolverType::CUDA)) return std::make_unique<SparseMatCUDA<T>>(n_size, n_size, n_elem);
14981510
#ifdef SUANPAN_MAGMA
1499-
if(SolverType::MAGMA == solver) return std::make_unique<SparseMatMAGMA<T>>(n_size, n_size, magma_setting);
1511+
if(contain_solver_type(SolverType::MAGMA)) return std::make_unique<SparseMatMAGMA<T>>(n_size, n_size, magma_setting);
15001512
#endif
15011513
#endif
15021514
return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
15031515
case StorageScheme::SPARSESYMM:
15041516
#ifdef SUANPAN_MKL
1505-
if(SolverType::FGMRES == solver) return std::make_unique<SparseSymmMatFGMRES<T>>(n_size, n_size, n_elem);
1517+
if(contain_solver_type(SolverType::FGMRES)) return std::make_unique<SparseSymmMatFGMRES<T>>(n_size, n_size, n_elem);
15061518
#endif
15071519
return std::make_unique<SparseSymmMatMUMPS<T>>(n_size, n_size, n_elem);
15081520
default:

Domain/MetaMat/BandMat.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ template<sp_d T> class BandMat : public DenseMat<T> {
3838
static T bin;
3939

4040
const uword s_band;
41-
const uword m_rows; // memory block layout
4241

4342
int solve_trs(Mat<T>&, Mat<T>&&);
4443

4544
protected:
45+
const uword m_rows; // memory block layout
46+
4647
const uword l_band;
4748
const uword u_band;
4849

0 commit comments

Comments
 (0)