← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1826: 1. Remove implementation of global functions from Tetra.hpp to Tetra.cpp (gave errors on linking ...

 

------------------------------------------------------------
revno: 1826
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Mon 2009-11-30 10:58:09 +0100
message:
  1. Remove implementation of global functions from Tetra.hpp to Tetra.cpp (gave errors on linking multiple objects including that same header.)
  2. Add Body().geom as alias for (now deprecated?) Body().mold 
modified:
  pkg/dem/meta/Tetra.cpp
  pkg/dem/meta/Tetra.hpp
  py/yadeWrapper/yadeWrapper.cpp
  yadeSCons.py


--
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/dem/meta/Tetra.cpp'
--- pkg/dem/meta/Tetra.cpp	2009-11-29 11:03:25 +0000
+++ pkg/dem/meta/Tetra.cpp	2009-11-30 09:58:09 +0000
@@ -598,3 +598,7 @@
 	#undef v3
 }
 
+
+Real TetrahedronVolume(const Vector3r v[4]) { return fabs((Vector3r(v[3])-Vector3r(v[0])).Dot((Vector3r(v[3])-Vector3r(v[1])).Cross(Vector3r(v[3])-Vector3r(v[2]))))/6.; }
+Real TetrahedronVolume(const vector<Vector3r>& v) { return fabs(Vector3r(v[1]-v[0]).Dot(Vector3r(v[2]-v[0]).Cross(v[3]-v[0])))/6.; }
+

=== modified file 'pkg/dem/meta/Tetra.hpp'
--- pkg/dem/meta/Tetra.hpp	2009-11-25 21:21:17 +0000
+++ pkg/dem/meta/Tetra.hpp	2009-11-30 09:58:09 +0000
@@ -143,8 +143,8 @@
 // Miscillaneous functions
 //! Tetrahedron's volume.
 /// http://en.wikipedia.org/wiki/Tetrahedron#Surface_area_and_volume
-Real TetrahedronVolume(const Vector3r v[4]){ return fabs((Vector3r(v[3])-Vector3r(v[0])).Dot((Vector3r(v[3])-Vector3r(v[1])).Cross(Vector3r(v[3])-Vector3r(v[2]))))/6.; }
-Real TetrahedronVolume(const vector<Vector3r>& v){ return fabs(Vector3r(v[1]-v[0]).Dot(Vector3r(v[2]-v[0]).Cross(v[3]-v[0])))/6.; }
+Real TetrahedronVolume(const Vector3r v[4]);
+Real TetrahedronVolume(const vector<Vector3r>& v);
 Matrix3r TetrahedronInertiaTensor(const vector<Vector3r>& v);
 //Matrix3r TetrahedronInertiaTensor(const Vector3r v[4]);
 Matrix3r TetrahedronCentralInertiaTensor(const vector<Vector3r>& v);

=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp	2009-11-30 08:48:32 +0000
+++ py/yadeWrapper/yadeWrapper.cpp	2009-11-30 09:58:09 +0000
@@ -845,6 +845,7 @@
 
 	EXPOSE_CXX_CLASS(Body)
 		.def_readwrite("mold",&Body::interactingGeometry)
+		.def_readwrite("geom",&Body::interactingGeometry)
 		.def_readwrite("bound",&Body::boundingVolume)
 		.def_readwrite("mat",&Body::material)
 		.def_readwrite("state",&Body::state)

=== modified file 'yadeSCons.py'
--- yadeSCons.py	2009-11-30 08:48:32 +0000
+++ yadeSCons.py	2009-11-30 09:58:09 +0000
@@ -135,9 +135,6 @@
 	ret.discard(p.obj)
 	return ret
 
-def seqChunks(l,n):
-    return [l[i:i+n] for i in range(0, len(l), n)]
-
 def buildPluginLibs(env,plugInfo):
 	objs={}
 	linkStrategy=env['linkStrategy']


Follow ups