← Back to team overview

yade-users team mailing list archive

[Question #670511]: Ambiguous dispatch : too much laws ?

 

New question #670511 on Yade:
https://answers.launchpad.net/yade/+question/670511

Dear all,

I'm using a modified version of yadedaily from the 24th of May. The modification only affect the behavior of DragEngine (allowing the input of a velocity for relative force computing).

After modeling a viscous flow using YADE lubrication law, I recently try to mix 2 scripts :
- my script that models a flow along a channel impacting a rigid wall
- the script of my colleague that models a flexible barrier made of gridNode and gridConnection

Both works perfectly when they are run on their side but it appears errors when I mixed them.

I mixed this 2 Engine routine : 
### Viscous Flow ###
....
InsertionSortCollider([
		Bo1_Sphere_Aabb(aabbEnlargeFactor=Factor, label="aabb"),
		Bo1_Box_Aabb(),
		Bo1_Wall_Aabb()],
		verletDist=-0.1,
		allowBiggerThanPeriod=False),

	InteractionLoop(
	[
		Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=Factor,label="Ig2"),
		Ig2_Box_Sphere_ScGeom6D()
	],
        [
		Ip2_FrictMat_FrictMat_LubricationPhys(eta=m_viscosity,eps=m_roughness,label="Phys_Lub"),
	],
        [
		Law2_ScGeom_ImplicitLubricationPhys(
						activateNormalLubrication=True,
						activateTangencialLubrication=True,
						activateTwistLubrication=True,
						activateRollLubrication=True,
						theta=theta_method,
						resolution=resolution,
						warnedOnce=True,
						maxSubSteps=20,
						NewtonRafsonTol=NewtonRafsonTol,
						debug=False)
	]),
....

### Flexible barrier ###
....
InsertionSortCollider([
		Bo1_PFacet_Aabb(),
		Bo1_Sphere_Aabb(),
		Bo1_GridConnection_Aabb()
	]),	
	InteractionLoop([
		Ig2_Sphere_Sphere_ScGeom(),
		Ig2_GridNode_GridNode_GridNodeGeom6D(),			
		Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),	
		Ig2_Sphere_GridConnection_ScGridCoGeom(),		
		Ig2_GridConnection_PFacet_ScGeom(),			
		Ig2_Sphere_PFacet_ScGridCoGeom(),			
		Ig2_PFacet_PFacet_ScGeom(),				
    ],	
    [
		Ip2_WireMat_WireMat_WirePhys(label='wire_wire'),
		Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False), 
		Ip2_FrictMat_FrictMat_FrictPhys(),
	],
	[
		Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
		Law2_ScGeom_FrictPhys_CundallStrack(),
		Law2_ScGridCoGeom_FrictPhys_CundallStrack(),
		Law2_ScGeom_WirePhys_WirePM(label='Law_1'), #linkThresholdIteration=1,
		Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()
  
	]
	),
...

In this :
....
InsertionSortCollider([
		Bo1_PFacet_Aabb(),
		Bo1_Sphere_Aabb(aabbEnlargeFactor=Factor, label="aabb"),
		Bo1_GridConnection_Aabb(),
		Bo1_Wall_Aabb(),
		Bo1_Box_Aabb()],
		verletDist=-0.1,
		allowBiggerThanPeriod=False
	),	
	InteractionLoop([
		Ig2_Sphere_Sphere_ScGeom(),
		Ig2_GridNode_GridNode_GridNodeGeom6D(),			
		Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),	
		Ig2_Sphere_GridConnection_ScGridCoGeom(),		
		Ig2_GridConnection_PFacet_ScGeom(),			
		Ig2_Sphere_PFacet_ScGridCoGeom(),			
		Ig2_PFacet_PFacet_ScGeom(),				
		Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=Factor,label="Ig2"),
		Ig2_Box_Sphere_ScGeom6D(),
    ],	
    [
		Ip2_WireMat_WireMat_WirePhys(label='wire_wire'),
		Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False), 
		Ip2_FrictMat_FrictMat_FrictPhys(),
		Ip2_FrictMat_FrictMat_LubricationPhys(eta=m_viscosity,eps=m_roughness,label="Phys_Lub"),
	],
	[
		Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
		Law2_ScGeom_FrictPhys_CundallStrack(),
		Law2_ScGridCoGeom_FrictPhys_CundallStrack(),
		Law2_ScGeom_WirePhys_WirePM(label='Law_1'), #linkThresholdIteration=1,
		Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(),
		Law2_ScGeom_ImplicitLubricationPhys(
						activateNormalLubrication=True,
						activateTangencialLubrication=True,
						activateTwistLubrication=True,
						activateRollLubrication=True,
						theta=theta_method,
						resolution=resolution,
						warnedOnce=True,
						maxSubSteps=20,
						NewtonRafsonTol=NewtonRafsonTol,
						debug=False)
  
	]
	),
....

It results with this error when I try to run the script :

Yade [1]: /home/godetnicolas/myYade/trunk/lib/multimethods/DynLibDispatcher.hpp:344: ambiguous 2d dispatch (arg1=GridCoGridCoGeom, arg2=LubricationPhys, distance=2), dispatch matrix:
AMBIGUOUS: 0+8 -> Law2_ScGeom_ImplicitLubricationPhys
AMBIGUOUS: 1+3 -> Law2_ScGeom_FrictPhys_CundallStrack
AMBIGUOUS: 2+5 -> Law2_ScGeom6D_CohFrictPhys_CohesionMoment
AMBIGUOUS: 6+3 -> Law2_GridCoGridCoGeom_FrictPhys_CundallStrack
AMBIGUOUS: 6+8 -> Law2_GridCoGridCoGeom_FrictPhys_CundallStrack
AMBIGUOUS: 7+5 -> Law2_ScGeom6D_CohFrictPhys_CohesionMoment
AMBIGUOUS: 11+3 -> Law2_ScGridCoGeom_FrictPhys_CundallStrack
AMBIGUOUS: 11+8 -> Law2_ScGridCoGeom_FrictPhys_CundallStrack
terminate called after throwing an instance of 'std::runtime_error'
  what():  Ambiguous dispatch.
Abandon (core dumped)


It seems that there is too much laws in my engine routine (YADE is not able to assign to correct law to an interaction ?) but they are all necessary for the proper functioning of the system...
I know also that the order of the different element inside O.engine matter (for example, [Law1(),Law2()] work perfectly but [Law2(),Law1()] result in an error...).

I don't know what additional informations I could give so don't hesitate to ask for, in case.

Thanks in advance !
Nicolas

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.