diff --git a/.github/workflows/full-mpich.yml b/.github/workflows/full-mpich.yml index 40e27659d..a7d516b13 100644 --- a/.github/workflows/full-mpich.yml +++ b/.github/workflows/full-mpich.yml @@ -7,14 +7,18 @@ on: - develop - master - slegrand-actions-debug - + pull_request: branches: - develop # For development phase workflow_dispatch: - + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: linux: strategy: @@ -27,7 +31,7 @@ jobs: name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \ - ${{ github.workflow }} - + runs-on: ubuntu-${{ matrix.version }} steps: @@ -46,7 +50,7 @@ jobs: ./configure --enable-download ${{ matrix.cfg.opts }} \ --prefix="${HOME}/freefem" ./3rdparty/getall -a -o PETSc - + - name: PETSc run: | cd 3rdparty/ff-petsc @@ -84,12 +88,12 @@ jobs: cfg: - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \ - ${{ github.workflow }} - + runs-on: macos-${{ matrix.version }} - + steps: - uses: actions/checkout@v4 @@ -123,7 +127,7 @@ jobs: ./configure --enable-download ${{ matrix.cfg.opts }} \ --prefix="${HOME}/freefem" ./3rdparty/getall -a -o PETSc - + - name: PETSc run: | cd 3rdparty/ff-petsc diff --git a/.github/workflows/full-msmpi.yml b/.github/workflows/full-msmpi.yml index 6f91bb5fc..5cf2e77ee 100644 --- a/.github/workflows/full-msmpi.yml +++ b/.github/workflows/full-msmpi.yml @@ -7,7 +7,7 @@ on: - develop - master - slegrand-actions-debug - + pull_request: branches: - develop @@ -15,6 +15,10 @@ on: # For development phase workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: windows: strategy: @@ -23,7 +27,7 @@ jobs: cfg: # - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}} runs-on: windows-2022 @@ -68,7 +72,7 @@ jobs: run: | pacman -R --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-gdb \ mingw-w64-x86_64-gdb-multiarch - + - uses: actions/checkout@v4 - name: Configure diff --git a/.github/workflows/full-openmpi.yml b/.github/workflows/full-openmpi.yml index e652a6a51..4a40d3bb8 100644 --- a/.github/workflows/full-openmpi.yml +++ b/.github/workflows/full-openmpi.yml @@ -7,14 +7,18 @@ on: - develop - master - slegrand-actions-debug - + pull_request: branches: - develop # For development phase workflow_dispatch: - + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: linux: strategy: @@ -27,7 +31,7 @@ jobs: name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \ - ${{ github.workflow }} - + runs-on: ubuntu-${{ matrix.version }} steps: diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index 598f6e85c..06e54d80f 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -1,18 +1,23 @@ name: Minimal version + on: push: branches: - develop - master - slegrand-actions-debug - + pull_request: branches: - develop - + # For development phase workflow_dispatch: - + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: linux: strategy: @@ -59,7 +64,7 @@ jobs: cfg: - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} - ${{ github.workflow }} runs-on: macos-${{ matrix.version }} @@ -97,7 +102,7 @@ jobs: cfg: - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{ github.workflow }} runs-on: windows-2022 diff --git a/.github/workflows/sequential.yml b/.github/workflows/sequential.yml index bcff564d8..f50b8701d 100644 --- a/.github/workflows/sequential.yml +++ b/.github/workflows/sequential.yml @@ -6,14 +6,18 @@ on: - develop - master - slegrand-actions-debug - + pull_request: branches: - develop # For development phase workflow_dispatch: - + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: linux: strategy: @@ -62,7 +66,7 @@ jobs: cfg: - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} - ${{ github.worflow }} runs-on: macos-${{ matrix.version }} @@ -99,7 +103,7 @@ jobs: cfg: # - {opts: --enable-debug} - {opts: --enable-optim --enable-generic} - + name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}} runs-on: windows-2022 diff --git a/src/fflib/problem.cpp b/src/fflib/problem.cpp old mode 100755 new mode 100644 index b0d59491a..b95ce9470 --- a/src/fflib/problem.cpp +++ b/src/fflib/problem.cpp @@ -10017,7 +10017,7 @@ bool AssembleVarForm(Stack stack,const MMesh & Th,const FESpace1 & Uh,const FESp int ddf=K(df); // AA(ddf,ddf) =tgv; if (Aii) onBC[ddf]='1'; ;//A->SetBC(ddf, tgv);// change 21 dec 2010 FH (Hack of ILU) - if (B) (*B)[ddf]= tgv1*gg[df]; + if (B) (*B)[ddf]=tgv1*gg[df]; if (X) (*X)[ddf]=gg[df]; } } diff --git a/src/fflib/problem.hpp b/src/fflib/problem.hpp old mode 100755 new mode 100644 index 92e21521a..0833d7ae6 --- a/src/fflib/problem.hpp +++ b/src/fflib/problem.hpp @@ -27,6 +27,13 @@ */ #ifndef PROBLEM_HPP_ #define PROBLEM_HPP_ + +#include +namespace FreeFempp { +template +class TypeVarForm; +} + extern Block *currentblock; template class Matrice_Creuse; @@ -1379,11 +1386,38 @@ AnyType OpArraytoLinearForm::Op::operator()(Stack stack) const ffassert(px->N() == NbOfDF); } KN_ xx( px ? *(KN_ *) px : GetAny >((*x)(stack) )); - if(zero && NbOfDF ) - xx=R(); + KN cc; + list::const_iterator ii,ib=l->largs.begin(), + ie=l->largs.end(); + using namespace FreeFempp; + TypeVarForm *tvf=FreeFempp::TypeVarForm::Global; + assert( tvf); + bool ret = false; + for (ii=ib;ii != ie;ii++) + { + if (ii->left() == tvf->tBC) { + ret=true; + continue; + } + } + if(zero && NbOfDF) + xx=R(); + else if(!zero && NbOfDF && ret) { + cc.resize(xx.n); + cc = xx; + } - if ( pVh && AssembleVarForm,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,l->largs) ) - AssembleBC(stack,Vh.Th,Vh,Vh,false,0,&xx,0,l->largs,tgv); + if ( pVh && AssembleVarForm,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,l->largs) ) { + if (!zero && NbOfDF && ret) { + KN bb(xx.n, std::numeric_limits::lowest()); + AssembleBC(stack,Vh.Th,Vh,Vh,false,0,&bb,0,l->largs,tgv); + for(int i = 0; i < xx.n; ++i) + if(bb[i] != std::numeric_limits::lowest()) + xx[i] = cc[i] + bb[i]; + } + else + AssembleBC(stack,Vh.Th,Vh,Vh,false,0,&xx,0,l->largs,tgv); + } return SetAny >(xx); } diff --git a/src/lglib/mymain.cpp b/src/lglib/mymain.cpp old mode 100755 new mode 100644