← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4137: Use toleranceWarning and toleranceCritical for DEM-PFV check.

 

------------------------------------------------------------
revno: 4137
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2014-08-07 15:38:16 +0200
message:
  Use toleranceWarning and toleranceCritical for DEM-PFV check.
modified:
  scripts/checks-and-tests/checks/DEM-PFV-check.py


--
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 'scripts/checks-and-tests/checks/DEM-PFV-check.py'
--- scripts/checks-and-tests/checks/DEM-PFV-check.py	2014-07-28 06:50:17 +0000
+++ scripts/checks-and-tests/checks/DEM-PFV-check.py	2014-08-07 13:38:16 +0000
@@ -5,7 +5,8 @@
 
 if ('PFVFLOW' in features):
 	errors=0
-	tolerance=0.01
+	toleranceWarning =0.01
+	toleranceCritical=0.10
 
 	from yade import pack
 	num_spheres=100# number of spheres
@@ -77,9 +78,11 @@
 	modulus = 1000./abs(e22)
 
 	target=252759.905803
-	if abs((modulus-target)/target)>tolerance :
+	if abs((modulus-target)/target)>toleranceWarning:
 		print "DEM-PFV: difference in bulk modulus:", modulus, "vs. target ",target
-		errors+=1
+		if (abs((modulus-target)/target)>toleranceCritical):
+			errors+=1
+			print "The difference is more, than the critical tolerance!"
 
 	#B. Activate flow engine and set boundary conditions in order to get permeability
 	flow.dead=0
@@ -103,9 +106,11 @@
 		errors+=1
 
 	target=0.040399916554
-	if abs((permeability-target)/target)>tolerance :
+	if abs((permeability-target)/target)>toleranceWarning:
 		print "DEM-PFV: difference in permeability:",permeability," vs. target ",target
-		errors+=1
+		if (abs((permeability-target)/target)>toleranceCritical):
+			errors+=1
+			print "The difference is more, than the critical tolerance!"
 
 	#C. now the oedometer test, drained at the top, impermeable at the bottom plate
 	flow.bndCondIsPressure=[0,0,0,1,0,0]
@@ -121,13 +126,19 @@
 	O.run(3000,1)
 
 	target=628.314160434
-	if abs((flow.getPorePressure((0.5,0.1,0.5))-target)/target)>tolerance :
+	if abs((flow.getPorePressure((0.5,0.1,0.5))-target)/target)>toleranceWarning:
 		print "DEM-PFV: difference in final pressure:",flow.getPorePressure((0.5,0.1,0.5))," vs. target ",target
-		errors+=1
+		if (abs((flow.getPorePressure((0.5,0.1,0.5))-target)/target)>toleranceCritical):
+			errors+=1
+			print "The difference is more, than the critical tolerance!"
+
 	target=0.00258113045083
-	if abs((triax.strain[1]-zeroe22-target)/target)>tolerance :
+	if abs((triax.strain[1]-zeroe22-target)/target)>toleranceWarning:
 		print "DEM-PFV: difference in final deformation",triax.strain[1]-zeroe22," vs. target ",target
-		errors+=1
+		if (abs((triax.strain[1]-zeroe22-target)/target)>toleranceCritical):
+			errors+=1
+			print "The difference is more, than the critical tolerance!"
+
 
 	if (float(flow.execTime)/float(sum([e.execTime for e in O.engines])))>0.6 :
 		print "(INFO) DEM-PFV: More than 60\% of cpu time in FlowEngine (",100.*(float(flow.execTime)/float(sum([e.execTime for e in O.engines]))) ,"%). Should not happen with efficient libraries (check blas/lapack/cholmod implementations)"