Loops
loop over a block of lines in the input file
Use (nested loops) in the input file.
begin_loop{"LoopVariable_i", iBegin, iStep, iEnd}
line that might contain
&LoopVariable_i &
begin_loop{"LoopVariable_j", jBegin, jStep, jEnd}
line that might contain
&LoopVariable_i& and
&LoopVariable_j &
begin_loop{"LoopVariable_k", kBegin, kStep, kEnd}
line that might contain
&LoopVariable_i& and
&LoopVariable_j& and
&LoopVariable_k &
end_loop
end_loop
end_loop
The names
&LoopVariable_i&,
&LoopVariable_j&, and
&LoopVariable_k& are free to be chosen by the user.
The values
iBegin,
iStep,
iEnd, etc have to be integers.
Example: Place a raster of cubes in the geometry.
begin_boundary_elements{}
begin_loop{"iLoop",1,1,18}
begin_loop{"jLoop",-2,1,2}
BND_cube &AliasForTheCubes& -1 -1 -1 1 1 1
rotate{0,0,0,[3*rand(1)],[3*rand(1)],[3*rand(1)]}
scale{&H_min&}
offset{[
&iLoop&*2*
&H_min&],[
&jLoop&*2*
&H_min&],[0.6]}
end_loop
end_loop
end_boundary_elements
The cubes are randomly rotated and given a regular offset.