yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00659
Re: Shop::unbalancedForce
Václav Šmilauer a écrit :
It looks correct. Usage is restricted to NormalShearInteractions (I
guess yes), or can we cast different Interaction types to this?
Well, ElasticContactInteraction (for instance) derives from
NormalShearInteraction (which in turn derives from NormalInteraction).
Eventually _all_ interactions that create normal and shear forces should
derive from NormalShearInteraction and there will be no need for casts.
Those parent classes store kn and ks as well, therefore the current
GlobalStiffnessCounter will work for many different types of
interactions, provided they have defined kn and ks.
I don't know what other (besides ElasticContactInteraction and
BrefcomContact) interactions we have but it might be useful to add those
to this class hierarchy as well, progressively.
I also hope that such generic interactions will reduce code duplication
(for instance, there is unbalancedForce computation in Triaxial, but now
it can use this function).
Very good. I get it you modified the class hierarchy, or NormalShearI
has been here for a while and I didn't notice?
It made me think the we should keep an updated list of macros used in
Yade (YADE_PTR_CAST, FOREACH, REGISTER, etc), since they are either
Yade macros, boost macros or any-other-lib macros, it can be a bit
complex to read for newcomers.
If you create a wiki page, I will edit the macros I know something about.
Oh, any reason why global stiffness timestepper is 2 engines (GSCounter
and GSTimeStepper)? You could have just 1 engine that would compute
stiffnesses (store them not in physicalActions, but in a vector<Real> or
such) and then compute the timestep. (The code would also be easier to
understand -- in 1 place)
Agreed. Two main reasons for current situation :
1. I tried to comply with Yade design - in a stupid way maybe.
2. Global stiffness is (probably more "could" or "should", in fact...)
also used to control the stress on walls. So the stiffness data is a bit
more general than just timestep computing.
One more reason to merge : if somebody makes the mistake of setting
different intervals in counter and timestepper, it could result in a
strange behaviour, perhaps uninitialized values, etc.
Bruno
--
_______________
Chareyre Bruno
Maitre de conference
Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________
Follow ups
References