Skip to content

Commit

Permalink
Merge pull request #283 from FreeFem/release-v4.13
Browse files Browse the repository at this point in the history
Release v4.13
  • Loading branch information
phtournier authored Jun 30, 2023
2 parents bf4b5ac + 01b5db4 commit cfb7acc
Show file tree
Hide file tree
Showing 231 changed files with 16,115 additions and 4,980 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ src/mpi/ffapi.cpp
src/mpi/lg.tab.cpp
src/mpi/mymain.cpp
src/mpi/sansrgraph.cpp
src/mpi/compositeFESpace.cpp
*stamp-h
*stamp-h1
*test-driver
Expand Down
14 changes: 7 additions & 7 deletions 3rdparty/ff-petsc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ endif
ifeq ($(FFCMAKE),no)
PETSC_DOWNLOAD := $(PETSC_DOWNLOAD) --download-cmake
endif
PETSC_DOWNLOAD_C := $(PETSC_DOWNLOAD_C) --download-htool
PETSC_DOWNLOAD_C := $(PETSC_DOWNLOAD_C) --download-htool --download-htool-commit=946875d79d0036afb4dc2c0c13c165a607d830df
ifeq ($(FF_generic_petsc), yes)
FLAGS_MTUNE := -mtune=generic
else
FLAGS_MTUNE := -mtune=native
endif
unexport MAKEFLAGS
COMMON_FLAGS := --with-debugging=0 COPTFLAGS='-O3 $(FLAGS_MTUNE)' CXXOPTFLAGS='-O3 $(FLAGS_MTUNE)' FOPTFLAGS='-O3 $(FLAGS_MTUNE)' --with-cxx-dialect=11 --with-ssl=0 --with-x=0 --with-fortran-bindings=0 --with-cudac=0 \
--download-slepc --download-hpddm --download-slepc-commit=d9df183c341775ffc91510ec6827e13db44a25cd
COMMON_FLAGS := --with-debugging=0 COPTFLAGS='-O3 $(FLAGS_MTUNE)' CXXOPTFLAGS='-O3 $(FLAGS_MTUNE)' FOPTFLAGS='-O3 $(FLAGS_MTUNE)' --with-ssl=0 --with-x=0 --with-fortran-bindings=0 --with-cudac=0 --with-tau-perfstubs=0 \
--download-slepc --download-hpddm

ifneq ($(wildcard ~/.petsc_pkg),)
COMMON_FLAGS += --with-packages-download-dir=~/.petsc_pkg
Expand Down Expand Up @@ -202,7 +202,7 @@ $(SRCDIR)/tag-make-real:$(SRCDIR)/tag-conf-real


$(SRCDIR)/tag-install-real :$(SRCDIR)/tag-make-real
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr install
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr install-lib
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr check
test -e $(DIR_INSTALL_REAL)/include/petsc.h
test -e $(DIR_INSTALL_REAL)/lib/petsc/conf/petscvariables
Expand Down Expand Up @@ -234,7 +234,7 @@ $(SRCDIR)/tag-make-complex:$(SRCDIR)/tag-conf-complex Make-petsc-download.mk
touch $@

$(SRCDIR)/tag-install-complex :$(SRCDIR)/tag-make-complex
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fc install
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fc install-lib
test -e $(DIR_INSTALL_COMPLEX)/include/petsc.h
touch $@
WHERE-complex:../lib/WHERE.PETSc-complex ../lib/WHERE.SLEPc-complex
Expand Down Expand Up @@ -332,8 +332,8 @@ echo:
@echo " # need sudo if '$(W_SUDO)' == 'sudo' .."

install-destdir:
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr install DESTDIR=$(DESTDIR)
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fc install DESTDIR=$(DESTDIR)
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fr install-lib DESTDIR=$(DESTDIR)
cd $(SRCDIR) && $(MAKE) PETSC_DIR=$(PETSC_DIR) PETSC_ARCH=fc install-lib DESTDIR=$(DESTDIR)

.NOTPARALLEL:
# Local Variables:
Expand Down
85 changes: 49 additions & 36 deletions 3rdparty/ff-petsc/petsc-cmake-seq.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
diff --git a/config/BuildSystem/config/packages/SuperLU.py b/config/BuildSystem/config/packages/SuperLU.py
index 217743097e..239ac7806d 100644
--- a/config/BuildSystem/config/packages/SuperLU.py
+++ b/config/BuildSystem/config/packages/SuperLU.py
@@ -52,5 +52,12 @@ class Configure(config.package.CMakePackage):
diff --color -Naur petsc-3.19.0-p1/config/BuildSystem/config/packages/SuperLU.py petsc-3.19.0/config/BuildSystem/config/packages/SuperLU.py
--- petsc-3.19.0-p1/config/BuildSystem/config/packages/SuperLU.py 2023-04-02 13:47:03
+++ petsc-3.19.0/config/BuildSystem/config/packages/SuperLU.py 2023-04-02 13:46:38
@@ -52,5 +52,11 @@
if item.find('CMAKE_C_FLAGS') >= 0 or item.find('CMAKE_CXX_FLAGS') >= 0:
args[place]=item[:-1]+' '+mangledef+'"'

Expand All @@ -12,14 +11,12 @@ index 217743097e..239ac7806d 100644
+ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER'])
+ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"')
+ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"')
+
return args

diff --git a/config/BuildSystem/config/packages/metis.py b/config/BuildSystem/config/packages/metis.py
index b2d66ab23f..08219fb317 100644
--- a/config/BuildSystem/config/packages/metis.py
+++ b/config/BuildSystem/config/packages/metis.py
@@ -41,6 +41,12 @@ class Configure(config.package.CMakePackage):
diff --color -Naur petsc-3.19.0-p1/config/BuildSystem/config/packages/metis.py petsc-3.19.0/config/BuildSystem/config/packages/metis.py
--- petsc-3.19.0-p1/config/BuildSystem/config/packages/metis.py 2023-04-02 13:47:03
+++ petsc-3.19.0/config/BuildSystem/config/packages/metis.py 2023-04-02 13:46:38
@@ -44,6 +44,12 @@
if self.framework.argDB['download-metis-use-doubleprecision']:
args.append('-DMETIS_USE_DOUBLEPRECISION=1')
args.append('-DMATH_LIB="'+self.libraries.toStringNoDupes(self.mathlib.lib)+'"')
Expand All @@ -32,26 +29,26 @@ index b2d66ab23f..08219fb317 100644
return args

def configureLibrary(self):
diff --git a/config/BuildSystem/config/packages/mmg.py b/config/BuildSystem/config/packages/mmg.py
index dc8ce9817f..4ba1aec2f6 100644
--- a/config/BuildSystem/config/packages/mmg.py
+++ b/config/BuildSystem/config/packages/mmg.py
@@ -28,4 +28,10 @@ class Configure(config.package.CMakePackage):
diff --color -Naur petsc-3.19.0-p1/config/BuildSystem/config/packages/mmg.py petsc-3.19.0/config/BuildSystem/config/packages/mmg.py
--- petsc-3.19.0-p1/config/BuildSystem/config/packages/mmg.py 2023-04-02 13:47:03
+++ petsc-3.19.0/config/BuildSystem/config/packages/mmg.py 2023-04-02 13:46:38
@@ -28,6 +28,12 @@
args.append('-DUSE_VTK=OFF')
args.append('-DUSE_POINTMAP=ON')
args.append('-DMMG_INSTALL_PRIVATE_HEADERS=ON')
args.append('-DSCOTCH_DIR:STRING="'+self.ptscotch.directory+'"')
+ mpicc = self.framework.getMakeMacro('MPICC_SHOW')
+ mpicxx = self.framework.getMakeMacro('MPICXX_SHOW')
+ if mpicc and mpicxx:
+ args = self.rmArgsStartsWith(args,['-DCMAKE_CXX_COMPILER','-DCMAKE_C_COMPILER'])
+ args.append('-DCMAKE_C_COMPILER="'+mpicc.split(None, 1)[0]+'"')
+ args.append('-DCMAKE_CXX_COMPILER="'+mpicxx.split(None, 1)[0]+'"')
return args
diff --git a/src/mat/impls/aij/mpi/mumps/mumps.c b/src/mat/impls/aij/mpi/mumps/mumps.c
index 01bbe45a39b..6b050057ccf 100644
--- a/src/mat/impls/aij/mpi/mumps/mumps.c
+++ b/src/mat/impls/aij/mpi/mumps/mumps.c
@@ -1860,11 +1860,7 @@ PetscErrorCode MatSetFromOptions_MUMPS(Mat F, Mat A) {
if self.getDefaultIndexSize() == 64:
int64_t = '''
#if !(defined(PETSC_HAVE_STDINT_H) && defined(PETSC_HAVE_INTTYPES_H) && defined(PETSC_HAVE_MPI_INT64_T))
diff --color -Naur petsc-3.19.0-p1/src/mat/impls/aij/mpi/mumps/mumps.c petsc-3.19.0/src/mat/impls/aij/mpi/mumps/mumps.c
--- petsc-3.19.0-p1/src/mat/impls/aij/mpi/mumps/mumps.c 2023-04-02 13:46:55
+++ petsc-3.19.0/src/mat/impls/aij/mpi/mumps/mumps.c 2023-04-02 13:46:45
@@ -1889,11 +1889,7 @@
see https://github.com/pmodels/mpich/issues/5589. This bug was fixed by https://github.com/pmodels/mpich/pull/5590.
In short, we could not use distributed RHS with MPICH until v4.0b1.
*/
Expand All @@ -63,34 +60,50 @@ index 01bbe45a39b..6b050057ccf 100644
PetscCall(PetscOptionsMUMPSInt("-mat_mumps_icntl_20", "ICNTL(20): give mumps centralized (0) or distributed (10) dense right-hand sides", "None", mumps->ICNTL20, &mumps->ICNTL20, &flg));
PetscCheck(!flg || mumps->ICNTL20 == 10 || mumps->ICNTL20 == 0, PETSC_COMM_SELF, PETSC_ERR_SUP, "ICNTL(20)=%d is not supported by the PETSc/MUMPS interface. Allowed values are 0, 10", (int)mumps->ICNTL20);
#if PETSC_PKG_MUMPS_VERSION_LT(5, 3, 0)
diff --git a/config/BuildSystem/config/packages/PTScotch.py b/config/BuildSystem/config/packages/PTScotch.py
index 5a46e581fd2..bc7535eb449 100644
--- a/config/BuildSystem/config/packages/PTScotch.py
+++ b/config/BuildSystem/config/packages/PTScotch.py
@@ -32,12 +32,16 @@ class Configure(config.package.Package):
diff --color -Naur petsc-3.19.0-p1/config/BuildSystem/config/packages/PTScotch.py petsc-3.19.0/config/BuildSystem/config/packages/PTScotch.py
--- petsc-3.19.0-p1/config/BuildSystem/config/packages/PTScotch.py 2023-04-02 13:47:03
+++ petsc-3.19.0/config/BuildSystem/config/packages/PTScotch.py 2023-04-02 13:46:38
@@ -9,6 +9,8 @@
self.download = ['git://https://gitlab.inria.fr/scotch/scotch.git',
'https://gitlab.inria.fr/scotch/scotch/-/archive/'+self.gitcommit+'/scotch-'+self.gitcommit+'.tar.gz',
'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/scotch-'+self.gitcommit+'.tar.gz']
+ self.download_macos = ['https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.2/scotch-v6.1.2.tar.gz',
+ 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/scotch-v6.1.2.tar.gz']
self.downloaddirnames = ['scotch','petsc-pkg-scotch']
self.liblist = [['libptesmumps.a','libptscotchparmetisv3.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a'],['libptesmumps.a','libptscotchparmetis.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a'],
['libptesmumps.a','libptscotchparmetis.a','libptscotch.a','libptscotcherr.a','libesmumps.a','libscotch.a','libscotcherr.a']]
@@ -30,13 +32,18 @@
self.odeps = [self.pthread,self.zlib,self.bison]
return

+ def configureLibrary(self):
+ if not self.bison.haveBison3plus:
+ self.download = self.download_mingw
+ self.download = self.download_macos
+ config.package.Package.configureLibrary(self)
+
def Install(self):
import os

self.programs.getExecutable('flex', getFullPath = 1)
if not hasattr(self.programs, 'flex'):
self.programs.getExecutable('flex', getFullPath = 1)
if not hasattr(self.programs, 'flex'): raise RuntimeError('PTScotch needs flex installed')
- if not self.bison.found or not self.bison.haveBison3plus: raise RuntimeError('PTScotch needs Bison version 3.0 or above, use --download-bison')
+ if not self.bison.found: raise RuntimeError('PTScotch needs Bison, use --download-bison')

self.log.write('Creating PTScotch '+os.path.join(os.path.join(self.packageDir,'src'),'Makefile.inc')+'\n')

@@ -94,7 +98,7 @@ class Configure(config.package.Package):
@@ -93,8 +100,12 @@
g.write('MKDIR = '+self.programs.mkdir+'\n')
g.write('MV = '+self.programs.mv+'\n')
g.write('RANLIB = '+self.setCompilers.RANLIB+'\n')
- if self.setCompilers.isMINGW(self.framework.getCompiler(), self.log):
+ if self.setCompilers.isMINGW(self.framework.getCompiler(), self.log) or not self.bison.haveBison3plus:
g.write('LEX = '+self.programs.flex+'\n')
g.write('YACC = '+getattr(self.bison,self.bison.executablename)+' -y\n')
else:
- g.write('FLEX = '+self.programs.flex+'\n')
- g.write('BISON = '+getattr(self.bison,self.bison.executablename)+' -y\n')
+ if not self.bison.haveBison3plus:
+ g.write('LEX = '+self.programs.flex+'\n')
+ g.write('YACC = '+getattr(self.bison,self.bison.executablename)+' -y\n')
+ else:
+ g.write('FLEX = '+self.programs.flex+'\n')
+ g.write('BISON = '+getattr(self.bison,self.bison.executablename)+' -y\n')
g.close()

self.popLanguage()
14 changes: 7 additions & 7 deletions 3rdparty/getall
Original file line number Diff line number Diff line change
Expand Up @@ -171,26 +171,26 @@ download('parmmg','https://github.com/prj-/ParMmg/archive/9cb2f7a22ef590d196d028
'https://github.com/prj-',
'parmmg.zip',
'32035de70272121137c0869e8c49e4bd');
download('PETSc','https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-3.18.2.tar.gz',
download('PETSc','https://www.mcs.anl.gov/petsc/mirror/release-snapshots/petsc-3.19.2.tar.gz',
'https://www.mcs.anl.gov/petsc/mirror/release-snapshots/',
'petsc-3.18.2.tar.gz',
'6562062a0666ccb3f07a5db3dedcb9e4');
'petsc-3.19.2.tar.gz',
'9d53f784ca2ab37bf25b7991ceefa1d9');

download('htool','https://github.com/htool-ddm/htool/archive/b6e91690f8d7c20d67dfb3b8db2e7ea674405a37.zip',
download('htool','https://github.com/htool-ddm/htool/archive/946875d79d0036afb4dc2c0c13c165a607d830df.zip',
'https://github.com/htool-ddm/',
'htool.zip',
'ca726483c442a3eca6522c1c69cee76f');
'1403db4800a2d4b69f3da7eb3f6687a2');


download('hpddm','https://codeload.github.com/hpddm/hpddm/zip/7113b9a6b77fceee3f52490cb27941a87b96542f',
'https://codeload.github.com/hpddm',
'hpddm.zip',
'6910b7b974f0b60d9c247c666e7f3862');

download('bemtool','https://github.com/PierreMarchand20/BemTool/archive/6042818bd7585a1ba01c1fc8889dc27f9e608a3f.zip',
download('bemtool','https://github.com/PierreMarchand20/BemTool/archive/435b9d8ea86228b9ec4b526fc915aa35a7a8bec6.zip',
'https://github.com/PierreMarchand20/BemTool',
'bemtool.zip',
'1ee3a9eea2451314dcbb0a3ebd6c6be3');
'3f9c95580efeb4d2b8f1fa977f7fd395');

download('Boost','https://www.ljll.math.upmc.fr/~tournier/boost_for_bemtool.tar.gz',
'https://www.boost.org',
Expand Down
Binary file modified AutoGeneratedFile.tar.gz
Binary file not shown.
69 changes: 67 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,70 @@
# Changelog
All notable changes to this project will be documented in this file.

## [4.13]

### Added

- Composite FE spaces and variational forms for coupled problems:
- can now define composite FE spaces with different meshes/mesh types as
```
fespace Uh(Th1,[P2,P2]);
fespace Ph(Th2,P1);
fespace Vh=Uh*Ph;
```
- can define coupled problems using composite FE spaces, or directly with `<` `>` syntax:
```
fespace Uh(Th1,[P2,P2]);
fespace Ph(Th2,P1);
Uh [u1,u2],[v1,v2];
Ph p,q;
solve Pb (<[u1,u2],[p]>, <[v1,v2],[q]>) = ...
```
see `examples/examples/stokes_composite.edp` and `examples/examples/stokes_periodic_composite.edp`
- this new type of composite problem can be used for FEM-BEM coupling and also benefits from automatic parallel assembly (in test) and can be easily solved using the distributed solver MUMPS, see `examples/bem/Helmholtz-2d-FEM-BEM-coupling-MUMPS-composite.edp`
- composite problems can also be solved using PETSc (in test), see `examples/hpddm/Helmholtz-2d-FEM-BEM-coupling-PETSc-composite.edp`
- remove spurious cout in Curve/Line DG definition.
- add New Finite element 2d on mesh : RT0dc (discontinios RT0 ) in plugin Element_Mixte
see example plugin/RT0dc.edp
and P1nc (Crouziex-Raviat) + bulle : name P1bnc in plugin Element_P1ncdc
and P1nc totaly discontinous + bulle ; name P1bdcnc in plugin Element_P1ncdc
see example plugin/example testp1dcnc.edp
for akram.beni-hamad@inria.fr
- add New finite element: P4S P^4 on meshS , P3pnc3d in Element_P3pnc_3d (Couziex-Raviart with P3 )
see loic.balaziatchynillama@cea.fr for more information.
- add new interface for metis (see examples/plugin/metis.edp)
- Correct jump, mean, otherside of finite element function on mesh3, meshS, meshL
(add missing code in method: MeshPoint::SetAdj() thanks to zuqi.tang@univ-lille.fr)
- try to build dmg install mac version
- add file script to build meshS from boundary meshL TL if the boundary is
the graph of function from mean plane. see example in examples/3dSurf/buildmeshS.edp
meshS Ts=buildmeshSminsurf(TL,1);// minimal surface
meshS Tsl=buildmeshSLap(TL,1);// Laplace Surface ..
meshS Tsl=buildmesh(TL,1,op);// op = 0 Lap and op =1 => minsurf.
- add sparse block to sparse matrix
matrix A = va(Vh,Vh);
matrix B(A.n*5,A.n*5);
int i=2;
B.add(1.+10*i,A,i*ndof,i*ndof);
### Changed
- change isoline to do the job for meshS, see example plugin/isoline.edp
- change Curve function to be with 3 components to use the isoline data.
- change Curvature plugin to compatible with new isoline data for 3 d case.
- change some sprintf in snprint to remove warning
### Deprecated
### Removed
### Fixed
- bug in all P0face, P0edge, P0VF on mesh3,meshS, MeshL and also discontinous version (missing initialisation)
- bug in plot function and ffglut with parameter pdf="file.pdf" , because shift in plot named parameter not change in ffglut.
- genere a bug if zero size element in read MeshL from file.
- remove mistake when the border is badly defined , remove empty element in buildmeshL function.
- bug in array quadrature FE.
## [4.12]
### Added
- add new finite Element P2pnc3d of Stokes problem like Crouzeix-Raviard in 3d of P2 pylynome (see G. Allaire or loic.balaziatchynillama@cea.fr
Expand All @@ -39,7 +103,7 @@ All notable changes to this project will be documented in this file.
- New 1d finite element P3 hermite (C1) finite element in plugin `Element_P3`
meshL Th=segment(1,[x*L,0,0]); fespace Vh(Th,P3HL);
see exemple end of exemple plugin/testFE-P3
see example end of example plugin/testFE-P3
- missing new 1d finite element P4 in plugin `Elemnt_P4`
- plugin `plugin/seq/MatrixMarket.cpp` to read and save matrix in MatrixMarket and add also a binary form
(see examples/plugin/MatrixMarket.edp test)
Expand Down Expand Up @@ -71,7 +135,7 @@ All notable changes to this project will be documented in this file.
- add R3 Th.be(k)[i].P to get the point (R3) of boundary vertices
- add R3 Th.be(k).measure to get the measure of the boundary elment
- add projection function to a mesh , meshL, MeshS or mesh3 with return a R3 point
- see new example dist-projection.edp example in exemples
- see new example dist-projection.edp example in examples
- add dxx, dyy, dzz, dxy, .. on P2L finite element
- add tools to compute solid angle : let R3 O; a given point, Th3 a mesh3 and ThS a meshS.
solidangle(O,Th3.be(ke)) // triangular face is the boundary face
Expand Down Expand Up @@ -541,6 +605,7 @@ All notable changes to this project will be documented in this file.
- The main distribution is now on Github

[Unreleased]: https://github.com/FreeFem/FreeFem-sources/compare/v4.12..develop
[4.13]: https://github.com/FreeFem/FreeFem-sources/compare/v4.12..v4.13
[4.12]: https://github.com/FreeFem/FreeFem-sources/compare/v4.11..v4.12
[4.11]: https://github.com/FreeFem/FreeFem-sources/compare/v4.10..v4.11
[4.10]: https://github.com/FreeFem/FreeFem-sources/compare/v4.9..v4.10
Expand Down
Loading

0 comments on commit cfb7acc

Please sign in to comment.