← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1948: Revert weird changes from JFJ in TWrapper interface (min/max should not be mandatory in any funct...

 

------------------------------------------------------------
revno: 1948
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Thu 2010-01-07 20:26:05 +0100
message:
  Revert weird changes from JFJ in TWrapper interface (min/max should not be mandatory in any functions!).
modified:
  lib/triangulation/TesselationWrapper.cpp
  lib/triangulation/TesselationWrapper.h
  lib/triangulation/test.cpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'lib/triangulation/TesselationWrapper.cpp'
--- lib/triangulation/TesselationWrapper.cpp	2009-12-22 23:52:51 +0000
+++ lib/triangulation/TesselationWrapper.cpp	2010-01-07 19:26:05 +0000
@@ -131,33 +131,25 @@
 		else {
 		cerr << "Tes->move(x,y,z,rad,id)==NULL" << endl; return false;}
 }
-//  void TesselationWrapper::ComputeTesselation( void )
-
-//  	AddBoundingPlanes();
-
-
+
+
+void TesselationWrapper::ComputeTesselation( void )
+{
+	if (!rad_divided) {
+		mean_radius /= n_spheres;
+		rad_divided = true;}
+	Tes->Compute();	
+}
  void TesselationWrapper::ComputeTesselation( double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz, double dt)
-{
-
-	if (!rad_divided) {
-		mean_radius /= n_spheres;
-		rad_divided = true;}
-		
+{	
  	AddBoundingPlanes( pminx, pmaxx,  pminy,  pmaxy, pminz, pmaxz, dt);
-	
-	Tes->Compute();	
-
- 
+	ComputeTesselation();
 }
 
-//  void TesselationWrapper::ComputeVolumes(void)
- void TesselationWrapper::ComputeVolumes(double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz, double dt)
+void TesselationWrapper::ComputeVolumes(void)
 {
-//  	ComputeTesselation();
-	ComputeTesselation(pminx,pmaxx,pminy, pmaxy, pminz, pmaxz, dt);
-// 	//cout << "tesselated" << endl;
+  	ComputeTesselation();
 	Tes->ComputeVolumes();
-
 }
 
 unsigned int TesselationWrapper::NumberOfFacets(void)

=== modified file 'lib/triangulation/TesselationWrapper.h'
--- lib/triangulation/TesselationWrapper.h	2009-12-13 19:58:33 +0000
+++ lib/triangulation/TesselationWrapper.h	2010-01-07 19:26:05 +0000
@@ -55,8 +55,7 @@
 	
 	///Compute Voronoi vertices + volumes of all cells
 	///use ComputeTesselation to force update, e.g. after spheres positions have been updated
-//  	void	ComputeVolumes	(void);
- 	void	ComputeVolumes(double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz, double dt);
+  	void	ComputeVolumes	(void);
 	double	Volume	(unsigned int id);
 	
 	unsigned int NumberOfFacets(void);

=== modified file 'lib/triangulation/test.cpp'
--- lib/triangulation/test.cpp	2009-12-13 19:58:33 +0000
+++ lib/triangulation/test.cpp	2010-01-07 19:26:05 +0000
@@ -5,7 +5,7 @@
 #include <iostream>
 
 using namespace std;
-using namespace CGT;
+using namespace CGT;
 
 int main ( int argc, char *argv[ ], char *envp[ ] )
 {
@@ -55,14 +55,10 @@
 
 	cout << T1.insert(0.5000, 0.7929, 0.5000, 0.2071,17) << endl;
 	
-//  	T1.ComputeVolumes();
-
-	T1.ComputeVolumes(0, 1.0, 0, 1.0, 0, 1.0, 0.00001);
-
-	
+	T1.AddBoundingPlanes();
+  	T1.ComputeVolumes();
+		
 	cout << "sphere icicicicici     =    " << T1.NumberOfFacets() << endl ;
-
-
 	
 	for (int i =1; i<15; ++i) {
 	cout << "sphere " << i << " v=" << T1.Volume(i) << endl;