yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10738
[Branch ~yade-pkg/yade/git-trunk] Rev 3924: initialize CellInfo members (avoids hardly detectable bugs) + remove artifact facets from loop wh...
------------------------------------------------------------
revno: 3924
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Tue 2014-04-15 18:39:53 +0200
message:
initialize CellInfo members (avoids hardly detectable bugs) + remove artifact facets from loop when cell1==cell2
modified:
lib/triangulation/FlowBoundingSphere.ipp
pkg/pfv/FlowEngine.hpp
--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp 2014-04-07 09:33:19 +0000
+++ lib/triangulation/FlowBoundingSphere.ipp 2014-04-15 16:39:53 +0000
@@ -609,8 +609,8 @@
vector<double> constrictions;
for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
//in the periodic case, we skip facets with lowest id out of the base period
- if ( ((f_it->first->info().index < f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
- || ((f_it->first->info().index > f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
+ if ( ((f_it->first->info().index <= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
+ || ((f_it->first->info().index >= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
|| f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
constrictions.push_back(computeEffectiveRadius(f_it->first, f_it->second));
}
@@ -624,8 +624,8 @@
vector<Constriction> constrictions;
for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
//in the periodic case, we skip facets with lowest id out of the base period
- if ( ((f_it->first->info().index < f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
- || ((f_it->first->info().index > f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
+ if ( ((f_it->first->info().index <= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
+ || ((f_it->first->info().index >= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
|| f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
vector<double> rn;
const CVector& normal = f_it->first->info().facetSurfaces[f_it->second];
=== modified file 'pkg/pfv/FlowEngine.hpp'
--- pkg/pfv/FlowEngine.hpp 2014-04-07 09:33:19 +0000
+++ pkg/pfv/FlowEngine.hpp 2014-04-15 16:39:53 +0000
@@ -385,11 +385,11 @@
FlowCellInfo (void)
{
modulePermeability.resize(4, 0);
- cellForce.resize(4);
- facetSurfaces.resize(4);
- facetFluidSurfacesRatio.resize(4);
- facetSphereCrossSections.resize(4);
- unitForceVectors.resize(4);
+ cellForce.resize(4,CGAL::NULL_VECTOR);
+ facetSurfaces.resize(4,CGAL::NULL_VECTOR);
+ facetFluidSurfacesRatio.resize(4,0);
+ facetSphereCrossSections.resize(4,CGAL::NULL_VECTOR);
+ unitForceVectors.resize(4,CGAL::NULL_VECTOR);
for (int k=0; k<4;k++) for (int l=0; l<3;l++) solidSurfaces[k][l]=0;
rayHydr.resize(4, 0);
invSumK=index=volumeSign=s=volumeVariation=pression=invVoidV=fict=0;