← Back to team overview

yade-dev team mailing list archive

Re: inherited PhysicalParameters for InteractionPhysicsEngineUnit

 

> I've got a problem with 'SimpleViscoelasticRelationships'. This
> 2d-functor needs 2 'PhysicalParameters' that are casted into
> 'SimpleViscoelasticBodyParameters' in the method 'go'.
> 
> I want to use BcpConnection that inherit from
> SimpleViscoelasticBodyParameters for one of the parameters.
> The problem is that call 'SimpleViscoelasticRelationships::go' fail
> (before entering the function).
> I've got the following message:
> 
> terminate called after throwing an instance of 'std::runtime_error'
>   what():  DynLibDispatcher: ambiguous or undefined dispatch for 2d
> multivirtual function, classes: SimpleViscoelasticBodyParameters
> BcpConnection
> 

You need own 2d-functor "*Relationships" for your PhysicalParameters (BcpConnection). 
SimpleViscoelasticRelationships only for SimpleViscoelasticBodyParameters, 
see line 29 in SimpleViscoelasticRelationships.hpp:

FUNCTOR2D(SimpleViscoelasticBodyParameters,SimpleViscoelasticBodyParameters);

It calculate InteractionPhysics (SimpleViscoelasticInteraction) from 
PhysicalParameters of contacting bodys.

So, if you have own PhysicalParameters, you need own Relationships for calculating InteractionPhysics from this parameters. (or you can modify exant classes with take care of their default behavior without changes)...

-- 
Best regards, Sergei D.



Follow ups

References