Skip to content

Commit 4bc1410

Browse files
authored
Fix #351
1 parent 6c62f96 commit 4bc1410

File tree

8 files changed

+83
-28
lines changed

8 files changed

+83
-28
lines changed

.github/workflows/full-mpich.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ on:
77
- develop
88
- master
99
- slegrand-actions-debug
10-
10+
1111
pull_request:
1212
branches:
1313
- develop
1414

1515
# For development phase
1616
workflow_dispatch:
17-
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
linux:
2024
strategy:
@@ -27,7 +31,7 @@ jobs:
2731

2832
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
2933
- ${{ github.workflow }}
30-
34+
3135
runs-on: ubuntu-${{ matrix.version }}
3236

3337
steps:
@@ -46,7 +50,7 @@ jobs:
4650
./configure --enable-download ${{ matrix.cfg.opts }} \
4751
--prefix="${HOME}/freefem"
4852
./3rdparty/getall -a -o PETSc
49-
53+
5054
- name: PETSc
5155
run: |
5256
cd 3rdparty/ff-petsc
@@ -84,12 +88,12 @@ jobs:
8488
cfg:
8589
- {opts: --enable-debug}
8690
- {opts: --enable-optim --enable-generic}
87-
91+
8892
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
8993
- ${{ github.workflow }}
90-
94+
9195
runs-on: macos-${{ matrix.version }}
92-
96+
9397
steps:
9498
- uses: actions/checkout@v4
9599

@@ -123,7 +127,7 @@ jobs:
123127
./configure --enable-download ${{ matrix.cfg.opts }} \
124128
--prefix="${HOME}/freefem"
125129
./3rdparty/getall -a -o PETSc
126-
130+
127131
- name: PETSc
128132
run: |
129133
cd 3rdparty/ff-petsc

.github/workflows/full-msmpi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ on:
77
- develop
88
- master
99
- slegrand-actions-debug
10-
10+
1111
pull_request:
1212
branches:
1313
- develop
1414

1515
# For development phase
1616
workflow_dispatch:
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
windows:
2024
strategy:
@@ -23,7 +27,7 @@ jobs:
2327
cfg:
2428
# - {opts: --enable-debug}
2529
- {opts: --enable-optim --enable-generic}
26-
30+
2731
name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}}
2832
runs-on: windows-2022
2933

@@ -68,7 +72,7 @@ jobs:
6872
run: |
6973
pacman -R --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-gdb \
7074
mingw-w64-x86_64-gdb-multiarch
71-
75+
7276
- uses: actions/checkout@v4
7377

7478
- name: Configure

.github/workflows/full-openmpi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ on:
77
- develop
88
- master
99
- slegrand-actions-debug
10-
10+
1111
pull_request:
1212
branches:
1313
- develop
1414

1515
# For development phase
1616
workflow_dispatch:
17-
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
linux:
2024
strategy:
@@ -27,7 +31,7 @@ jobs:
2731

2832
name: Ubuntu ${{ matrix.version }} with ${{ matrix.cfg.opts }} \
2933
- ${{ github.workflow }}
30-
34+
3135
runs-on: ubuntu-${{ matrix.version }}
3236

3337
steps:

.github/workflows/minimal.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
name: Minimal version
2+
23
on:
34
push:
45
branches:
56
- develop
67
- master
78
- slegrand-actions-debug
8-
9+
910
pull_request:
1011
branches:
1112
- develop
12-
13+
1314
# For development phase
1415
workflow_dispatch:
15-
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
1621
jobs:
1722
linux:
1823
strategy:
@@ -59,7 +64,7 @@ jobs:
5964
cfg:
6065
- {opts: --enable-debug}
6166
- {opts: --enable-optim --enable-generic}
62-
67+
6368
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} - ${{ github.workflow }}
6469
runs-on: macos-${{ matrix.version }}
6570

@@ -97,7 +102,7 @@ jobs:
97102
cfg:
98103
- {opts: --enable-debug}
99104
- {opts: --enable-optim --enable-generic}
100-
105+
101106
name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{ github.workflow }}
102107
runs-on: windows-2022
103108

.github/workflows/sequential.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ on:
66
- develop
77
- master
88
- slegrand-actions-debug
9-
9+
1010
pull_request:
1111
branches:
1212
- develop
1313

1414
# For development phase
1515
workflow_dispatch:
16-
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: true
20+
1721
jobs:
1822
linux:
1923
strategy:
@@ -62,7 +66,7 @@ jobs:
6266
cfg:
6367
- {opts: --enable-debug}
6468
- {opts: --enable-optim --enable-generic}
65-
69+
6670
name: MacOS ${{ matrix.version }} with ${{ matrix.cfg.opts }} - ${{ github.worflow }}
6771
runs-on: macos-${{ matrix.version }}
6872

@@ -99,7 +103,7 @@ jobs:
99103
cfg:
100104
# - {opts: --enable-debug}
101105
- {opts: --enable-optim --enable-generic}
102-
106+
103107
name: Windows Server 2022 with ${{ matrix.cfg.opts }} - ${{github.workflow}}
104108
runs-on: windows-2022
105109

src/fflib/problem.cpp

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10017,7 +10017,7 @@ bool AssembleVarForm(Stack stack,const MMesh & Th,const FESpace1 & Uh,const FESp
1001710017
int ddf=K(df);
1001810018
// AA(ddf,ddf) =tgv;
1001910019
if (Aii) onBC[ddf]='1'; ;//A->SetBC(ddf, tgv);// change 21 dec 2010 FH (Hack of ILU)
10020-
if (B) (*B)[ddf]= tgv1*gg[df];
10020+
if (B) (*B)[ddf]=tgv1*gg[df];
1002110021
if (X) (*X)[ddf]=gg[df];
1002210022
}
1002310023
}

src/fflib/problem.hpp

100755100644
Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
*/
2828
#ifndef PROBLEM_HPP_
2929
#define PROBLEM_HPP_
30+
31+
#include <limits>
32+
namespace FreeFempp {
33+
template<class R>
34+
class TypeVarForm;
35+
}
36+
3037
extern Block *currentblock;
3138

3239
template<class K> class Matrice_Creuse;
@@ -1379,11 +1386,38 @@ AnyType OpArraytoLinearForm<R,MMesh,v_fes>::Op::operator()(Stack stack) const
13791386
ffassert(px->N() == NbOfDF);
13801387
}
13811388
KN_<R> xx( px ? *(KN_<R> *) px : GetAny<KN_<R> >((*x)(stack) ));
1382-
if(zero && NbOfDF )
1383-
xx=R();
1389+
KN<R> cc;
1390+
list<C_F0>::const_iterator ii,ib=l->largs.begin(),
1391+
ie=l->largs.end();
1392+
using namespace FreeFempp;
1393+
TypeVarForm<R> *tvf=FreeFempp::TypeVarForm<R>::Global;
1394+
assert( tvf);
1395+
bool ret = false;
1396+
for (ii=ib;ii != ie;ii++)
1397+
{
1398+
if (ii->left() == tvf->tBC) {
1399+
ret=true;
1400+
continue;
1401+
}
1402+
}
1403+
if(zero && NbOfDF)
1404+
xx=R();
1405+
else if(!zero && NbOfDF && ret) {
1406+
cc.resize(xx.n);
1407+
cc = xx;
1408+
}
13841409

1385-
if ( pVh && AssembleVarForm<R,MatriceCreuse<R>,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,l->largs) )
1386-
AssembleBC<R,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,0,l->largs,tgv);
1410+
if ( pVh && AssembleVarForm<R,MatriceCreuse<R>,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,l->largs) ) {
1411+
if (!zero && NbOfDF && ret) {
1412+
KN<R> bb(xx.n, std::numeric_limits<double>::lowest());
1413+
AssembleBC<R,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&bb,0,l->largs,tgv);
1414+
for(int i = 0; i < xx.n; ++i)
1415+
if(bb[i] != std::numeric_limits<double>::lowest())
1416+
xx[i] = cc[i] + bb[i];
1417+
}
1418+
else
1419+
AssembleBC<R,MMesh,FESpaceT,FESpaceT>(stack,Vh.Th,Vh,Vh,false,0,&xx,0,l->largs,tgv);
1420+
}
13871421
return SetAny<KN_<R> >(xx);
13881422
}
13891423

src/lglib/mymain.cpp

100755100644
File mode changed.

0 commit comments

Comments
 (0)