Skip to content

Commit 573b565

Browse files
committed
Fix issue in parallel interpolation with some FE.
1 parent 1e601ad commit 573b565

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ All notable changes to this project will be documented in this file.
4545
### Fixed
4646
- examples/potential.edp correct problem in times loops and BC
4747
- tutorial/mortar-DN-4.edp correct problem of region number in meshL
48-
- fixe problem in Curve mesh and intallBE , vertex number is wrong
48+
- fix problem in Curve mesh and intallBE , vertex number is wrong
4949
- portability issue on arm64-apple with `make petsc-slepc`
50+
- fix assertion failure with `transfer` and `transferMat` with some finite elements
5051

5152
## [4.9]
5253
### Added

idp/macro_ddm.idp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,19 +1743,25 @@ ENDIFMACRO
17431743
gluedExchange = gluemesh(toGlue);
17441744
}
17451745
meshN interpolateExchange;
1746+
fespace PhExchangePrivate(gluedExchange, P0);
17461747
fespace VhExchangePrivate(gluedExchange, Pk);
17471748
VhExchangePrivate<PetscScalar> def(uExchange);
17481749
for[i, v : rankRecv] {
17491750
int index = mpiWaitAny(rqRecvU);
17501751
if(index != mpiUndefined) {
17511752
if(recvTh[index].nt) {
1752-
fespace VhRestrictionPrivate(recvTh[index], Pk);
1753-
matrix R = interpolate(VhRestrictionPrivate, VhExchangePrivate);
1753+
fespace PhRestrictionPrivate(recvTh[index], P0);
1754+
matrix R = interpolate(PhRestrictionPrivate, PhExchangePrivate);
17541755
if(R.nnz != R.n) {
17551756
R.thresholding(1.0e-2);
17561757
assert(R.nnz == R.n);
17571758
}
1758-
for[i, j, v : R] uExchange[][j] += exchangeU[index][i];
1759+
int[int] I, J;
1760+
real[int] C;
1761+
[I, J, C] = R;
1762+
fespace VhRestrictionPrivate(recvTh[index], Pk);
1763+
int[int] restriction = restrict(VhRestrictionPrivate, VhExchangePrivate, J);
1764+
for[i, v : restriction] uExchange[][v] += exchangeU[index][i];
17591765
}
17601766
}
17611767
}

0 commit comments

Comments
 (0)