← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2002: 1. Removed TranslationEngineEigen

 

------------------------------------------------------------
revno: 2002
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-02-03 11:23:02 +0100
message:
  1. Removed TranslationEngineEigen
  2. TranslationEngine and PressTestEngine were updated according to a new register standard
  2. In SConstruct were added some more Eigen headers to check.
removed:
  pkg/common/Engine/PartialEngine/TranslationEngineEigen.cpp
  pkg/common/Engine/PartialEngine/TranslationEngineEigen.hpp
modified:
  SConstruct
  pkg/common/Engine/PartialEngine/PressTestEngine.hpp
  pkg/common/Engine/PartialEngine/TranslationEngine.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 'SConstruct'
--- SConstruct	2010-02-02 11:05:09 +0000
+++ SConstruct	2010-02-03 10:23:02 +0000
@@ -378,6 +378,8 @@
 		ok=conf.CheckCXXHeader('Eigen/Core')
 		ok=conf.CheckCXXHeader('Eigen/Array')
 		ok=conf.CheckCXXHeader('Eigen/Geometry')
+		ok=conf.CheckCXXHeader('Eigen/Cholesky')
+		ok=conf.CheckCXXHeader('Eigen/LU')
 		if not ok: featureNotOK('eigen',note="You might have to add eigen header directory (e.g. /usr/include/eigen2) to CPPPATH.")
 
 	if env['useMiniWm3']: env.Append(LIBS='miniWm3',CPPDEFINES=['MINIWM3'])

=== modified file 'pkg/common/Engine/PartialEngine/PressTestEngine.hpp'
--- pkg/common/Engine/PartialEngine/PressTestEngine.hpp	2009-12-09 17:11:51 +0000
+++ pkg/common/Engine/PartialEngine/PressTestEngine.hpp	2010-02-03 10:23:02 +0000
@@ -13,24 +13,16 @@
 	public:
 		enum motionDirection {forward, backward, stop};
 		motionDirection curentDirection;
-		Real currentVerticalForce, maxVerticalForce, minimalForce, predictedForce, minimalPredictedForce, riseUpPressHigher;
-		long int numberIterationAfterDestruction, currentIterationAfterDestruction;
+		Real currentVerticalForce, maxVerticalForce, minimalForce, minimalPredictedForce;
+		long int currentIterationAfterDestruction;
 		int pressVelocityForw2Back;
-		PressTestEngine(): 
-			curentDirection(forward), 
-			currentVerticalForce(0), 
-			maxVerticalForce(0), 
-			minimalForce(0), 
-			predictedForce(0), 
-			minimalPredictedForce(0),
-			riseUpPressHigher(1),
-			numberIterationAfterDestruction (0),
-			currentIterationAfterDestruction(0), 
-			pressVelocityForw2Back(25) {};
 		virtual ~PressTestEngine(){};
 		virtual void applyCondition(Scene*);
-	REGISTER_CLASS_AND_BASE(PressTestEngine,TranslationEngine);
-	REGISTER_ATTRIBUTES(TranslationEngine, (numberIterationAfterDestruction) (predictedForce) (riseUpPressHigher));
+		YADE_CLASS_BASE_DOC_ATTRDECL_CTOR_PY(PressTestEngine,TranslationEngine,"This engines simulates the _press-test_ for uniaxial tests.",((long int,numberIterationAfterDestruction,0,"The number of iterations, which will be carry out after destruction [-]"))
+			((Real,predictedForce,0,"The minimal force, after what the engine will look for a destruction [N]"))
+			((long int,riseUpPressHigher,1,"After destruction press rises up. This is the relationship between initial press velocity and _returning back_ velocity [-]")),curentDirection=forward;currentVerticalForce=0;maxVerticalForce=0;minimalForce=0;minimalPredictedForce=0;currentIterationAfterDestruction=0;pressVelocityForw2Back=25;,);
+			
+			
 	DECLARE_LOGGER;
 };
 REGISTER_SERIALIZABLE(PressTestEngine);

=== modified file 'pkg/common/Engine/PartialEngine/TranslationEngine.hpp'
--- pkg/common/Engine/PartialEngine/TranslationEngine.hpp	2009-12-09 17:11:51 +0000
+++ pkg/common/Engine/PartialEngine/TranslationEngine.hpp	2010-02-03 10:23:02 +0000
@@ -13,12 +13,11 @@
 
 class TranslationEngine : public PartialEngine {
 	public:
-		Real velocity;
-		Vector3r translationAxis;
 		virtual void applyCondition(Scene *);
 		virtual void postProcessAttributes(bool deserializing){ if(deserializing) translationAxis.Normalize(); }
-	REGISTER_ATTRIBUTES(PartialEngine,(velocity)(translationAxis));
-	REGISTER_CLASS_AND_BASE(TranslationEngine,PartialEngine);
+	YADE_CLASS_BASE_DOC_ATTRDECL_CTOR_PY(TranslationEngine,PartialEngine,"This engine is the base class for different engines, which require any kind of motion.",
+		((Real,velocity,,"Velocity [m/s]"))
+		((Vector3r,translationAxis,,"Direction [Vector3]")),,);
 };
 REGISTER_SERIALIZABLE(TranslationEngine);
 

=== removed file 'pkg/common/Engine/PartialEngine/TranslationEngineEigen.cpp'
--- pkg/common/Engine/PartialEngine/TranslationEngineEigen.cpp	2010-01-21 16:39:18 +0000
+++ pkg/common/Engine/PartialEngine/TranslationEngineEigen.cpp	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  olivier.galizzi@xxxxxxx                                               *
-*                                                                        *
-*  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"TranslationEngineEigen.hpp"
-#include<yade/core/Scene.hpp>
-
-void TranslationEngineEigen::applyCondition(Scene * ncb){
-	Real dt=Omega::instance().getTimeStep();
-	FOREACH(body_id_t id,subscribedBodies){
-		assert(id<(body_id_t)ncb->bodies->size());
-		Body* b=Body::byId(id,ncb).get();
-		if(!b) continue;
-		b->state->pos+=dt*velocity*translationAxis;
-		b->state->vel=velocity*translationAxis;
-	}
-}
-
-YADE_PLUGIN((TranslationEngineEigen));
-YADE_REQUIRE_FEATURE(eigen)

=== removed file 'pkg/common/Engine/PartialEngine/TranslationEngineEigen.hpp'
--- pkg/common/Engine/PartialEngine/TranslationEngineEigen.hpp	2010-01-21 16:39:18 +0000
+++ pkg/common/Engine/PartialEngine/TranslationEngineEigen.hpp	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-/*************************************************************************
-*  Copyright (C) 2004 by Olivier Galizzi                                 *
-*  olivier.galizzi@xxxxxxx                                               *
-*                                                                        *
-*  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/core/PartialEngine.hpp>
-#include<yade/lib-base/yadeWm3.hpp>
-
-class TranslationEngineEigen : public PartialEngine {
-	public:
-		Real velocity;
-		Vector3r translationAxis;
-		virtual void applyCondition(Scene *);
-		virtual void postProcessAttributes(bool deserializing){ if(deserializing) translationAxis.Normalize(); }
-	REGISTER_ATTRIBUTES(PartialEngine,(velocity)(translationAxis));
-	REGISTER_CLASS_AND_BASE(TranslationEngineEigen,PartialEngine);
-};
-REGISTER_SERIALIZABLE(TranslationEngineEigen);
-
-YADE_REQUIRE_FEATURE(eigen)
-