The problem of matchmaker
When I add the 'MatchMaker' in the second engine, the error 'terminate called recursively' appears. I didn't find what's wrong with the code. If i delete the relavant code of matchmaker, it will run without the error.
Ubuntu 21.10
> Here is the error:
terminate called recursively
terminate called recursively
terminate called recursively
terminate called after throwing an instance of 'std::invalid_
>Here is my code. this code is divided into two parts. if you are going to run it, you have to wait a moment (about 5 min) for finishing the first part and the start the 2nd part. the error is in the second part.
from yade import pack, timing
#time calculation
startT = O.time
endT = O.time
timeSpent = endT - startT
time0 = time.time()
#######
### DEFINING VARIABLES AND MATERIALS ###
#######
nRead=readParam
num_spheres=2000,
key='_
unknownOk=True)
from yade.params import table
num_spheres=
key=table.key
damp=0.7
stabilityThresh
## Sphere material
Young=300e6
Density=2650
Poisson=0.3
compFricDegree = 0
finalFricDegree = 27
normalCohesion=
shearCohesion=100e4
etaRoll=0.1
AvgRadius=0.0005
## wall material
WYoung=6000e6
WPoisson=0.5
WDensity=0
WFrictionAngle=0
# corners of the initial packing
size=0.05
mn,mx=Vector3(
## create materials for spheres and plates
O.materials.
mat1=CohFrictMa
mat_1=O.
mat2=CohFrictMa
mat_2=O.
print(mat_1,mat_2)
# mat_1=O.
# mat_2=O.
# O.materials.
## create walls around the packing
walls=aabbWalls
wallIds=
## use a SpherePack object to generate a random loose particles packing
#psdSizes,
sp=pack.
#sp.makeCloud(
sp.makeCloud(
#sp.toSimulatio
sp.toSimulation()
sphere1=[]
sphere2=[]
for b in O.bodies:
if not isinstance(
continue
if random.random() < 0.9:
b.mat = mat1
b.shape.color = (1,0,0)
sphere1.
else:
b.mat = mat2
b.shape.color = (0,1,1)
sphere2.
#######
### DEFINING ENGINES ###
#######
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
),
GlobalStiffnes
triax,
newton
]
#######
### APPLYING CONFINING PRESSURE ###
#######
triax.goal1=
if 1:
while 1:
O.run(1000, True)
unb=
print ('unbalanced force:',unb,' mean stress: ',triax.
if unb<stabilityTh
break
O.save(
print("### Sample saved ###")
#####
### REACHING A SPECIFIED POROSITY PRECISELY ###
#####
triax.
triax.
setContactFri
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
newton
]
while 1:
O.run(1000, True)
unb=
print ('unbalanced force:',unb,' mean stress: ',triax.
if unb<0.000005 and abs(-100000-
break
O.save(
O.save(
print("### Isotropic state saved ###")
print(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: