← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1735: SConstruct: add doc for pretty, fix a few lib checks on karmic

 

------------------------------------------------------------
revno: 1735
committer: Václav Šmilauer <vaclav@flux>
branch nick: trunk
timestamp: Tue 2009-08-25 16:21:44 +0200
message:
  SConstruct: add doc for pretty, fix a few lib checks on karmic
modified:
  SConstruct
  py/pack.py


--
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 'SConstruct'
--- SConstruct	2009-08-24 17:07:33 +0000
+++ SConstruct	2009-08-25 14:21:44 +0000
@@ -151,7 +151,7 @@
 	#('SHLINK','Linker for shared objects','g++'),
 	('SHCCFLAGS','Additional compiler flags for linking (for plugins).',None,None,Split),
 	BoolVariable('QUAD_PRECISION','typedef Real as long double (=quad)',0),
-	BoolVariable('pretty',"Don't show compiler command line (like the Linux kernel)",1),
+	BoolVariable('pretty',"Don't show commands being run, only what files are being compiled/linked/installed",1),
 	BoolVariable('useMiniWm3','use local miniWm3 library instead of Wm3Foundation',1),
 	#BoolVariable('useLocalQGLViewer','use in-tree QGLViewer library instead of the one installed in system',1),
 )
@@ -327,15 +327,15 @@
 		Exit(1)
 	# check "optional" libs
 	if 'opengl' in env['features']:
-		ok=conf.CheckLibWithHeader('glut','GL/glut.h','c','glutGetModifiers();',autoadd=1)
-		if not ok: featureNotOK('openGL')
+		ok=conf.CheckLibWithHeader('glut','GL/glut.h','c++','glutGetModifiers();',autoadd=1)
+		if not ok: featureNotOK('opengl')
 	if 'gts' in env['features']:
 		env.ParseConfig('pkg-config glib-2.0 --cflags --libs');
-		ok=conf.CheckLibWithHeader('gts','gts.h','c','gts_object_class();',autoadd=1)
+		ok=conf.CheckLibWithHeader('gts','gts.h','c++','gts_object_class();',autoadd=1)
 		if not ok: featureNotOK('gts')
 	if 'qt3' not in env['exclude']:
 		if 'opengl' not in env['features']:
-			print "\nQt3 interface can only be used if openGL is enabled.\nEither add openGL to 'features' or add qt3 to 'exclude'."
+			print "\nQt3 interface can only be used if opengl is enabled.\nEither add opengl to 'features' or add qt3 to 'exclude'."
 			Exit(1)
 		ok&=conf.CheckQt(env['QTDIR'])
 		env.Tool('qt'); env.Replace(QT_LIB='qt-mt')

=== modified file 'py/pack.py'
--- py/pack.py	2009-08-24 18:07:45 +0000
+++ py/pack.py	2009-08-25 14:21:44 +0000
@@ -251,9 +251,10 @@
 		beta,gamma=fullDim[1]/fullDim[0],fullDim[2]/fullDim[0] # ratios β=y₀/x₀, γ=z₀/x₀
 		N100=spheresInCell/cloudPorosity # number of spheres for cell being filled by spheres without porosity
 		x1=radius*(1/(beta*gamma)*N100*(4/3.)*pi)**(1/3.)
-		y1,z1=beta*x1,gamma*x1
+		y1,z1=beta*x1,gamma*x1; vol0=x1*y1*z1
 		maxR=radius*(1+rRelFuzz)
-		x1=max(x1,8*maxR); y1=max(y1,8*maxR); z1=max(z1,8*maxR) # this might make the packing looser, oh well...
+		x1=max(x1,8*maxR); y1=max(y1,8*maxR); z1=max(z1,8*maxR); vol1=x1*y1*z1
+		N100*=vol1/vol0 # volume might have been increased, increase number of spheres to keep porosity the same
 	if(memoizeDb and os.path.exists(memoizeDb)):
 		if memoDbg:
 			def memoDbgMsg(s): print s
@@ -264,7 +265,7 @@
 		try:
 			c.execute('select radius,rRelFuzz,dimx,dimy,dimz,N,timestamp,periodic from packings order by N')
 		except sqlite3.OperationalError:
-			raise RuntimeError("ERROR: database",memoizeDb," not compatible with randomDensePack (deprecated format or not db created by randomDensePack)")
+			raise RuntimeError("ERROR: database `"+memoizeDb+"' not compatible with randomDensePack (corrupt, deprecated format or not a db created by randomDensePack)")
 		for row in c:
 			R,rDev,X,Y,Z,NN,timestamp,isPeri=row[0:8]; scale=radius/R
 			rDev*=scale; X*=scale; Y*=scale; Z*=scale