← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3643: Set some metric-measures in ViscElCap.

 

------------------------------------------------------------
revno: 3643
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2015-04-29 19:12:57 +0200
message:
  Set some metric-measures in ViscElCap.
modified:
  pkg/dem/ViscoelasticCapillarPM.cpp
  pkg/dem/ViscoelasticPM.hpp


--
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 'pkg/dem/ViscoelasticCapillarPM.cpp'
--- pkg/dem/ViscoelasticCapillarPM.cpp	2014-12-10 10:52:48 +0000
+++ pkg/dem/ViscoelasticCapillarPM.cpp	2015-04-29 17:12:57 +0000
@@ -18,12 +18,17 @@
   // no updates of an existing contact 
   if(interaction->phys) return;
   
+  TIMING_DELTAS_START();
+  TIMING_DELTAS_CHECKPOINT("setup");
+  
   shared_ptr<ViscElCapPhys> phys (new ViscElCapPhys());
   Calculate_ViscElMat_ViscElMat_ViscElPhys(b1, b2, interaction, phys);
   
   ViscElCapMat* mat1 = static_cast<ViscElCapMat*>(b1.get());
   ViscElCapMat* mat2 = static_cast<ViscElCapMat*>(b2.get());
   
+  TIMING_DELTAS_CHECKPOINT("collide_materials");
+  
   if (mat1->Capillar and mat2->Capillar)  {
     if (mat1->Vb == mat2->Vb) {
       phys->Vb = mat1->Vb;
@@ -65,6 +70,9 @@
 
 /* Law2_ScGeom_ViscElCapPhys_Basic */
 bool Law2_ScGeom_ViscElCapPhys_Basic::go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I) {
+  TIMING_DELTAS_START();
+  TIMING_DELTAS_CHECKPOINT("setup");
+  
   Vector3r force = Vector3r::Zero();
   
   const id_t id1 = I->getId1();
@@ -81,8 +89,10 @@
    * There is only the determination of critical distance between spheres, 
    * after that the liquid bridge will be broken.
    */ 
-   
-  if (not(phys.liqBridgeCreated) and phys.Capillar and geom.penetrationDepth>=0) {
+  
+  TIMING_DELTAS_CHECKPOINT("create_liq_bridge");
+
+  if (phys.Capillar and not(phys.liqBridgeCreated) and geom.penetrationDepth>=0) {
     phys.liqBridgeCreated = true;
     phys.liqBridgeActive = false;
     #ifdef YADE_LIQMIGRATION
@@ -101,8 +111,11 @@
     }
   }
   
+  TIMING_DELTAS_CHECKPOINT("calculate_scrit");
+
   phys.sCrit = this->critDist(phys.Vb, phys.R, phys.theta);
   
+  TIMING_DELTAS_CHECKPOINT("force_calculation_liquid");
   if (geom.penetrationDepth<0) {
     if (phys.liqBridgeCreated and -geom.penetrationDepth<phys.sCrit and phys.Capillar) {
       if (not(phys.liqBridgeActive)) {
@@ -146,6 +159,7 @@
     Vector3r torque1 = Vector3r::Zero();
     Vector3r torque2 = Vector3r::Zero();
     
+    TIMING_DELTAS_CHECKPOINT("force_calculation_penetr");
     if (computeForceTorqueViscEl(_geom, _phys, I, force, torque1, torque2)) {
       addForce (id1,-force,scene);
       addForce (id2, force,scene);

=== modified file 'pkg/dem/ViscoelasticPM.hpp'
--- pkg/dem/ViscoelasticPM.hpp	2015-03-16 10:41:06 +0000
+++ pkg/dem/ViscoelasticPM.hpp	2015-04-29 17:12:57 +0000
@@ -10,6 +10,7 @@
 #include<pkg/dem/ScGeom.hpp>
 #include<pkg/dem/DemXDofGeom.hpp>
 #include<pkg/common/MatchMaker.hpp>
+#include<pkg/common/InteractionLoop.hpp>
 
 #ifdef YADE_SPH
 #include<pkg/common/SPHEngine.hpp>