text
stringlengths
0
234
entry release;
entry set_params (slave_params : SlaveParams);
end SlaveTask;
task body SlaveTask is
params : SlaveParams;
begin
-- collect parameters for this task ------------------------
accept set_params (slave_params : SlaveParams) do
params := slave_params;
Function Definition: procedure write_results is
Function Body: num_loop_str : String := fill_str (num_loop, 5, '0');
begin
set_constraints;
Ada.Directories.create_path (results_directory & "/xy/");
Ada.Directories.create_path (results_directory & "/xz/");
Ada.Directories.create_path (results_directory & "/yz/");
write_results (xy_index_list, xy_index_num, results_directory & "/xy/" & num_loop_str & ".txt");
write_results (xz_index_list, xz_index_num, results_directory & "/xz/" & num_loop_str & ".txt");
write_results (yz_index_list, yz_index_num, results_directory & "/yz/" & num_loop_str & ".txt");
end write_results;
procedure write_history (point : GridPoint;
file_name : String)
is
txt : File_Type;
i, j, k : Integer;
x, y, z : Real;
gab : MetricPointArray;
Kab : ExtcurvPointArray;
begin
i := sample_point.i;
j := sample_point.j;
k := sample_point.k;
x := sample_point.x;
y := sample_point.y;
z := sample_point.z;
begin
Open (txt, Append_File, file_name);
exception when Name_Error =>
Create (txt, Out_File, file_name);
Put_Line (txt, "# 4 more lines before the data");
Put_Line (txt, "# 13 columns of data");
Put_Line (txt,"# (" & str (i,0) & ", " &
str (j,0) & ", " &
str (k,0) & ") = grid indices of target");
Put_Line (txt,"# (" & str (x,10) & ", " &
str (y,10) & ", " &
str (z,10) & ") = grid coords of target");
Put_Line (txt, "# " &
centre ("Time",10) &
centre ("gxx",11) &
centre ("gyy",11) &
centre ("gzz",11) &
centre ("Kxx",11) &
centre ("Kyy",11) &
centre ("Kzz",11) &
centre ("Ham",11) &
centre ("Mom(x)",11) &
centre ("Mom(y)",11) &
centre ("Mom(z)",11) &
centre ("detg",11) &
centre ("trABar",11));
Function Definition: procedure echo_command_name is
Function Body: begin
Put_Line (echo_command_name);
end echo_command_name;
procedure echo_command_line is
begin
Put_Line (echo_command_line);
end echo_command_line;
procedure echo_command_line_args is
begin
Put_Line (echo_command_line_args);
end echo_command_line_args;
----------------------------------------------------------------------------