On 28/01/14 14:10, Anton Gladky wrote:
> That is true. I actually moved an implementations into
> ViscoelasticCapillarPM [1], but parameters are still in the parent
> class. Any suggestions how to improve it are very welcome.

If I don't miss something, it could be just like CapillaryPhys, which
inherits from FrictPhys.
The "cappilar" version of the contact law would read

Law2_ScGeom_ViscElPhys_Capillar::go(...) {
    Law2_ScGeom_ViscElPhys_Basic::go(...);
   // add capillary forces here
   ...
}

If not possible (*), you can extract code blocks from
Law2_ScGeom_ViscElPhys_Basic::go and put them in separate functions that
can be called in child classes.

Law2_ScGeom_ViscElPhys_Capillar::go(...) {
    Law2_ScGeom_ViscElPhys_Basic::computeForceTorque(...,f);
   // add capillary forces here
   ...
}

(*) one problem I anticipate is that Law2_ScGeom_ViscElPhys_Basic::go()
could erase an interaction that is still alive wrt the capillary model.
Hence the split of go() in different functions.

Bruno

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to