( The direction of a tendon is optimized, such that
  the vertical stress sigyy becomes minimal, target value 0.
  The x-coordinates of the lower end and upper end of 
  the fiber are made parameters for the inverse modelling.
  The final result of both these x-coordinates is 0.5,
  so that the fibre has turned into vertical position. 
  Then the fibre takes half of the load, and
  the sigyy stress should be 0.01)

echo -no
number_of_space_dimensions 2
materi_velocity
materi_strain_total
materi_stress
end_initia

node 1  0 0
node 2  1 0
node 3  0 1
node 4  1 1
element 1  -quad4 1 2 3 4

group_type 0  -materi
group_materi_density 0  1.0e-9
group_materi_elasti_young   0  1.0
group_materi_memory 0  -updated_without_rotation

tendon 0  0.3 -1. 0.7 2. 1.
tendon_elasti  0 1.

geometry_line 0  0. 0. 1. 0. 1.e-4
geometry_line 1  0. 1. 1. 1. 1.e-4
post_point 0  0.5 0.5

bounda_unknown 0  -all -velx
bounda_time    0  0. 0. 1000. 0.
bounda_unknown 1  -geometry_line 0 -vely
bounda_time    1  0. 0. 1000. 0.
bounda_force   2  -geometry_line 1 -vely
bounda_time    2  0. 0. 0.01 0.01 1000. 0.01

print_filter 0  -post_point_dof 0 -sigyy

control_timestep   4  1. 1.

(control_print    10  -inverse_iteration_number -tendon -post_point_dof)

inverse_iterations   3
inverse_parameter 0  -tendon 0 0
inverse_parameter_step 0  0.1
inverse_parameter 2  -tendon 0 2
inverse_parameter_step 2  0.1
inverse_target 1  -post_point_dof 0 -sigyy
inverse_target_data 1 0. 1.

target_item 1  -post_point_dof 0  -sigyy
target_value 1  0.01 1.e-3
end_data
