Re: [Yade-dev] Automated crash report for /tmp/yade-31391/bin/yade-bzr1756: CohesiveTriaxialTest, FEMBeam, HydraulicTest, LatticeExampleCTData, LatticeExampleSimple, SDECImpactTest, STLImporterTest, S

2009-09-14 Thread Václav Šmilauer

 What is that? So many generators are crashing?
If you look at the error messages, most of them is just errors about not
being able to find external files. 

 And why does CohesiveTT need hydraulic forces?!
Is the author around?

V.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Automated crash report for /tmp/yade-31391/bin/yade-bzr1756: CohesiveTriaxialTest, FEMBeam, HydraulicTest, LatticeExampleCTData, LatticeExampleSimple, SDECImpactTest, STLImporterTest, S

2009-09-14 Thread Bruno Chareyre


  

And why does CohesiveTT need hydraulic forces?!


Is the author around?

  

Is it a joke? ;)
I'm the main author, but I don't think I ever write anything about 
hydraulic forces in this file. Oh wait... I'll double check...


Bruno





V.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


  



--
__
Chareyre Bruno
Maitre de Conferences

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
 




___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Automated crash report for /tmp/yade-31391/bin/yade-bzr1756: CohesiveTriaxialTest, FEMBeam, HydraulicTest, LatticeExampleCTData, LatticeExampleSimple, SDECImpactTest, STLImporterTest, S

2009-09-14 Thread Václav Šmilauer
  Is the author around?
 

 Is it a joke? ;)

Apparently is, but wasn't meant as such. I thought Luc wrote that code.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-dev/yade/trunk] Rev 1757: 1. get snow code to run, albeit still buggy

2009-09-14 Thread noreply

revno: 1757
committer: Janek Kozicki cosu...@berlios.de
branch nick: trunk
timestamp: Mon 2009-09-14 14:46:08 +0200
message:
  1. get snow code to run, albeit still buggy
  2. why dynamic_casts stopped working everywhere, that's a mystery to me
  3. interactions isNew doesn't exist anymore, snow code needs update for this
modified:
  pkg/snow/DataClass/BshSnowGrain.hpp
  pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp
  pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeIstSnowLayersContact.cpp
  pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry.cpp
  pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
  pkg/snow/PreProcessor/SnowVoxelsLoader.hpp


--
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 'pkg/snow/DataClass/BshSnowGrain.hpp'
--- pkg/snow/DataClass/BshSnowGrain.hpp	2009-08-03 10:02:11 +
+++ pkg/snow/DataClass/BshSnowGrain.hpp	2009-09-14 12:46:08 +
@@ -8,8 +8,8 @@
 #includeboost/serialization/vector.hpp
 #includeboost/serialization/shared_ptr.hpp
 #includeboost/tuple/tuple.hpp
-#include boost/thread.hpp
-
+#includeboost/thread.hpp
+#includeboost/serialization/export.hpp 
 
 typedef std::vector std::vectorstd::vectorunsigned char   T_DATA;
 
@@ -126,3 +126,5 @@
 
 REGISTER_SERIALIZABLE(BshSnowGrain);
 
+BOOST_CLASS_EXPORT(BshSnowGrain) 
+

=== modified file 'pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp'
--- pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-08-03 10:02:11 +
+++ pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-09-14 12:46:08 +
@@ -23,7 +23,20 @@
 //	std::cerr  ---   __FILE__  \n;
 //	return result;
 
-	BssSnowGrain* s1=dynamic_castBssSnowGrain*(cm1.get()), *s2=dynamic_castBssSnowGrain*(cm2.get());
+	if(cm1-getClassName() != std::string(BssSnowGrain) || cm2-getClassName() != std::string(BssSnowGrain))
+	{
+		std::cerr  cm1-getClassName() cm2-getClassName()  \n;
+		std::cerr  whops =99=\n;
+		return false;
+	}
+	BssSnowGrain* s1=static_castBssSnowGrain*(cm1.get());
+	BssSnowGrain* s2=static_castBssSnowGrain*(cm2.get());
+	if(s1==0 || s2==0)
+	{
+		std::cerr  cm1-getClassName() cm2-getClassName()  \n;
+		std::cerr  whops =9=\n;
+		return false;
+	}
 	Vector3r normal=se32.position-se31.position;
 	Real penetrationDepthSq=pow((s1-radius+s2-radius),2) - normal.SquaredLength();
 	if (penetrationDepthSq0 || c-isReal() || assist)
@@ -77,11 +90,11 @@
 	{
 		shared_ptrSpheresContactGeometry scm;
 		if(c-interactionGeometry) scm=dynamic_pointer_castSpheresContactGeometry(c-interactionGeometry);
-		else { std::cerr  whops_2!  __FILE__  \n; return false; }
+		else { std::cerr  whops =5=   __FILE__  \n; return false; }
 		scm-normal *= -1.0;
 		std::swap(scm-radius1,scm-radius2);
 	}
 	return result;
 }
 
-YADE_PLUGIN((Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry));
\ No newline at end of file
+YADE_PLUGIN((Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry));

=== modified file 'pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeIstSnowLayersContact.cpp'
--- pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeIstSnowLayersContact.cpp	2009-08-20 19:55:52 +
+++ pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeIstSnowLayersContact.cpp	2009-09-14 12:46:08 +
@@ -59,10 +59,18 @@
 	//InteractingBox* m1=static_castInteractingBox*(cm1.get()), *m2=static_castBssSnowGrain*(cm2.get());
 	//std::cerr  ---   __FILE__  \n;
 
-InteractingBox* m1=dynamic_castInteractingBox*(cm1.get()); BssSnowGrain *m2=dynamic_castBssSnowGrain*(cm2.get());
+	if(cm1-getClassName() != std::string(InteractingBox) || cm2-getClassName() != std::string(BssSnowGrain))
+	{
+		std::cerr  cm1-getClassName() cm2-getClassName()  \n;
+		std::cerr  whops =66=\n;
+		return false;
+	}
+InteractingBox* m1=static_castInteractingBox*(cm1.get());
+BssSnowGrain *m2=static_castBssSnowGrain*(cm2.get());
 if(m1==0 || m2==0)
 {
-	std::cerr  whops_2!  __FILE__  \n; 
+	std::cerr  cm1-getClassName() cm2-getClassName()  \n;
+	std::cerr  whops =6=   __FILE__  \n; 
 	return false;
 }
 
@@ -227,6 +235,7 @@
 //FIXME//		bool old_n = c-isNew;
 //FIXME//		c-isNew=false;
 		//ggg.assist=true;
+///??		c-init();
 		bool res = ggg.go(cm1,cm2,se31,se32,c);
 //FIXME//		c-isNew=old_n;
 		return res;
@@ -264,10 +273,18 @@
 	//InteractingBox* m1=static_castInteractingBox*(cm1.get()), *m2=static_castBssSnowGrain*(cm2.get());
 	std::cerr  - reverse -   __FILE__  \n;
 
-InteractingBox* m2=dynamic_castInteractingBox*(cm2.get()); BssSnowGrain 

Re: [Yade-dev] [Branch ~yade-dev/yade/trunk] Rev 1757: 3. interactions isNew doesn't exist anymore, snow code needs update for this

2009-09-14 Thread Václav Šmilauer
   3. interactions isNew doesn't exist anymore, snow code needs update for this

Have a look at Interaction::isFresh() for this (deliberately named
differently, to not be confused with the old meaning of isNew).

For the boost::serialization code that I disabled in snow code, it was
because if you #define YADE_BOOST_SERIALIZATION in ClassFactory.hpp
(commented out by default), boost::serialization code will be generated
for all classes automatically inside REGISTER_SERIALIZABLE and
BshSnowGrain will error out as the class will be registered twice IIRC.

The compilation is dead slow with boost::serialization however (like 10x
slower?) and saving via b::s throws exception about unregistered class,
but I didn't find which one -- if you want to try.
Omega().saveXML('file.xml') saves using b::s (defined in
yadeWrapper.cpp).

V.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp