yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12607
[Branch ~yade-pkg/yade/git-trunk] Rev 3833: Fix in TesselationWrapper: allow the tesselation to compute right triangulation in the boundaries...
------------------------------------------------------------
revno: 3833
committer: Francois <francois.kneib@xxxxxxxxx>
timestamp: Mon 2016-04-11 11:50:55 +0200
message:
Fix in TesselationWrapper: allow the tesselation to compute right triangulation in the boundaries of a periodic boundaries conditions simulation.
modified:
pkg/dem/TesselationWrapper.cpp
--
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/TesselationWrapper.cpp'
--- pkg/dem/TesselationWrapper.cpp 2016-04-11 07:10:39 +0000
+++ pkg/dem/TesselationWrapper.cpp 2016-04-11 09:50:55 +0000
@@ -70,11 +70,13 @@
int nonSpheres =0;
shared_ptr<Sphere> sph (new Sphere);
int Sph_Index = sph->getClassIndexStatic();
+ Scene* scene = Omega::instance().getScene().get();
for (; bi!=biEnd ; ++bi) {
if ( (*bi)->shape->getClassIndex() == Sph_Index ) {
-// if ((*bi)->isDynamic()) { //then it is a sphere (not a wall) FIXME : need test if isSphere
const Sphere* s = YADE_CAST<Sphere*> ((*bi)->shape.get());
- const Vector3r& pos = (*bi)->state->pos;
+//FIXME: is the scene periodicity verification useful in the next line ? Tesselation seems to work in both periodic and non-periodic conditions with "scene->cell->wrapShearedPt((*bi)->state->pos)". I keep the verification to be consistent with all other uses of "wrapShearedPt" function.
+ const Vector3r& pos = Omega::instance().getScene().get()->isPeriodic ? scene->cell->wrapShearedPt((*bi)->state->pos)
+ : (*bi)->state->pos;
const Real rad = s->radius;
CGT::Sphere sp(CGT::Point(pos[0],pos[1],pos[2]),rad*rad);
spheres.push_back(sp);