← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3396: fix solidLine[i][j] when facetNFictious case(1).

 

------------------------------------------------------------
revno: 3396
committer: Chao Yuan <chaoyuan2012@xxxxxxxxx>
timestamp: Wed 2014-01-29 19:04:39 +0100
message:
  fix solidLine[i][j] when facetNFictious case(1).
modified:
  lib/triangulation/Network.ipp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/triangulation/Network.ipp'
--- lib/triangulation/Network.ipp	2014-01-29 17:06:48 +0000
+++ lib/triangulation/Network.ipp	2014-01-29 18:04:39 +0000
@@ -606,9 +606,17 @@
 		cell->info().solidLine[j][facetRe2]=Line_solid_facet(SV3->point(), SV1->point(), SV2->point());
 
 		Boundary &bi =  boundary(SV3->info().id());
+		double A [3], B[3];
+		for (int m=0;m<3;m++) {A[m]=SV1->point()[m];B[m]= SV2->point()[m];}
+		A[bi.coordinate]=0;
+		B[bi.coordinate]=0;
+		Point AA(A[0],A[1],A[2]);
+		Point BB(B[0],B[1],B[2]);
+		Vecteur AB= AA-BB;
 
-		Vecteur AB= SV1->point() - SV2->point();
-//		AB[bi.coordinate] = 0;
+//		Boundary &bi = boundary(SV3->info().id());
+//		Vecteur AB= SV1->point() - SV2->point();
+//		AB[bi.coordinate] = 0;//FIXME:can not assign read-only CGAL::Vector_3?
 		
 		if (bi.flowCondition && ! SLIP_ON_LATERALS) {
                         cell->info().solidLine[j][facetF1]=sqrt(AB.squared_length());