Skip to content

Commit 2ea0184

Browse files
committed
Fix reaction term sign in Jacobian matrix assembly for general form PDE
1 parent 114a79d commit 2ea0184

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solvers/generalFormPDEScript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function assembleGeneralFormPDEMat(meshData, boundaryConditions, coeffici
118118
basisFunction[localNodeIndex1];
119119

120120
// Reaction term
121-
jacobianMatrix[globalNodeIndex1][globalNodeIndex2] +=
121+
jacobianMatrix[globalNodeIndex1][globalNodeIndex2] -=
122122
gaussWeights[gaussPointIndex] *
123123
detJacobian *
124124
c *
@@ -240,7 +240,7 @@ export function assembleGeneralFormPDEFront({
240240
basisFunction[localNodeIndex1];
241241

242242
// Reaction term
243-
localJacobianMatrix[localNodeIndex1][localNodeIndex2] +=
243+
localJacobianMatrix[localNodeIndex1][localNodeIndex2] -=
244244
gaussWeights[gaussPointIndex] *
245245
detJacobian *
246246
c *

0 commit comments

Comments
 (0)