← Back to team overview

yade-dev team mailing list archive

Re: material -- state couples

 

Hi, Vaclav,

not sure, it is a right place for such question, but will try.

I have in RpmMat variable, called "exampleNumber", which indicates the
number of
the specimen. In one simulation I have several of them.

How can you recommend me to "divide" specimens with this parameter?
I need to create several materials with the same parameters, but with
different "exampleNumber"?
Or you can suggest a better solution?

Thank you
______________________________

Anton Gladkyy


2009/11/24 Václav Šmilauer <eudoxos@xxxxxxxx>

> For now, I solved that in python only: most/all python code calls
> utils.sphere to create sphere etc. Material::newAssocState returns
> instance of required State (sub)class.
> > Are you just trying to make the code foolproof or is there another
> reason?
> Yes, that's it.
> > In that case, it could be tested only once, e.g. in the constitutive law
> > or IPdispatcher at first iteration, using Material::checkStateType(Body*
> > b). Not very elegant though, since this is a loop on interactions
> > instead of bodies...
> Good idea, I could check in the BoundingVolumeMetaEngine or Collider.
> BoundingVolumeMetaEngine is called just once when using VelocityBins,
> though... And putting that inside the collider seems like a little
> abuse. But it might work. Will do that.
> > Another possible location for this would be in
> > body->assignMatType(MatType* t), which could call
> t->checkStateType(this).
> > The problem is it requires that the state type is always defined before
> > the mat type...
> That; and also code that wouldn't use this special method to assign
> material would fool us.
> > So, initializers perhaps?
> We don't use them for quite long now, and I don't feel like reinventing
> them (in fact dropping initializers would be a nice clean-up :-) ).
>
> Cheers, V.
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>

References