#!/home/vladimir/bin/cmo

# FCIC - initial conditions for modeling of contacts between cylinders

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The system is fully determined by:
#	- bounding box (determined by origin and dimensions);
#	- volumetric content of the fibers (scalar);
#	- fiber diameter and length (scalars).
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Directives in 'generators' block:
#
# For non-iterated, possibly random deviated scalar:
# 'constant' {<genname> <value>}
# 'uniform' {<genname> <value-min> <value-max>}
# 'gaussian' {<genname> <mean> <stdev>}
#
# 'iterator' - next parameter is the scalar, will be iterated and must be specified in form
#	{<genname> <initial-value> to <final-value> (steps|logsteps) <number of steps>}
#   (if <number of steps> == 1 => 2 iterations, etc.).
#	In case of 'steps', the value is linearly interpolated, eg.:
#	'iterator haha 1 to 3 steps 2' produces haha = 1, 2, 3
#	(delta = (to - from) / steps).
#	In case of 'logsteps', the value is base10 logarithmically interpolated, eg.:
#	'iterator haha 1e-3 to 1e-1 steps 2' produces haha = 1e-3, 1e-2, 1e-1.
#	(logic:
#		logfrom = log10(from), logto=log10(to), logdelta = (logto - logfrom) / steps;
#		for(count=0,logv = logfrom;count <= steps;count++,logv += logdelta) {
#			haha = pow(10, logv); dohaha(haha); } ).
#

generators
{
	constant VF 1e-2;
	constant FL 200e-9;
	constant FD 10e-9;
#	iterator VF 0.01 to 0.03 steps 1;
#	iterator FL 100e-9 to 200e-9 steps 1;
#	constant FD 10e-9;
#	iterator FD 10e-9 to 100e-9 steps 1;
	
#	iterator hehe 1 to 3 steps 2;
#	iterator hoho 1e-9 to 1e-6 logsteps 3;
#	iterator haha 10 to 15 steps 5;
}

# Directives of the 'sequence' block describe the system itself.
#
# bounding_box:	bbcenter bbsize
# bbcenter: vec3
# bbsize: vec3
# vec3: float float float
#
# volumetric_content: scalar, any generator accepted
# diameter: scalar, must not be iterator
# length: scalar, must not be iterator

sequence onetest
{
	bounding_box 0 0 0 2e-6 2e-6 2e-6;
	fiber_length FL;
	fiber_diameter FD;
	volumetric_content VF;
}

#sequence
#{
#	bounding_box 0 0 0 2e-6 2e-6 2e-6;
#	volumetric_content hehe;
#	fiber_length haha;
#	fiber_diameter hoho;
#}
