← Back to team overview

yade-users team mailing list archive

Re: [Question #683405]: Yade 2019.01a vs. gitlab version


Question #683405 on Yade changed:

    Status: Answered => Open

Bettina Suhr is still having a problem:
Dear all,

I tried to do the checks, which Bruno suggested, but I didn’t succeed.
After checking out the commit 900c7616, running cmake and make clean,  I get an error in compilation:

/home/bettinasuhr/yade-gitlab/trunk/pkg/common/InsertionSortCollider.cpp:526:22: error: invalid use of member function ‘size_t InsertionSortCollider::VecBounds::size() const’ (did you forget the ‘()’ ?)
    for(long i=0; i<V.size; i++){
CMakeFiles/yade.dir/build.make:504: recipe for target 'CMakeFiles/yade.dir/pkg/common/InsertionSortCollider.cpp.o' failed
make[2]: *** [CMakeFiles/yade.dir/pkg/common/InsertionSortCollider.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/yade.dir/all' failed
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Did I do something wrong? This looks to me like a typo in the code of InsertionSortCollider.cpp

If somebody can run these tests easier than me, below is the script,
which I used to  obtain the results posted above.

Thanks and regards,

# gravity deposition, continuing with oedometric test after stabilization
# shows also how to run parametric studies with yade-batch

# The components of the batch are:
# 1. table with parameters, one set of parameters per line (ccc.table)
# 2. readParamsFromTable which reads respective line from the parameter file
# 3. the simulation muse be run using yade-batch, not yade
# $ yade-batch --job-threads=1 03-oedometric-test.table 03-oedometric-test.py

# load parameters from file if run in batch
# default values are used if not run from batch
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *
from yade import export,ymport

# create box with free top, and ceate loose packing inside the box
from yade import pack, plot
sp.makeCloud((0,0,0),(1,1,1),rMean=rMean,rRelFuzz=rRelFuzz, seed=1)

	# sphere, facet, wall
		# the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
	# the label creates an automatic variable referring to this engine
	# we use it below to change its attributes from the functions called

# the following checkUnbalanced, unloadPlate and stopUnloading functions are all called by the 'checker'
# (the last engine) one after another; this sequence defines progression of different stages of the
# simulation, as each of the functions, when the condition is satisfied, updates 'checker' to call
# the next function when it is run from within the simulation next time

# check whether the gravity deposition has already finished
# if so, add wall on the top of the packing and start the oedometric test
def checkUnbalanced():
	# at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing is stable
	#print (O.iter, unbalancedForce())
	if O.iter<5000: return 
	# the rest will be run only if unbalanced is < .1 (stabilized packing)
	if unbalancedForce()>.1: return 
	# add plate at the position on the top of the packing
	# the maximum finds the z-coordinate of the top of the topmost particle
	print ('add plate at position: ',  max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)]) ,'at iteration: ', O.iter)
	O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1))
	global plate        # without this line, the plate variable would only exist inside this function
	plate=O.bodies[-1]  # the last particles is the plate
	# Wall objects are "fixed" by default, i.e. not subject to forces
	# prescribing a velocity will therefore make it move at constant velocity (downwards)
	# start plotting the data now, it was not interesting before
	# next time, do not call this function anymore, but the next one (unloadPlate) instead

def unloadPlate():
	# if the force on plate exceeds maximum load, start unloading
	if abs(O.forces.f(plate.id)[2])>maxLoad:
		# next time, do not call this function anymore, but the next one (stopUnloading) instead

def stopUnloading():
	if abs(O.forces.f(plate.id)[2])<minLoad:
		# O.tags can be used to retrieve unique identifiers of the simulation
		# if running in batch, subsequent simulation would overwrite each other's output files otherwise
		# d (or description) is simulation description (composed of parameter values)
		# while the id is composed of time and process number
def addPlotData():
	if not isinstance(O.bodies[-1].shape,Wall):
		plot.addData(); return

# besides unbalanced force evolution, also plot the displacement-force diagram


# when running with yade-batch, the script must not finish until the simulation is done fully
# this command will wait for that (has no influence in the non-batch mode)

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