| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 
 | for(int s=0;s<n;s++)//n nombre d'étape
		{
 
		double Vi[3],Vj[3],Vii[3],Vjj[3],Vkk[3],Ne[3],He,W;
		vtkIdType i,j,fi, fj,ii,jj,kk;//je les déclare comme des vtkIdType
 
 
		for (int e=0; e<this->Input->GetNumberOfEdges(); e++)
				{
 
					Input->GetEdgeFaces(e,fi,fj);// Returns i and j as the faces adjacent to the edge.					
 
					Input->GetTriangleNormal(fi,Vi);
					Input->GetTriangleNormal(fj,Vj);
 
					Input->GetEdgeVertices(e,i,j);
 
					Ne[0]=Vi[0]+Vj[0];
					Ne[1]=Vi[1]+Vj[1];
					Ne[2]=Vi[2]+Vj[2];//additionner les 2 vecteurs Vi et Vj
 
					vtkMath::Normalize(Ne);
 
					double Z=vtkMath::Dot(Vi,Ne);//produit entre 2 vecteurs[3] le résultat dans Z cosOe/2=<Ne,Vi>/||Ne||
					double Edge=Input->GetDistanceBetweenVertices(i,j);//calcul de l'arret Eij
					He=2*fabs(Edge)*Z;//He=2|e|cosOe/2				
 
					double a=He;
					double LambdaSquare=pow(Lambda,2);
 
					if (fabs(a)>Lambda)
						W=LambdaSquare/(r*pow((Lambda-fabs(a)),2)+LambdaSquare);
					else
						W=1;
 
					TableDeltaLambda[i][0]-=W*He*Ne[0];
					TableDeltaLambda[i][1]-=W*He*Ne[1];
					TableDeltaLambda[i][2]-=W*He*Ne[2];
 
					TableDeltaLambda[j][0]-=W*He*Ne[0];
					TableDeltaLambda[j][1]-=W*He*Ne[1];
					TableDeltaLambda[j][2]-=W*He*Ne[2];
 
				} | 
Partager