소스 검색

Fix computing difference

Samuel Thibault 6 년 전
부모
커밋
3b301b5328
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      examples/heat/heat.c

+ 1 - 1
examples/heat/heat.c

@@ -331,7 +331,7 @@ static float compute_A_value(unsigned i, unsigned j, point *pmesh)
 	theta_j = NODE_TO_THETA(j);
 
 	/* Compute the Sum of all the integral over all triangles */
-	if ( (abs(thick_i - thick_j) <= 1) && (abs(theta_i - theta_j) <= 1) )
+	if ( (abs((int)thick_i - (int)thick_j) <= 1) && (abs((int)theta_i - (int)theta_j) <= 1) )
 	{
 		if ( (theta_j == theta_i -1) && (thick_j == thick_i +1))
 			goto done;