00001
00002
00003
00004 #include "scatter3.h"
00005
00006 extern "C" {
00007
00008
00009
00010 void c_cpu_init()
00011 {cpu_init();}
00012
00013 real c_cpu_time()
00014 {return cpu_time();}
00015
00016
00017
00018
00019 int c_srandinter(int seed, int n_rand)
00020 {return srandinter(seed, n_rand);}
00021
00022 real c_randinter(real a, real b)
00023 {return randinter(a, b);}
00024
00025 void c_print_initial_random_parameters() {
00026 cerr << "Random seed = " << get_initial_seed()
00027 << " n_rand = " << get_n_rand() << flush;
00028 }
00029
00030
00031
00032
00033 int c_pgetopt(int argc, char** argv, char* param_string)
00034 {return pgetopt(argc, argv, param_string);}
00035
00036
00037
00038
00039 void c_make_standard_init(initial_state3* init)
00040 {make_standard_init(*init);}
00041
00042 void c_initialize_angles(initial_state3* init,
00043 int planar_flag, bool psi_flag, real psi) {
00044 randomize_angles(init->phase);
00045 if (planar_flag == 1) {
00046 init->phase.cos_theta = 1;
00047 if (psi_flag) init->phase.psi = psi * M_PI / 180.0;
00048 } else if (planar_flag == -1) {
00049 init->phase.cos_theta = -1;
00050 if (psi_flag) init->phase.psi = psi * M_PI / 180.0;
00051 }
00052 }
00053
00054
00055
00056
00057 void c_print_scatter3_info(initial_state3* init,
00058 intermediate_state3* inter,
00059 final_state3* final,
00060 bool Q_flag, bool q_flag, bool b_flag,
00061 real cpu) {
00062 cerr << ": ";
00063 print_scatter3_outcome(*inter, *final, cerr);
00064 if (Q_flag) print_scatter3_summary(*inter, *final, cpu, cerr);
00065 if (!q_flag) print_scatter3_report(*init, *inter, *final,
00066 cpu, b_flag, cerr);
00067 }
00068
00069 void c_print_intermediate_descriptor(intermediate_descriptor3 descriptor)
00070 {cout << state_string(descriptor) << endl;}
00071
00072 void c_print_final_descriptor(final_descriptor3 descriptor)
00073 {cout << state_string(descriptor) << endl;}
00074
00075
00076
00077
00078 void c_scatter3(initial_state3* init,
00079 intermediate_state3* inter,
00080 final_state3* final,
00081 real cpu_time_check,
00082 real dt_out,
00083 real dt_snap,
00084 real snap_cube_size) {
00085 scatter3(*init, *inter, *final, cpu_time_check,
00086 dt_out, dt_snap, snap_cube_size);
00087 }
00088 }
00089
00090