Skip to content

Commit a103c9c

Browse files
committed
Fixed a bug for the interpolation weights of a tet
1 parent d0e10f8 commit a103c9c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Common/src/adt_structure.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,10 +1304,10 @@ bool CADTElemClass::CoorInTetrahedron(const unsigned long elemID,
13041304
((parCoor[0]+parCoor[1]+parCoor[2]) <= paramLowerBound)) {
13051305
coorIsInside = true;
13061306

1307-
parCoor[0] = -0.5*(parCoor[0] + parCoor[1] + parCoor[2] + 1.0);
1308-
parCoor[1] = 0.5*(parCoor[0] + 1.0);
1309-
parCoor[2] = 0.5*(parCoor[1] + 1.0);
1310-
parCoor[3] = 0.5*(parCoor[2] + 1.0);
1307+
weightsInterpol[0] = -0.5*(parCoor[0] + parCoor[1] + parCoor[2] + 1.0);
1308+
weightsInterpol[1] = 0.5*(parCoor[0] + 1.0);
1309+
weightsInterpol[2] = 0.5*(parCoor[1] + 1.0);
1310+
weightsInterpol[3] = 0.5*(parCoor[2] + 1.0);
13111311
}
13121312

13131313
/* Return the value of coorIsInside. */

0 commit comments

Comments
 (0)