yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03148
[Branch ~yade-dev/yade/trunk] Rev 1987: 1. Add new python wrapper to a few more classes.
------------------------------------------------------------
revno: 1987
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-01-23 11:53:12 +0100
message:
1. Add new python wrapper to a few more classes.
2. Make python's executable have real python path in the #! line at the beginning (that is, the same python interpreter used for running scons)
modified:
SConstruct
core/main/main.py.in
core/main/yade-multi.in
pkg/common/DataClass/Shape/Facet.hpp
pkg/common/DataClass/Shape/Sphere.hpp
pkg/dem/Engine/GlobalEngine/NewtonIntegrator.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-01-22 21:07:37 +0000
+++ SConstruct 2010-01-23 10:53:12 +0000
@@ -340,6 +340,8 @@
and conf.CheckIPython() # not needed now: and conf.CheckScientificPython()
and CheckLib_maybeMT(conf,'boost_python','boost/python.hpp','c++','boost::python::scope();')
and conf.CheckCXXHeader(['Python.h','numpy/ndarrayobject.h'],'<>'))
+ # for installable stript's shebang ( http://en.wikipedia.org/wiki/Shebang_(Unix) )
+ env['pyExecutable']=sys.executable
if not ok:
print "\nOne of the essential libraries above was not found, unable to continue.\n\nCheck `%s' for possible causes, note that there are options that you may need to customize:\n\n"%(buildDir+'/config.log')+opts.GenerateHelpText(env)
=== modified file 'core/main/main.py.in'
--- core/main/main.py.in 2010-01-21 20:30:54 +0000
+++ core/main/main.py.in 2010-01-23 10:53:12 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!${pyExecutable}
# encoding: utf-8
# syntax:python
=== modified file 'core/main/yade-multi.in'
--- core/main/yade-multi.in 2010-01-11 22:39:05 +0000
+++ core/main/yade-multi.in 2010-01-23 10:53:12 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!${pyExecutable}
#Â encoding: utf-8
#
# portions © 2008 Václav Šmilauer <eudoxos@xxxxxxxx>
=== modified file 'pkg/common/DataClass/Shape/Facet.hpp'
--- pkg/common/DataClass/Shape/Facet.hpp 2009-12-13 20:30:13 +0000
+++ pkg/common/DataClass/Shape/Facet.hpp 2010-01-23 10:53:12 +0000
@@ -45,17 +45,16 @@
vector<Real> edgeAdjHalfAngle;
#endif
- DECLARE_LOGGER;
+ void postProcessAttributes(bool deserializing);
- REGISTER_ATTRIBUTES(Shape,(vertices)
+ YADE_CLASS_BASE_DOC_ATTRS(Facet,Shape,"Facet (triangular particle) geometry.",
+ ((vertices,"Vertex positions in local coordinates."))
#ifdef FACET_TOPO
- (edgeAdjIds)(edgeAdjHalfAngle)
+ ((edgeAdjIds,"Facet id's that are adjacent to respective edges [experimental]"))
+ ((edgeAdjHalfAngle,"half angle between normals of this facet and the adjacent facet [experimental]"))
#endif
);
- protected: void postProcessAttributes(bool deserializing);
- REGISTER_CLASS_NAME(Facet);
- REGISTER_BASE_CLASS_NAME(Shape);
-
+ DECLARE_LOGGER;
REGISTER_CLASS_INDEX(Facet,Shape);
};
=== modified file 'pkg/common/DataClass/Shape/Sphere.hpp'
--- pkg/common/DataClass/Shape/Sphere.hpp 2009-12-17 07:13:18 +0000
+++ pkg/common/DataClass/Shape/Sphere.hpp 2010-01-23 10:53:12 +0000
@@ -19,10 +19,11 @@
Sphere(Real _radius): radius(_radius){ createIndex(); }
virtual ~Sphere ();
- REGISTER_ATTRIBUTES(Shape,(radius));
- REGISTER_CLASS_NAME(Sphere);
- REGISTER_BASE_CLASS_NAME(Shape);
+ YADE_CLASS_BASE_DOC_ATTRS(Sphere,Shape,"Geometry of spherical particle.",
+ ((radius,"Radius [m]"))
+ );
REGISTER_CLASS_INDEX(Sphere,Shape);
+
};
REGISTER_SERIALIZABLE(Sphere);
=== modified file 'pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp'
--- pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp 2009-12-26 21:57:37 +0000
+++ pkg/dem/Engine/GlobalEngine/NewtonIntegrator.hpp 2010-01-23 10:53:12 +0000
@@ -80,9 +80,12 @@
threadMaxVelocitySq.resize(omp_get_max_threads());
#endif
}
-
- REGISTER_ATTRIBUTES(GlobalEngine,(damping)(maxVelocitySq)(exactAsphericalRot)(homotheticCellResize));
- REGISTER_CLASS_AND_BASE(NewtonIntegrator,GlobalEngine);
+ YADE_CLASS_BASE_DOC_ATTRS(NewtonIntegrator,GlobalEngine,"Engine integrating newtonian motion equations.",
+ ((damping,"damping coefficient for Cundall's non viscous damping [-]"))
+ ((maxVelocitySq,"store square of max. velocity, for informative purposes; computed again at every step. Updated automatically."))
+ ((exactAsphericalRot,"Enable of the exact aspherical body rotation integrator"))
+ ((homotheticCellResize,"Enable artificially moving all bodies with the periodic cell, such that its resizes are isotropic. 0: disabled (default), 1: position update, 2: velocity update."))
+ );
DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(NewtonIntegrator);