← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3883: introduce CellInfo::getInfo() for more generic interpolation between triangulations

 

------------------------------------------------------------
revno: 3883
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Thu 2014-04-03 15:07:09 +0200
message:
  introduce CellInfo::getInfo() for more generic interpolation between triangulations
modified:
  lib/triangulation/FlowBoundingSphere.ipp
  pkg/dem/FlowEngine.hpp
  pkg/dem/PeriodicFlowEngine.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-03-21 18:47:45 +0000
+++ lib/triangulation/FlowBoundingSphere.ipp	2014-04-03 13:07:09 +0000
@@ -419,7 +419,8 @@
 			center=CVector(coord==0?boundPos:center[0],coord==1?boundPos:center[1],coord==2?boundPos:center[2]);
 		}
                 oldCell = Tri.locate(Point(center[0],center[1],center[2]));
-                newCell->info().p() = oldCell->info().shiftedP();
+		newCell->info().getInfo(oldCell->info());
+//                 newCell->info().p() = oldCell->info().shiftedP();
         }
 //  	Tes.Clear();//Don't reset to avoid segfault when getting pressure in scripts just after interpolation
 }

=== modified file 'pkg/dem/FlowEngine.hpp'
--- pkg/dem/FlowEngine.hpp	2014-04-01 13:18:38 +0000
+++ pkg/dem/FlowEngine.hpp	2014-04-03 13:07:09 +0000
@@ -405,14 +405,15 @@
 	inline Real& dv (void) {return volumeVariation;}
 	inline int& fictious (void) {return fict;}
 	inline double& p (void) {return pression;}
-	//For compatibility with the periodic case
-	inline const double shiftedP (void) const {return pression;}
+	inline const double shiftedP (void) const {return pression;} //For compatibility with the periodic case
 	inline const std::vector<double>& kNorm (void) const {return modulePermeability;}
 	inline std::vector<double>& kNorm (void) {return modulePermeability;}
 	inline std::vector< CVector >& facetSurf (void) {return facetSurfaces;}
 	inline std::vector<CVector>& force (void) {return cellForce;}
 	inline std::vector<double>& Rh (void) {return rayHydr;}
 	inline CVector& averageVelocity (void) {return averageCellVelocity;}
+	//used for transfering values between two triangulations, overload with more variables in derived classes (see e.g. SoluteFlow)
+	inline void getInfo(const FlowCellInfo& otherCellInfo) {p()=otherCellInfo.shiftedP();} 
 };
 
 class FlowVertexInfo : public CGT::SimpleVertexInfo {

=== modified file 'pkg/dem/PeriodicFlowEngine.hpp'
--- pkg/dem/PeriodicFlowEngine.hpp	2014-04-01 13:18:38 +0000
+++ pkg/dem/PeriodicFlowEngine.hpp	2014-04-03 13:07:09 +0000
@@ -59,7 +59,6 @@
 #else
 #define _PeriFlowSolver CGT::PeriodicFlow<PeriFlowTesselation>
 #endif
-//CGT::PeriodicFlowLinSolv<CGT::PeriodicTesselation<CGT::_Tesselation<TriangulationTypes<PeriodicVertexInfo,PeriodicCellInfo> > > >
 
 typedef TemplateFlowEngine<	PeriodicCellInfo,
 				PeriodicVertexInfo,