yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02448
Re: Functor arguments
> Thinking about the problem in CohesiveFrictionalRelationship, why don't
> we simply pass body pointers to all functors (disregarding if it is
> supposed to work on state or materials)?
> It applies even for interactionGeometryFunctor. It takes material and
> state now, which is... a body!
>
> It would be a lot more versatile.
Those restrictions are not bad, they define functional orthogonality:
e.g. you can combine arbitrary InteractingGeometry with arbitrary
Material, since they never meet directly.
If they are not separate, people will tend to put all their stuff in
huge unreadable classes. That was the situation in the past and I would
like to avoid that. Let's not throw the good parts of the original yade
design away.
The problem with CohesiveFrictionRelationship is that it didn't respect
that design even back then and now you have to fix that. Too bad.
I would like to (on my list) create abstract InteractionGeometry
classes, for both incremental and non-incremental formulation. If you
need torsion and bending in CohesiveFrictional, you can wait for that.
It will certainly be cleaner.
> Only problem : does it break the current implementation of shared
> materials? Would it break the functionality or the time/memory saved?
No. No. (as far as I see)
v
References