Re: [Yade-dev] ViscoElastic test
2014-04-03 9:51 GMT+02:00 François : > It will for sure break my scripts, as I used massMultiply=0. But your > implementation is part of my "todo list", which I can remove now :-) > You have made huge changes at once, so I need a little bit of time to check > everything. What I can see now is that you use "isnormal(r)" function into > the Ip2, which returns false if r==0. It will be a problem, for example if > we want to set cn, but cs=0 (same matter for en and et). I just wanted to check, that it is not(isnan). Thank for notice, will change to not(isnan). I think you can just remove massmultiply from your scripts and it should work fine. Anton ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] ViscoElastic test
Hi, and thank you for warning me. It will for sure break my scripts, as I used massMultiply=0. But your implementation is part of my "todo list", which I can remove now :-) You have made huge changes at once, so I need a little bit of time to check everything. What I can see now is that you use "isnormal(r)" function into the Ip2, which returns false if r==0. It will be a problem, for example if we want to set cn, but cs=0 (same matter for en and et). François 2014-04-03 8:15 GMT+02:00 Anton Gladky : > Hi Francois, > > could you, please, test the latest git-version of Yade especially > your scripts with ViscoElastic model? I have done there some > changes, but I believe, that your code is not broken. > > If you want, we can also implement MatchMaker for some of > variables, like it is already done for tc, en and et. > > Regards > > Anton > ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] ViscoElastic test
2014-04-03 10:00 GMT+02:00 Anton Gladky : > 2014-04-03 9:51 GMT+02:00 François : > > It will for sure break my scripts, as I used massMultiply=0. But your > > implementation is part of my "todo list", which I can remove now :-) > > You have made huge changes at once, so I need a little bit of time to > check > > everything. What I can see now is that you use "isnormal(r)" function > into > > the Ip2, which returns false if r==0. It will be a problem, for example > if > > we want to set cn, but cs=0 (same matter for en and et). > > I just wanted to check, that it is not(isnan). Thank for notice, will > change to > not(isnan). > Yes that's what I supposed. > > I think you can just remove massmultiply from your scripts and it should > work > fine. > I will re-check everything and see whether I am consistent with the current implementation. You can delete the "massmultiply" argument in the "contactParameterCalculation" function, as it's not used any more. > Anton > François ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Bug 1300167] Re: (Not) Defining velocities in UniaxialStrainer ?
** Changed in: yade Status: New => Fix Committed -- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bugs/1300167 Title: (Not) Defining velocities in UniaxialStrainer ? Status in Yet Another Dynamic Engine: Fix Committed Bug description: Hi, I have the feeling that there is something "wrong" with UniaxialStrainer where the velocities of the "posIds" and "negIds" bodies are not defined, and I illustrate it with following examples (attached) It deals with 2 contacting spheres, with an oblic contact. One sphere is moved towards the 2d sphere, and here both normal and tangential relative displacements occur. - In testUS.py the moving sphere is moved through UniaxialStrainer - Whereas in testUSb.py the movement comes from an initial value of velocity (and NewtonIntegrator) And, obviously, the two simulations are different (see e.g. the plot of fZ sustained by moving sphere). While I would tend to consider these two simulations as identical. What do you think ? To manage notifications about this bug go to: https://bugs.launchpad.net/yade/+bug/1300167/+subscriptions ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3879: Replace isnan by isfinite to let the numbers be 0.
revno: 3879 committer: Anton Gladky timestamp: Thu 2014-04-03 10:13:29 +0200 message: Replace isnan by isfinite to let the numbers be 0. modified: pkg/dem/ViscoelasticPM.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/ViscoelasticPM.cpp' --- pkg/dem/ViscoelasticPM.cpp 2014-04-02 15:33:41 + +++ pkg/dem/ViscoelasticPM.cpp 2014-04-03 08:13:29 + @@ -123,20 +123,20 @@ Real mass1 = 1.0; Real mass2 = 1.0; - if ((isnormal(mat1->kn) and not (isnormal(mat2->kn))) or - (isnormal(mat2->kn) and not (isnormal(mat1->kn))) or - (isnormal(mat1->ks) and not (isnormal(mat2->ks))) or - (isnormal(mat2->ks) and not (isnormal(mat1->ks))) or - (isnormal(mat1->cn) and not (isnormal(mat2->cn))) or - (isnormal(mat2->cn) and not (isnormal(mat1->cn))) or - (isnormal(mat1->cs) and not (isnormal(mat2->cs))) or - (isnormal(mat2->cs) and not (isnormal(mat1->cs))) or - (isnormal(mat1->tc) and not (isnormal(mat2->tc))) or - (isnormal(mat2->tc) and not (isnormal(mat1->tc))) or - (isnormal(mat1->en) and not (isnormal(mat2->en))) or - (isnormal(mat2->en) and not (isnormal(mat1->en))) or - (isnormal(mat1->et) and not (isnormal(mat2->et))) or - (isnormal(mat2->et) and not (isnormal(mat1->et { + if ((isfinite(mat1->kn) and not (isfinite(mat2->kn))) or + (isfinite(mat2->kn) and not (isfinite(mat1->kn))) or + (isfinite(mat1->ks) and not (isfinite(mat2->ks))) or + (isfinite(mat2->ks) and not (isfinite(mat1->ks))) or + (isfinite(mat1->cn) and not (isfinite(mat2->cn))) or + (isfinite(mat2->cn) and not (isfinite(mat1->cn))) or + (isfinite(mat1->cs) and not (isfinite(mat2->cs))) or + (isfinite(mat2->cs) and not (isfinite(mat1->cs))) or + (isfinite(mat1->tc) and not (isfinite(mat2->tc))) or + (isfinite(mat2->tc) and not (isfinite(mat1->tc))) or + (isfinite(mat1->en) and not (isfinite(mat2->en))) or + (isfinite(mat2->en) and not (isfinite(mat1->en))) or + (isfinite(mat1->et) and not (isfinite(mat2->et))) or + (isfinite(mat2->et) and not (isfinite(mat1->et { throw runtime_error("Both materials should have the same defined set of variables e.g. tc, ks etc.!"); } @@ -159,7 +159,7 @@ Real ks1 = 0.0; Real ks2 = 0.0; Real cs1 = 0.0; Real cs2 = 0.0; - if (((isnormal(mat1->tc)) and (isnormal(mat1->en)) and (isnormal(mat1->et))) or ((tc) and (en) and (et))) { + if (((isfinite(mat1->tc)) and (isfinite(mat1->en)) and (isfinite(mat1->et))) or ((tc) and (en) and (et))) { //Set parameters according to [Pournin2001] const Real Tc = (tc) ? (*tc)(mat1->id,mat2->id) : (mat1->tc+mat2->tc)/2.0; @@ -175,7 +175,7 @@ if (abs(cn2) <= Mathr::ZERO_TOLERANCE ) cn2=0; if (abs(cs1) <= Mathr::ZERO_TOLERANCE ) cs1=0; if (abs(cs2) <= Mathr::ZERO_TOLERANCE ) cs2=0; - } else if ((isnormal(mat1->kn)) and (isnormal(mat1->ks)) and (isnormal(mat1->cn)) and (isnormal(mat1->cs))) { + } else if ((isfinite(mat1->kn)) and (isfinite(mat1->ks)) and (isfinite(mat1->cn)) and (isfinite(mat1->cs))) { //Set parameters explicitly kn1 = mat1->kn; kn2 = mat2->kn; @@ -191,7 +191,7 @@ kn2 = 2*mat2->young*R2; ks1 = kn1*mat1->poisson; ks2 = kn2*mat2->poisson; - if ((isnormal(mat1->cn)) and (isnormal(mat1->cs))) { + if ((isfinite(mat1->cn)) and (isfinite(mat1->cs))) { cn1 = mat1->cn; cn2 = mat2->cn; cs1 = mat1->cs; ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3880: Remove last capillar-parameters from ViscEl.
revno: 3880 committer: Anton Gladky timestamp: Thu 2014-04-03 11:05:20 +0200 message: Remove last capillar-parameters from ViscEl. modified: pkg/dem/ViscoelasticPM.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 'pkg/dem/ViscoelasticPM.hpp' --- pkg/dem/ViscoelasticPM.hpp 2014-04-03 06:19:48 + +++ pkg/dem/ViscoelasticPM.hpp 2014-04-03 09:05:20 + @@ -28,11 +28,6 @@ ((Real,cs,NaN,,"Shear viscous constant. Attention, this parameter cannot be set if tc, en or es is defined!")) ((Real,mR,0.0,,"Rolling resistance, see [Zhou1999536]_.")) ((unsigned int,mRtype,1,,"Rolling resistance type, see [Zhou1999536]_. mRtype=1 - equation (3) in [Zhou1999536]_; mRtype=2 - equation (4) in [Zhou1999536]_.")) - ((bool,Capillar,false,,"True, if capillar forces need to be added.")) - ((Real,Vb,NaN,,"Liquid bridge volume [m^3]")) - ((Real,gamma,NaN,,"Surface tension [N/m]")) - ((Real,theta,NaN,,"Contact angle [°]")) - ((std::string,CapillarType,"",,"Different types of capillar interaction: Willett_numeric, Willett_analytic [Willett2000]_ , Weigert [Weigert1999]_ , Rabinovich [Rabinov2005]_ , Lambert (simplified, corrected Rabinovich model) [Lambert2008]_ ")), createIndex(); ); REGISTER_CLASS_INDEX(ViscElMat,FrictMat); ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3882: Fix compilation.
revno: 3882 committer: Anton Gladky timestamp: Thu 2014-04-03 11:27:51 +0200 message: Fix compilation. modified: pkg/dem/ViscoelasticPM.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 'pkg/dem/ViscoelasticPM.hpp' --- pkg/dem/ViscoelasticPM.hpp 2014-04-03 09:05:20 + +++ pkg/dem/ViscoelasticPM.hpp 2014-04-03 09:27:51 + @@ -27,7 +27,7 @@ ((Real,ks,NaN,,"Shear elastic stiffness. Attention, this parameter cannot be set if tc, en or es is defined!")) ((Real,cs,NaN,,"Shear viscous constant. Attention, this parameter cannot be set if tc, en or es is defined!")) ((Real,mR,0.0,,"Rolling resistance, see [Zhou1999536]_.")) - ((unsigned int,mRtype,1,,"Rolling resistance type, see [Zhou1999536]_. mRtype=1 - equation (3) in [Zhou1999536]_; mRtype=2 - equation (4) in [Zhou1999536]_.")) + ((unsigned int,mRtype,1,,"Rolling resistance type, see [Zhou1999536]_. mRtype=1 - equation (3) in [Zhou1999536]_; mRtype=2 - equation (4) in [Zhou1999536]_.")), createIndex(); ); REGISTER_CLASS_INDEX(ViscElMat,FrictMat); @@ -78,5 +78,5 @@ }; REGISTER_SERIALIZABLE(Law2_ScGeom_ViscElPhys_Basic); -Real contactParameterCalculation(const Real& l1,const Real& l2, const bool& massMultiply); +Real contactParameterCalculation(const Real& l1,const Real& l2); void computeForceTorqueViscEl(shared_ptr& _geom, shared_ptr& _phys, Interaction* I, Vector3r & force, Vector3r & torque1, Vector3r & torque2); ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3878: Minor description update.
revno: 3878 committer: Anton Gladky timestamp: Thu 2014-04-03 08:19:48 +0200 message: Minor description update. modified: pkg/dem/ViscoelasticPM.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 'pkg/dem/ViscoelasticPM.hpp' --- pkg/dem/ViscoelasticPM.hpp 2014-04-02 15:33:41 + +++ pkg/dem/ViscoelasticPM.hpp 2014-04-03 06:19:48 + @@ -63,9 +63,9 @@ const shared_ptr& b2, const shared_ptr& interaction); YADE_CLASS_BASE_DOC_ATTRS(Ip2_ViscElMat_ViscElMat_ViscElPhys,IPhysFunctor,"Convert 2 instances of :yref:`ViscElMat` to :yref:`ViscElPhys` using the rule of consecutive connection.", - ((shared_ptr,tc,,,"Contact time")) - ((shared_ptr,en,,,"Restitution coefficient in normal direction")) - ((shared_ptr,et,,,"Restitution coefficient in tangential direction"))); + ((shared_ptr,tc,,,"Instance of :yref:`MatchMaker` determining contact time")) + ((shared_ptr,en,,,"Instance of :yref:`MatchMaker` determining restitution coefficient in normal direction")) + ((shared_ptr,et,,,"Instance of :yref:`MatchMaker` determining restitution coefficient in tangential direction"))); virtual void Calculate_ViscElMat_ViscElMat_ViscElPhys(const shared_ptr& b1, const shared_ptr& b2, const shared_ptr& interaction, shared_ptr phys); FUNCTOR2D(ViscElMat,ViscElMat); }; ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3881: Remove massMultiply paramter
revno: 3881 committer: Anton Gladky timestamp: Thu 2014-04-03 11:06:23 +0200 message: Remove massMultiply paramter It is not used any more modified: pkg/dem/ViscoelasticPM.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/ViscoelasticPM.cpp' --- pkg/dem/ViscoelasticPM.cpp 2014-04-03 08:13:29 + +++ pkg/dem/ViscoelasticPM.cpp 2014-04-03 09:06:23 + @@ -203,10 +203,10 @@ const int mRtype1 = mat1->mRtype; const int mRtype2 = mat2->mRtype; - phys->kn = contactParameterCalculation(kn1,kn2, 1); - phys->ks = contactParameterCalculation(ks1,ks2, 1); - phys->cn = contactParameterCalculation(cn1,cn2, 1); - phys->cs = contactParameterCalculation(cs1,cs2, 1); + phys->kn = contactParameterCalculation(kn1,kn2); + phys->ks = contactParameterCalculation(ks1,ks2); + phys->cn = contactParameterCalculation(cn1,cn2); + phys->cs = contactParameterCalculation(cs1,cs2); if ((mR1>0) or (mR2>0)) { phys->mR = 2.0/( ((mR1>0)?1/mR1:0) + ((mR2>0)?1/mR2:0) ); @@ -225,15 +225,10 @@ } /* Contact parameter calculation function */ -Real contactParameterCalculation(const Real& l1, const Real& l2, const bool& massMultiply){ - if (massMultiply) { -// If one of paramaters > 0. we DO NOT return 0 -Real a = (l1?1/l1:0) + (l2?1/l2:0); -if (a) return 1/a; -else return 0; - } else { - // If one of paramaters > 0, we return 0 - return (l1>0 or l2>0)?l1*l2/(l1+l2):0; - } +Real contactParameterCalculation(const Real& l1, const Real& l2){ + // If one of paramaters > 0. we DO NOT return 0 + Real a = (l1?1/l1:0) + (l2?1/l2:0); + if (a) return 1/a; + else return 0; } ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
Re: [Yade-dev] ViscoElastic test
Hi, One last thing : in the 3rd case (young modulus case ), it would be useful to determine cn from E1,E2,massR and en. I know the formula for normal cn, but not for cs. Do you have an idea ? Thanks, François. 2014-04-03 10:15 GMT+02:00 François : > 2014-04-03 10:00 GMT+02:00 Anton Gladky : > > 2014-04-03 9:51 GMT+02:00 François : >> > It will for sure break my scripts, as I used massMultiply=0. But your >> > implementation is part of my "todo list", which I can remove now :-) >> > You have made huge changes at once, so I need a little bit of time to >> check >> > everything. What I can see now is that you use "isnormal(r)" function >> into >> > the Ip2, which returns false if r==0. It will be a problem, for example >> if >> > we want to set cn, but cs=0 (same matter for en and et). >> >> I just wanted to check, that it is not(isnan). Thank for notice, will >> change to >> not(isnan). >> > Yes that's what I supposed. > > >> >> I think you can just remove massmultiply from your scripts and it should >> work >> fine. >> > I will re-check everything and see whether I am consistent with the > current implementation. You can delete the "massmultiply" argument in the > "contactParameterCalculation" function, as it's not used any more. > >> Anton >> > > François > > ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3885: fix the example script periodic-simple-shear.py
revno: 3885 committer: Bruno Chareyre timestamp: Thu 2014-04-03 15:30:10 +0200 message: fix the example script periodic-simple-shear.py modified: examples/test/periodic-simple-shear.py -- 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 'examples/test/periodic-simple-shear.py' --- examples/test/periodic-simple-shear.py 2014-01-23 18:08:34 + +++ examples/test/periodic-simple-shear.py 2014-04-03 13:30:10 + @@ -29,29 +29,29 @@ def triaxDone(): global phase if phase==0: - print 'Here we are: stress',triax['stress'],'strain',triax['strain'],'stiffness',triax['stiff'] + print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff print 'Now shearing.' - O.cell.velGrad[1,2]=6.0 + O.cell.velGrad=Matrix3(0,6,0, 0,0,0, 0,0,0) triax.stressMask=7 - triax['goal']=[-1e4,-1e4,-1e4] + triax.goal=[-1e4,-1e4,-1e4] phase+=1 - elif phase==1: - print 'Here we are: stress',triax['stress'],'strain',triax['strain'],'stiffness',triax['stiff'] - #print 'Done, pausing now.' - #O.pause() + O.pause() + #elif phase==1: + #print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff + #phase+=1 + ##print 'Done, pausing now.' + ##O.pause() O.dt=PWaveTimeStep() -O.run(7000); -qt.View() -#r=qt.Renderer() -#r.bgColor=1,1,1 -O.wait() - -O.cell.velGrad[1,2]=0 -O.cell.velGrad[2,1]=-6 -O.run(5000); -O.wait() - -O.cell.velGrad[1,2]=6 -O.cell.velGrad[2,1]=0 -O.run(5000); +#O.run(7000); +#qt.View() +##r=qt.Renderer() +##r.bgColor=1,1,1 +#O.wait() +#O.saveTmp() +#O.cell.velGrad=Matrix3(0,0,0, -6,0,0, 0,0,0) +#O.run(5000); +#O.wait() + +#O.cell.velGrad=Matrix3(0,6,0, 0,0,0, 0,0,0) +#O.run(5000); ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3884: better detection of changes in Cell::velGrad
revno: 3884 committer: Bruno Chareyre timestamp: Thu 2014-04-03 15:09:06 +0200 message: better detection of changes in Cell::velGrad modified: pkg/dem/NewtonIntegrator.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/NewtonIntegrator.cpp' --- pkg/dem/NewtonIntegrator.cpp 2014-02-16 14:03:41 + +++ pkg/dem/NewtonIntegrator.cpp 2014-04-03 13:09:06 + @@ -108,7 +108,9 @@ if(warnNoForceReset && scene->forces.lastResetiter) LOG_WARN("O.forces last reset in step "dt; //Take care of user's request to change velGrad. Safe to change it here after the interaction loop. - if (scene->cell->velGradChanged) {scene->cell->velGrad=scene->cell->nextVelGrad; scene->cell->velGradChanged=0;} + if (scene->cell->velGradChanged || scene->cell->nextVelGrad!=Matrix3r::Zero()) { + scene->cell->velGrad=scene->cell->nextVelGrad; + scene->cell->velGradChanged=0; scene->cell->nextVelGrad=Matrix3r::Zero();} homoDeform=scene->cell->homoDeform; dVelGrad=scene->cell->velGrad-prevVelGrad; // account for motion of the periodic boundary, if we remember its last position ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3888: fix include path pkg/pfv
revno: 3888 committer: Bruno Chareyre timestamp: Thu 2014-04-03 18:45:33 +0200 message: fix include path pkg/pfv modified: pkg/pfv/DummyFlowEngine.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/pfv/DummyFlowEngine.cpp' --- pkg/pfv/DummyFlowEngine.cpp 2014-04-03 13:37:55 + +++ pkg/pfv/DummyFlowEngine.cpp 2014-04-03 16:45:33 + @@ -14,7 +14,7 @@ // #define DUMMYFLOW #ifdef DUMMYFLOW #define TEMPLATE_FLOW_NAME DummyFlowEngineT -#include +#include /// We can add data to the Info types by inheritance class DummyCellInfo : public FlowCellInfo ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3883: introduce CellInfo::getInfo() for more generic interpolation between triangulations
revno: 3883 committer: Bruno Chareyre 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 + +++ lib/triangulation/FlowBoundingSphere.ipp 2014-04-03 13:07:09 + @@ -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 + +++ pkg/dem/FlowEngine.hpp 2014-04-03 13:07:09 + @@ -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& kNorm (void) const {return modulePermeability;} inline std::vector& kNorm (void) {return modulePermeability;} inline std::vector< CVector >& facetSurf (void) {return facetSurfaces;} inline std::vector& force (void) {return cellForce;} inline std::vector& 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 + +++ pkg/dem/PeriodicFlowEngine.hpp 2014-04-03 13:07:09 + @@ -59,7 +59,6 @@ #else #define _PeriFlowSolver CGT::PeriodicFlow #endif -//CGT::PeriodicFlowLinSolv > > > typedef TemplateFlowEngine< PeriodicCellInfo, PeriodicVertexInfo, ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp
[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3887: fix include paths after moving files to pkg/pfv
revno: 3887 committer: Bruno Chareyre timestamp: Thu 2014-04-03 18:44:33 +0200 message: fix include paths after moving files to pkg/pfv modified: pkg/pfv/DFNFlow.cpp pkg/pfv/FlowEngine.hpp pkg/pfv/PeriodicFlowEngine.hpp pkg/pfv/SoluteFlowEngine.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/pfv/DFNFlow.cpp' --- pkg/pfv/DFNFlow.cpp 2014-04-03 13:37:55 + +++ pkg/pfv/DFNFlow.cpp 2014-04-03 16:44:33 + @@ -13,7 +13,7 @@ // #define DFNFLOW #ifdef DFNFLOW #define TEMPLATE_FLOW_NAME DFNFlowEngineT -#include +#include class DFNCellInfo : public FlowCellInfo { === modified file 'pkg/pfv/FlowEngine.hpp' --- pkg/pfv/FlowEngine.hpp 2014-04-03 13:37:55 + +++ pkg/pfv/FlowEngine.hpp 2014-04-03 16:44:33 + @@ -351,7 +351,7 @@ ) }; // Definition of functions in a separate file for clarity -#include +#include class FlowCellInfo : public CGT::SimpleCellInfo { public: === modified file 'pkg/pfv/PeriodicFlowEngine.hpp' --- pkg/pfv/PeriodicFlowEngine.hpp 2014-04-03 13:37:55 + +++ pkg/pfv/PeriodicFlowEngine.hpp 2014-04-03 16:44:33 + @@ -10,7 +10,7 @@ /// It is a bit more complicated as for FlowEngine, though, because we need template inheriting from template, which breaks YADE_CLASS_XXX logic_error /// See below the commented exemple, for a possible solution -#include +#include class PeriodicCellInfo : public FlowCellInfo { === modified file 'pkg/pfv/SoluteFlowEngine.cpp' --- pkg/pfv/SoluteFlowEngine.cpp 2014-04-03 13:37:55 + +++ pkg/pfv/SoluteFlowEngine.cpp 2014-04-03 16:44:33 + @@ -12,7 +12,7 @@ #ifdef SOLUTE_FLOW #define TEMPLATE_FLOW_NAME SoluteFlowEngineT -#include +#include #undef TEMPLATE_FLOW_NAME class SoluteCellInfo : public FlowCellInfo @@ -144,9 +144,7 @@ //Copy data to concentration array FOREACH(CellHandle& cell, solver->T[solver->currentTes].cellHandles){ cell->info().solute()= ex2[cell->info().id]; - - } - + } tripletList2.clear(); } @@ -156,6 +154,7 @@ //Boundary conditions according to soluteTransport. //It simply assigns boundary concentrations to cells with a common vertices (e.g. infinite large sphere which makes up the boundary condition in flowEngine) //s is a switch, if 0 only bc_id1 is used (advection only). If >0 than both bc_id1 and bc_id2 are used. + //NOTE (bruno): cell cirulators can be use to get all cells having bcid2 has a vertex more efficiently (see e.g. FlowBoundingSphere.ipp:721) FOREACH(CellHandle& cell, solver->T[solver->currentTes].cellHandles) { for (unsigned int ngb=0;ngb<4;ngb++){ ___ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp