Author: chareyre
Date: 2009-07-15 01:42:58 +0200 (Wed, 15 Jul 2009)
New Revision: 1866

Removed:
   
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.cpp
   
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.hpp
   trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.cpp
   trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.hpp
   
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
   
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.hpp
   trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.cpp
   trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.hpp
Modified:
   trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
   trunk/pkg/dem/PreProcessor/TriaxialTest.hpp
   trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp
   trunk/pkg/dem/PreProcessor/TriaxialTestWater.hpp
   trunk/pkg/dem/SConscript
Log:
- cleanup : removing unused (and useless) "water" variants of engines
- some cleanup in recorders too 




Deleted: 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.cpp
===================================================================
--- 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.cpp
    2009-07-14 21:03:51 UTC (rev 1865)
+++ 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.cpp
    2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,190 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#include "InteractingBox2InteractingSphere4SpheresContactGeometryWater.hpp"
-#include <yade/pkg-dem/SpheresContactGeometry.hpp>
-#include <yade/pkg-common/InteractingSphere.hpp>
-#include <yade/pkg-common/InteractingBox.hpp>
-
-#include <yade/lib-base/yadeWm3Extra.hpp>
-
-//FIXME return type should be shared_ptr<Interaction>
-bool InteractingBox2InteractingSphere4SpheresContactGeometryWater::go(         
const shared_ptr<InteractingGeometry>& cm1,
-                                               const 
shared_ptr<InteractingGeometry>& cm2,
-                                               const Se3r& se31,
-                                               const Se3r& se32,
-                                               const shared_ptr<Interaction>& 
c)
-{
-
-       //if (se31.orientation == Quaternionr())
-       //      return collideAABoxSphere(cm1,cm2,se31,se32,c);
-       
-       Vector3r l,t,p,q,r;
-       bool onborder = false;
-       Vector3r pt1,pt2,normal;
-       Matrix3r axisT,axis;
-       Real depth;
-
-       InteractingSphere* s = static_cast<InteractingSphere*>(cm2.get());
-       InteractingBox* obb = static_cast<InteractingBox*>(cm1.get());
-       
-       Vector3r extents = obb->extents;
-
-       se31.orientation.ToRotationMatrix(axisT);
-       axis = axisT.Transpose();
-       
-       p = se32.position-se31.position;
-       
-       l[0] = extents[0];
-       t[0] = axis.GetRow(0).Dot(p); 
-       if (t[0] < -l[0]) { t[0] = -l[0]; onborder = true; }
-       if (t[0] >  l[0]) { t[0] =  l[0]; onborder = true; }
-
-       l[1] = extents[1];
-       t[1] = axis.GetRow(1).Dot(p);
-       if (t[1] < -l[1]) { t[1] = -l[1]; onborder = true; }
-       if (t[1] >  l[1]) { t[1] =  l[1]; onborder = true; }
-
-       l[2] = extents[2];
-       t[2] = axis.GetRow(2).Dot(p);
-       if (t[2] < -l[2]) { t[2] = -l[2]; onborder = true; }
-       if (t[2] >  l[2]) { t[2] =  l[2]; onborder = true; }
-       
-       if (!onborder) 
-       {       //cerr << "!onborder";
-               // sphere center inside box. find largest `t' value
-               Real min = l[0]-fabs(t[0]);
-               int mini = 0;
-               for (int i=1; i<3; i++) 
-               {
-                       Real tt = l[i]-fabs(t[i]);
-                       if (tt < min) 
-                       {
-                               min = tt;
-                               mini = i;
-                       }
-               }
-               
-               // contact normal aligned with box edge along largest `t' value
-               Vector3r tmp = Vector3r(0,0,0);
-
-               tmp[mini] = (t[mini] > 0) ? 1.0 : -1.0;
-               
-               normal = axisT*tmp;
-               
-               normal.Normalize();
-               
-               pt1 = se32.position + normal*min;
-               pt2 = se32.position - normal*s->radius; 
-
-               // FIXME : remove those uncommented lines
-               shared_ptr<SpheresContactGeometry> scm;
-               if (!c->interactionGeometry)
-                       scm = shared_ptr<SpheresContactGeometry>(new 
SpheresContactGeometry());
-               else
-                       scm = 
dynamic_pointer_cast<SpheresContactGeometry>(c->interactionGeometry);
-                       
-               scm->contactPoint = 0.5*(pt1+pt2);
-               scm->normal = pt1-pt2;
-               scm->penetrationDepth = scm->normal.Normalize();
-               //cerr << "Box/Sphere penetrationdepth= "<< 
scm->normal.Normalize() << endl;
-               scm->radius1 = s->radius*2; /// c ici que le "rayon" du mur est 
fix�
-               //cerr << "1" << endl;
-               scm->radius2 = s->radius;
-               c->interactionGeometry = scm;
-               
-// FIXME : uncommente those lines      
-/////////////////////////////////////////////////
-//             shared_ptr<SpheresContactGeometry> scm = 
shared_ptr<SpheresContactGeometry>(new SpheresContactGeometry());
-//             scm->contactPoint = 0.5*(pt1+pt2);
-//             scm->normal = pt1-pt2;
-//             scm->penetrationDepth = scm->normal.Normalize();
-//             scm->radius1 = s->radius*2;
-//             scm->radius2 = s->radius;
-//             c->interactionGeometry = scm;
-               
-               return true;    
-       }
-       //FIXME : use else instead and signle return
-       
-       q = axisT*t;
-       r = p - q;
-       
-       depth = s->radius-sqrt(r.Dot(r));
-       //cerr << "depth = " << depth;
-       
-       if (depth < 0) 
-       {       //cerr << "depth < 0" ;
-               return false;
-       }
-
-       pt1 = q + se31.position;
-
-       normal = r;
-       normal.Normalize();
-
-       pt2 = se32.position - normal * s->radius;
-       
-       // FIXME : remove those uncommented lines
-       shared_ptr<SpheresContactGeometry> scm;
-       //cerr << "scm = " << scm << " | c = " << c << endl;
-       
-       if (!c->interactionGeometry)
-       {       //cerr << "c->isNew";
-               scm = shared_ptr<SpheresContactGeometry>(new 
SpheresContactGeometry());
-       }
-       else
-       {       //cerr << "else";
-               scm = 
dynamic_pointer_cast<SpheresContactGeometry>(c->interactionGeometry);
-       }
-       scm->contactPoint = 0.5*(pt1+pt2);
-       scm->normal = pt1-pt2;
-       scm->penetrationDepth = scm->normal.Normalize();
-       //cerr << "Box/Sphere penetrationdepth= "<< scm->normal.Normalize() << 
endl;
-       scm->radius1 = s->radius*2; /// c ici que le "rayon" du mur est fix�
-       //cerr << "2 " << endl;
-       scm->radius2 = s->radius;
-       c->interactionGeometry = scm;
-// FIXME : uncommente those lines      
-/////////////////////////////////////////////////      
-//     shared_ptr<SpheresContactGeometry> scm = 
shared_ptr<SpheresContactGeometry>(new SpheresContactGeometry());
-//     scm->contactPoint = 0.5*(pt1+pt2);
-//     scm->normal = pt1-pt2;
-//     scm->penetrationDepth = scm->normal.Normalize();
-//     scm->radius1 = s->radius*2;
-//     scm->radius2 = s->radius;
-//     c->interactionGeometry = scm;
-       
-       return true;
-}
-
-
-bool InteractingBox2InteractingSphere4SpheresContactGeometryWater::goReverse(  
const shared_ptr<InteractingGeometry>& cm1,
-                                               const 
shared_ptr<InteractingGeometry>& cm2,
-                                               const Se3r& se31,
-                                               const Se3r& se32,
-                                               const shared_ptr<Interaction>& 
c)
-{
-       bool isInteracting = go(cm2,cm1,se32,se31,c);
-       if (isInteracting)
-       {
-               SpheresContactGeometry* scm = 
static_cast<SpheresContactGeometry*>(c->interactionGeometry.get());
-               //Vector3r tmp = scm->closestsPoints[0].first;          
-               //scm->closestsPoints[0].first = scm->closestsPoints[0].second;
-               //scm->closestsPoints[0].second = tmp;
-               scm->normal = -scm->normal;
-               Real tmpR  = scm->radius1;
-               scm->radius1 = scm->radius2;
-               scm->radius2 = tmpR;
-       }
-       return isInteracting;
-}
-
-YADE_PLUGIN();

Deleted: 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.hpp
===================================================================
--- 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.hpp
    2009-07-14 21:03:51 UTC (rev 1865)
+++ 
trunk/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.hpp
    2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,38 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#pragma once
-
-#include <yade/pkg-common/InteractionGeometryEngineUnit.hpp>
-
-class InteractingBox2InteractingSphere4SpheresContactGeometryWater : public 
InteractionGeometryEngineUnit
-{
-       public :
-               virtual bool go(        const shared_ptr<InteractingGeometry>& 
cm1,
-                                       const shared_ptr<InteractingGeometry>& 
cm2,
-                                       const Se3r& se31,
-                                       const Se3r& se32,
-                                       const shared_ptr<Interaction>& c);
-
-               virtual bool goReverse( const shared_ptr<InteractingGeometry>& 
cm1,
-                                       const shared_ptr<InteractingGeometry>& 
cm2,
-                                       const Se3r& se31,
-                                       const Se3r& se32,
-                                       const shared_ptr<Interaction>& c);
-
-       
REGISTER_CLASS_NAME(InteractingBox2InteractingSphere4SpheresContactGeometryWater);
-       REGISTER_BASE_CLASS_NAME(InteractionGeometryEngineUnit);
-
-       DEFINE_FUNCTOR_ORDER_2D(InteractingBox,InteractingSphere);
-};
-
-REGISTER_SERIALIZABLE(InteractingBox2InteractingSphere4SpheresContactGeometryWater);
-
-

Deleted: trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.cpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.cpp     
2009-07-14 21:03:51 UTC (rev 1865)
+++ trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.cpp     
2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,30 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2006 by luc Scholtes                                    *
-*  [email protected]                                              *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
- 
-#include "InteractingSphere2AABBwater.hpp"
-#include <yade/pkg-common/InteractingSphere.hpp>
-#include <yade/pkg-common/AABB.hpp>
-
-void InteractingSphere2AABBwater::go(    const 
shared_ptr<InteractingGeometry>& cm
-                               , shared_ptr<BoundingVolume>& bv
-                               , const Se3r& se3
-                               , const Body*   )
-{
-       InteractingSphere* sphere = static_cast<InteractingSphere*>(cm.get());
-       AABB* aabb = static_cast<AABB*>(bv.get());
-       
-       aabb->center = se3.position;
-       
-       aabb->halfSize = 
Vector3r(1.5*sphere->radius,1.5*sphere->radius,1.5*sphere->radius);
-       
-       aabb->min = aabb->center-aabb->halfSize;
-       aabb->max = aabb->center+aabb->halfSize;        
-
-}
-       
-YADE_PLUGIN();

Deleted: trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.hpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.hpp     
2009-07-14 21:03:51 UTC (rev 1865)
+++ trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2AABBwater.hpp     
2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,27 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
- 
-#pragma once
-
-#include <yade/pkg-common/BoundingVolumeEngineUnit.hpp>
-
-class InteractingSphere2AABBwater : public BoundingVolumeEngineUnit
-{
-       public :
-               void go(          const shared_ptr<InteractingGeometry>& cm
-                               , shared_ptr<BoundingVolume>& bv
-                               , const Se3r& se3
-                               , const Body*   );
-       FUNCTOR2D(InteractingSphere,AABB);
-       REGISTER_CLASS_NAME(InteractingSphere2AABBwater);
-       REGISTER_BASE_CLASS_NAME(BoundingVolumeEngineUnit);
-};
-
-REGISTER_SERIALIZABLE(InteractingSphere2AABBwater);
-
-

Deleted: 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
===================================================================
--- 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
 2009-07-14 21:03:51 UTC (rev 1865)
+++ 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
 2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,94 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2006 by luc Scholtes                                    *
-*  [email protected]                                              *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#include "InteractingSphere2InteractingSphere4SpheresContactGeometryWater.hpp"
-
-#include <yade/pkg-dem/SpheresContactGeometry.hpp>
-#include <yade/pkg-common/InteractingSphere.hpp>
-
-
-
-bool InteractingSphere2InteractingSphere4SpheresContactGeometryWater::go(      
const shared_ptr<InteractingGeometry>& cm1,
-                                                       const 
shared_ptr<InteractingGeometry>& cm2,
-                                                       const Se3r& se31,
-                                                       const Se3r& se32,
-                                                       const 
shared_ptr<Interaction>& c)
-{
-       InteractingSphere* s1 = static_cast<InteractingSphere*>(cm1.get());
-       InteractingSphere* s2 = static_cast<InteractingSphere*>(cm2.get());
-
-       /// pb ???
-       Vector3r normal = se32.position-se31.position;
-       Real penetrationDepth = s1->radius+s2->radius-normal.Normalize();
-       
-       shared_ptr<SpheresContactGeometry> scm;
-       
-       if (c->interactionGeometry)     
-       {
-               scm = 
dynamic_pointer_cast<SpheresContactGeometry>(c->interactionGeometry);
-       }
-
-       // BEGIN .......  FIXME FIXME   - wrong hack, to make cohesion work.
-       
-       else    
-               
-       scm = shared_ptr<SpheresContactGeometry>(new SpheresContactGeometry());
-               
-               
-//     if (penetrationDepth>0)
-       {
-               scm->contactPoint = 
se31.position+(s1->radius-0.5*penetrationDepth)*normal;//0.5*(pt1+pt2);
-               scm->normal = normal;
-               scm->penetrationDepth = penetrationDepth;
-               scm->radius1 = s1->radius;
-               scm->radius2 = s2->radius;
-               
-               // ?????
-               if (!c->interactionGeometry)
-               c->interactionGeometry = scm;
-       
-       return true;
-               
-       }
-               
-//     else     //d�finition de g�om�trie d'interaction pour le cas ou !contact
-//     {
-//     scm->normal = normal;
-//     scm->penetrationDepth = penetrationDepth;
-//     scm->radius1 = s1->radius;
-//     scm->radius2 = s2->radius;
-//     
-//     //linkGeometry->normal.normalize();
-//     //linkGeometry->radius1 = s1->radius;
-//     //linkGeometry->radius2 = s2->radius;
-//     
-//     if (!c->interactionGeometry)
-//             c->interactionGeometry = scm;
-//             
-//     //if (!c->interactionGeometry)
-//     //      c->interactionGeometry = linkGeometry;
-//     
-//     return true;
-//     //return false;
-//     }
-}
-
-
-
-bool 
InteractingSphere2InteractingSphere4SpheresContactGeometryWater::goReverse(     
  const shared_ptr<InteractingGeometry>& cm1,
-                                                               const 
shared_ptr<InteractingGeometry>& cm2,
-                                                               const Se3r& 
se31,
-                                                               const Se3r& 
se32,
-                                                               const 
shared_ptr<Interaction>& c)
-{
-       return go(cm1,cm2,se31,se32,c);
-}
-
-YADE_PLUGIN();

Deleted: 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.hpp
===================================================================
--- 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.hpp
 2009-07-14 21:03:51 UTC (rev 1865)
+++ 
trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.hpp
 2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,37 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#pragma once
-
-#include <yade/pkg-common/InteractionGeometryEngineUnit.hpp>
-
-class InteractingSphere2InteractingSphere4SpheresContactGeometryWater : public 
InteractionGeometryEngineUnit
-{
-       public :
-               virtual bool go(        const shared_ptr<InteractingGeometry>& 
cm1,
-                                       const shared_ptr<InteractingGeometry>& 
cm2,
-                                       const Se3r& se31,
-                                       const Se3r& se32,
-                                       const shared_ptr<Interaction>& c);
-               virtual bool goReverse( const shared_ptr<InteractingGeometry>& 
cm1,
-                                       const shared_ptr<InteractingGeometry>& 
cm2,
-                                       const Se3r& se31,
-                                       const Se3r& se32,
-                                       const shared_ptr<Interaction>& c);
-
-       FUNCTOR2D(InteractingSphere,InteractingSphere);
-
-       
REGISTER_CLASS_NAME(InteractingSphere2InteractingSphere4SpheresContactGeometryWater);
-       REGISTER_BASE_CLASS_NAME(InteractionGeometryEngineUnit);
-
-       DEFINE_FUNCTOR_ORDER_2D(InteractingSphere,InteractingSphere);
-};
-
-REGISTER_SERIALIZABLE(InteractingSphere2InteractingSphere4SpheresContactGeometryWater);
-
-

Deleted: trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.cpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.cpp     
2009-07-14 21:03:51 UTC (rev 1865)
+++ trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.cpp     
2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,134 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#include "MacroMicroElasticRelationshipsWater.hpp"
-#include <yade/pkg-dem/SpheresContactGeometry.hpp>
-#include <yade/pkg-dem/CapillaryParameters.hpp>
-#include <yade/pkg-dem/ElasticContactInteraction.hpp>
-#include <yade/pkg-dem/SDECLinkGeometry.hpp> // FIXME - I can't dispatch by 
SDECLinkGeometry <-> SpheresContactGeometry !!?
-#include <yade/pkg-dem/SDECLinkPhysics.hpp> // FIXME
-#include <yade/pkg-dem/BodyMacroParameters.hpp>
-#include <yade/core/Omega.hpp>
-#include <yade/core/MetaBody.hpp>
-
-
-MacroMicroElasticRelationshipsWater::MacroMicroElasticRelationshipsWater()
-{
-       alpha   = 2.5;
-       beta    = 2.0;
-       gamma   = 2.65;
-}
-
-
-void MacroMicroElasticRelationshipsWater::registerAttributes()
-{
-       REGISTER_ATTRIBUTE(alpha);
-       REGISTER_ATTRIBUTE(beta);
-       REGISTER_ATTRIBUTE(gamma);
-}
-
-
-void MacroMicroElasticRelationshipsWater::go(    const 
shared_ptr<PhysicalParameters>& b1 // BodyMacroParameters
-                                       , const shared_ptr<PhysicalParameters>& 
b2 // BodyMacroParameters
-                                       , const shared_ptr<Interaction>& 
interaction)
-{
-       BodyMacroParameters* sdec1 = 
static_cast<BodyMacroParameters*>(b1.get());
-       BodyMacroParameters* sdec2 = 
static_cast<BodyMacroParameters*>(b2.get());
-       SpheresContactGeometry* interactionGeometry = 
static_cast<SpheresContactGeometry*>(interaction->interactionGeometry.get());
-       
-       if(interactionGeometry) // so it is SpheresContactGeometry  - NON 
PERMANENT LINK
-       {
-
-/* OLD VERSION  this is a LinearContactModel, different class, model different 
that MicroMacroElasticRelationships
-another would be HerzMindlinContactModel
-
-               shared_ptr<ElasticContactInteraction> contactPhysics;
-               
-               if ( interaction->isNew)
-               {
-                       interaction->interactionPhysics = 
shared_ptr<ElasticContactInteraction>(new ElasticContactInteraction());
-                       contactPhysics = 
dynamic_pointer_cast<ElasticContactInteraction>(interaction->interactionPhysics);
-                       
-                       contactPhysics->initialKn                       = 
2*(sdec1->kn*sdec2->kn)/(sdec1->kn+sdec2->kn);
-                       contactPhysics->initialKs                       = 
2*(sdec1->ks*sdec2->ks)/(sdec1->ks+sdec2->ks);
-                       contactPhysics->prevNormal                      = 
interactionGeometry->normal;
-                       contactPhysics->initialEquilibriumDistance      = 
interactionGeometry->radius1+interactionGeometry->radius2;
-               }
-               else
-                       contactPhysics = 
dynamic_pointer_cast<ElasticContactInteraction>(interaction->interactionPhysics);
-               
-               contactPhysics->kn = contactPhysics->initialKn;
-               contactPhysics->ks = contactPhysics->initialKs;
-               contactPhysics->equilibriumDistance = 
contactPhysics->initialEquilibriumDistance;
-*/
-               if(!interaction->interactionPhysics)
-               {
-                       interaction->interactionPhysics = 
shared_ptr<CapillaryParameters>(new CapillaryParameters());
-                       CapillaryParameters* contactPhysics = 
static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
-
-                       Real Ea         = sdec1->young;
-                       Real Eb         = sdec2->young;
-                       //Real Va       = sdec1->poisson;
-                       //Real Vb       = sdec2->poisson;
-                       Real Da         = interactionGeometry->radius1; // 
FIXME - multiply by factor of sphere interaction distance (so sphere intaracts 
at bigger range that its geometrical size)
-                       Real Db         = interactionGeometry->radius2; // 
FIXME - as above
-                       Real fa         = sdec1->frictionAngle;
-                       Real fb         = sdec2->frictionAngle;
-
-                       //Real Eab      = 2*Ea*Eb/(Ea+Eb);
-                       //Real Vab      = 2*Va*Vb/(Va+Vb);
-
-                       Real Dinit      = Da+Db;                        // 
FIXME - is it just a sum?
-                       //Real Sinit    = Mathr::PI * std::pow( std::min(Da,Db) 
, 2);
-
-                       //Real Kn                                               
= (Eab*Sinit/Dinit)*( (1+alpha)/(beta*(1+Vab) + gamma*(1-alpha*Vab) ) );
-                       Real ksOnkn = 0.5;
-                       Real Kn = 4*Ea*Da*Eb*Db/(2*(Ea*Da+Eb*Db));//harmonic 
average of two stiffnesses
-//cerr << "Kn: " << Kn << endl;
-                       contactPhysics->initialKn                       = Kn;
-                       //contactPhysics->initialKs                     = 
Kn*(1-alpha*Vab)/(1+Vab);
-                       contactPhysics->initialKs                       = 
Kn*ksOnkn;
-//cerr << "Ks: " <<       contactPhysics->initialKs                    << endl;
-                       //contactPhysics->frictionAngle                 = 
(fa+fb)*0.5; // FIXME - this is actually a waste of memory space, just like 
initialKs and initialKn
-                       contactPhysics->frictionAngle                   = 
std::min(fa,fb);
-                       contactPhysics->tangensOfFrictionAngle          = 
std::tan(contactPhysics->frictionAngle); 
-
-                       contactPhysics->prevNormal                      = 
interactionGeometry->normal;
-                       contactPhysics->initialEquilibriumDistance      = 
Dinit;                        
-
-                       contactPhysics->kn = contactPhysics->initialKn;
-                       contactPhysics->ks = contactPhysics->initialKs;
-                       contactPhysics->equilibriumDistance = 
contactPhysics->initialEquilibriumDistance;
-
-               }
-               else
-               {       // FIXME - are those lines necessary ???? what they are 
doing in fact ???
-                       CapillaryParameters* contactPhysics = 
static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
-
-                       contactPhysics->kn = contactPhysics->initialKn;
-                       contactPhysics->ks = contactPhysics->initialKs;
-                       contactPhysics->equilibriumDistance = 
contactPhysics->initialEquilibriumDistance;
-               }       
-               
-       }
-       else   // this is PERMANENT LINK because previous static_cast failed, 
dispatcher should do this job
-       {
-               SDECLinkGeometry* sdecLinkGeometry =  
static_cast<SDECLinkGeometry*>(interaction->interactionGeometry.get());
-               if (sdecLinkGeometry)
-               {               
-                       SDECLinkPhysics* linkPhysics = 
static_cast<SDECLinkPhysics*>(interaction->interactionPhysics.get());
-       //              linkPhysics->frictionAngle              = ?? //FIXME - 
uninitialized 
-                       linkPhysics->kn                         = 
linkPhysics->initialKn;
-                       linkPhysics->ks                         = 
linkPhysics->initialKs;
-                       linkPhysics->equilibriumDistance        = 
linkPhysics->initialEquilibriumDistance;
-               }
-       }
-};
-YADE_PLUGIN();

Deleted: trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.hpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.hpp     
2009-07-14 21:03:51 UTC (rev 1865)
+++ trunk/pkg/dem/Engine/EngineUnit/MacroMicroElasticRelationshipsWater.hpp     
2009-07-14 23:42:58 UTC (rev 1866)
@@ -1,38 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*                                                                        *
-*  This program is free software; it is licensed under the terms of the  *
-*  GNU General Public License v2 or later. See file LICENSE for details. *
-*************************************************************************/
-
-#pragma once
-
-#include <yade/pkg-common/InteractionPhysicsEngineUnit.hpp>
-
-class MacroMicroElasticRelationshipsWater : public InteractionPhysicsEngineUnit
-{
-       public :
-               Real             alpha
-                               ,beta
-                               ,gamma;
-
-               MacroMicroElasticRelationshipsWater();
-
-               virtual void go(        const shared_ptr<PhysicalParameters>& 
b1,
-                                       const shared_ptr<PhysicalParameters>& 
b2,
-                                       const shared_ptr<Interaction>& 
interaction);
-
-       protected :
-               virtual void registerAttributes();
-
-       FUNCTOR2D(BodyMacroParameters,BodyMacroParameters);
-       
-       REGISTER_CLASS_NAME(MacroMicroElasticRelationshipsWater);
-       REGISTER_BASE_CLASS_NAME(InteractionPhysicsEngineUnit);
-
-};
-
-REGISTER_SERIALIZABLE(MacroMicroElasticRelationshipsWater);
-
-

Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-07-14 21:03:51 UTC (rev 
1865)
+++ trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-07-14 23:42:58 UTC (rev 
1866)
@@ -1,9 +1,5 @@
 /*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*  Copyright (C) 2007 by Bruno Chareyre                                        
 *
+*  Copyright (C) 2006 by Bruno Chareyre                                        
 *
 *  [email protected]                                            *
 *                                                                        *
 *  This program is free software; it is licensed under the terms of the  *

Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.hpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTest.hpp 2009-07-14 21:03:51 UTC (rev 
1865)
+++ trunk/pkg/dem/PreProcessor/TriaxialTest.hpp 2009-07-14 23:42:58 UTC (rev 
1866)
@@ -1,9 +1,5 @@
 /*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*  Copyright (C) 2007 by Bruno Chareyre                                        
 *
+*  Copyright (C) 2006 by Bruno Chareyre                                        
 *
 *  [email protected]                                            *
 *                                                                        *
 *  This program is free software; it is licensed under the terms of the  *

Modified: trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp    2009-07-14 21:03:51 UTC 
(rev 1865)
+++ trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp    2009-07-14 23:42:58 UTC 
(rev 1866)
@@ -1,10 +1,8 @@
 /*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*  Copyright (C) 2007 by Bruno Chareyre                                        
 *
+*  Copyright (C) 2006 by Bruno Chareyre                                        
 *
 *  [email protected]                                            *
+*  Copyright (C) 2006 by luc Scholtes                                    *
+*  [email protected]                                              *
 *                                                                        *
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *

Modified: trunk/pkg/dem/PreProcessor/TriaxialTestWater.hpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTestWater.hpp    2009-07-14 21:03:51 UTC 
(rev 1865)
+++ trunk/pkg/dem/PreProcessor/TriaxialTestWater.hpp    2009-07-14 23:42:58 UTC 
(rev 1866)
@@ -1,10 +1,8 @@
 /*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  [email protected]                                               *
-*  Copyright (C) 2004 by Janek Kozicki                                   *
-*  [email protected]                                                    *
-*  Copyright (C) 2007 by Bruno Chareyre                                        
 *
+*  Copyright (C) 2006 by Bruno Chareyre                                        
 *
 *  [email protected]                                            *
+*  Copyright (C) 2006 by luc Scholtes                                    *
+*  [email protected]                                              *
 *                                                                        *
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *

Modified: trunk/pkg/dem/SConscript
===================================================================
--- trunk/pkg/dem/SConscript    2009-07-14 21:03:51 UTC (rev 1865)
+++ trunk/pkg/dem/SConscript    2009-07-14 23:42:58 UTC (rev 1866)
@@ -849,35 +849,6 @@
                ['DataClass/InteractionPhysics/CapillaryParameters.cpp'],
                LIBS=env['LIBS']+['ElasticContactInteraction']),
 
-#env.SharedLibrary('InteractingSphere2InteractingSphere4SpheresContactGeometryWater',
-               
#['Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp'],
-               #LIBS=env['LIBS']+['SpheresContactGeometry',
-                       #'InteractionGeometryMetaEngine',
-                       #'InteractingSphere' ]),
-
-#env.SharedLibrary('InteractingBox2InteractingSphere4SpheresContactGeometryWater',
-               
#['Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometryWater.cpp'],
-               #LIBS=env['LIBS']+['SpheresContactGeometry',
-                       #'InteractionGeometryMetaEngine',
-                       #'InteractingSphere',
-                       #'InteractingBox' ]),
-
-#env.SharedLibrary('MacroMicroElasticRelationshipsWater',
-               #['Engine/EngineUnit/MacroMicroElasticRelationshipsWater.cpp'],
-               #LIBS=env['LIBS']+['SDECLinkPhysics',
-                       #'SDECLinkGeometry',
-                       #'ElasticContactInteraction',
-                       #'SpheresContactGeometry',
-                       #'BodyMacroParameters',
-                       #'RigidBodyParameters',
-                       #'ParticleParameters',
-                       #'InteractionPhysicsMetaEngine',
-                       #'CapillaryParameters']),
-
-#env.SharedLibrary('InteractingSphere2AABBwater',
-               #['Engine/EngineUnit/InteractingSphere2AABBwater.cpp'],
-               #LIBS=env['LIBS']+['InteractingSphere', 'AABB', 
'BoundingVolumeMetaEngine']),
-               
 env.SharedLibrary('HydraulicForceEngine',
                ['Engine/DeusExMachina/HydraulicForceEngine.cpp'],
                LIBS=env['LIBS']+['yade-base',   'ParticleParameters', 
'CohesiveFrictionalBodyParameters', 'TriaxialCompressionEngine', 
'GravityEngines'],


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to