fidasim Program

Uses

  • program~~fidasim~~UsesGraph program~fidasim fidasim module~hdf5_extra hdf5_extra program~fidasim->module~hdf5_extra omp_lib omp_lib program~fidasim->omp_lib module~libfida libfida program~fidasim->module~libfida H5LT H5LT module~hdf5_extra->H5LT HDF5 HDF5 module~hdf5_extra->HDF5 module~libfida->module~hdf5_extra module~libfida->H5LT module~utilities utilities module~libfida->module~utilities module~eigensystem eigensystem module~libfida->module~eigensystem module~libfida->HDF5 module~utilities->omp_lib

FIDASIM 1.3.4


Calls

program~~fidasim~~CallsGraph program~fidasim fidasim proc~bremsstrahlung bremsstrahlung program~fidasim->proc~bremsstrahlung proc~read_distribution read_distribution program~fidasim->proc~read_distribution proc~ndmc ndmc program~fidasim->proc~ndmc proc~read_neutrals read_neutrals program~fidasim->proc~read_neutrals proc~read_npa read_npa program~fidasim->proc~read_npa proc~read_equilibrium read_equilibrium program~fidasim->proc~read_equilibrium proc~npa_weights npa_weights program~fidasim->proc~npa_weights proc~read_inputs read_inputs program~fidasim->proc~read_inputs proc~fida_mc fida_mc program~fidasim->proc~fida_mc proc~write_neutrals write_neutrals program~fidasim->proc~write_neutrals proc~make_beam_grid make_beam_grid program~fidasim->proc~make_beam_grid proc~write_spectra write_spectra program~fidasim->proc~write_spectra proc~check_compression_availability check_compression_availability program~fidasim->proc~check_compression_availability proc~print_banner print_banner program~fidasim->proc~print_banner proc~halo halo program~fidasim->proc~halo proc~write_npa write_npa program~fidasim->proc~write_npa proc~dcx dcx program~fidasim->proc~dcx proc~fida_weights_los fida_weights_los program~fidasim->proc~fida_weights_los rng rng program~fidasim->rng proc~fida_f fida_f program~fidasim->proc~fida_f proc~neutron_mc neutron_mc program~fidasim->proc~neutron_mc proc~read_chords read_chords program~fidasim->proc~read_chords proc~npa_mc npa_mc program~fidasim->proc~npa_mc proc~read_tables read_tables program~fidasim->proc~read_tables proc~write_birth_profile write_birth_profile program~fidasim->proc~write_birth_profile proc~fida_weights_mc fida_weights_mc program~fidasim->proc~fida_weights_mc omp_set_num_threads omp_set_num_threads program~fidasim->omp_set_num_threads proc~read_beam read_beam program~fidasim->proc~read_beam proc~npa_f npa_f program~fidasim->proc~npa_f proc~neutron_f neutron_f program~fidasim->proc~neutron_f omp_get_num_procs omp_get_num_procs program~fidasim->omp_get_num_procs proc~randu randu proc~bremsstrahlung->proc~randu proc~get_plasma get_plasma proc~bremsstrahlung->proc~get_plasma proc~line_basis line_basis proc~bremsstrahlung->proc~line_basis h5fclose_f h5fclose_f proc~read_distribution->h5fclose_f h5open_f h5open_f proc~read_distribution->h5open_f proc~h5ltread_dataset_int_scalar_f h5ltread_dataset_int_scalar_f proc~read_distribution->proc~h5ltread_dataset_int_scalar_f h5close_f h5close_f proc~read_distribution->h5close_f proc~read_mc read_mc proc~read_distribution->proc~read_mc h5fopen_f h5fopen_f proc~read_distribution->h5fopen_f proc~read_f read_f proc~read_distribution->proc~read_f proc~ndmc->proc~randu proc~track track proc~ndmc->proc~track interface~store_neutrals store_neutrals proc~ndmc->interface~store_neutrals proc~mc_nbi mc_nbi proc~ndmc->proc~mc_nbi interface~randind randind proc~ndmc->interface~randind h5gclose_f h5gclose_f proc~read_neutrals->h5gclose_f proc~read_neutrals->h5fclose_f proc~read_neutrals->h5open_f proc~read_neutrals->proc~h5ltread_dataset_int_scalar_f proc~read_neutrals->h5close_f proc~read_neutrals->h5fopen_f h5gopen_f h5gopen_f proc~read_neutrals->h5gopen_f h5ltread_dataset_double_f h5ltread_dataset_double_f proc~read_neutrals->h5ltread_dataset_double_f proc~plane_basis plane_basis proc~read_npa->proc~plane_basis proc~read_npa->h5gclose_f proc~read_npa->h5fclose_f proc~read_npa->h5open_f proc~grid_intersect grid_intersect proc~read_npa->proc~grid_intersect proc~hit_npa_detector hit_npa_detector proc~read_npa->proc~hit_npa_detector proc~read_npa->proc~h5ltread_dataset_int_scalar_f proc~read_npa->h5close_f h5ltpath_valid_f h5ltpath_valid_f proc~read_npa->h5ltpath_valid_f h5ltread_dataset_string_f h5ltread_dataset_string_f proc~read_npa->h5ltread_dataset_string_f proc~read_npa->h5fopen_f proc~get_fields get_fields proc~read_npa->proc~get_fields proc~read_npa->h5gopen_f proc~read_npa->h5ltread_dataset_double_f h5ltread_dataset_int_f h5ltread_dataset_int_f proc~read_equilibrium->h5ltread_dataset_int_f proc~read_equilibrium->h5gclose_f proc~read_equilibrium->h5fclose_f proc~read_equilibrium->h5open_f proc~read_equilibrium->proc~h5ltread_dataset_int_scalar_f proc~read_equilibrium->h5close_f interface~deriv deriv proc~read_equilibrium->interface~deriv proc~read_equilibrium->h5fopen_f proc~read_equilibrium->h5gopen_f proc~read_equilibrium->h5ltread_dataset_double_f proc~gyro_step gyro_step proc~npa_weights->proc~gyro_step proc~npa_weights->proc~hit_npa_detector proc~attenuate attenuate proc~npa_weights->proc~attenuate proc~get_beam_cx_rate get_beam_cx_rate proc~npa_weights->proc~get_beam_cx_rate proc~npa_weights->proc~get_fields proc~write_npa_weights write_npa_weights proc~npa_weights->proc~write_npa_weights proc~fida_mc->proc~randu proc~fida_mc->proc~track proc~uvw_to_xyz uvw_to_xyz proc~fida_mc->proc~uvw_to_xyz proc~gyro_correction gyro_correction proc~fida_mc->proc~gyro_correction proc~fida_mc->proc~get_fields proc~write_neutrals->h5fclose_f h5ltmake_dataset_int_f h5ltmake_dataset_int_f proc~write_neutrals->h5ltmake_dataset_int_f proc~write_neutrals->h5open_f proc~write_neutrals->h5close_f proc~write_beam_grid write_beam_grid proc~write_neutrals->proc~write_beam_grid h5ltset_attribute_string_f h5ltset_attribute_string_f proc~write_neutrals->h5ltset_attribute_string_f interface~h5ltmake_compressed_dataset_double_f h5ltmake_compressed_dataset_double_f proc~write_neutrals->interface~h5ltmake_compressed_dataset_double_f h5fcreate_f h5fcreate_f proc~write_neutrals->h5fcreate_f proc~tb_zyx tb_zyx proc~make_beam_grid->proc~tb_zyx proc~in_plasma in_plasma proc~make_beam_grid->proc~in_plasma proc~write_spectra->h5fclose_f proc~write_spectra->h5ltmake_dataset_int_f proc~write_spectra->h5open_f proc~write_spectra->h5close_f proc~write_spectra->h5ltset_attribute_string_f proc~write_spectra->interface~h5ltmake_compressed_dataset_double_f proc~write_spectra->h5fcreate_f h5zget_filter_info_f h5zget_filter_info_f proc~check_compression_availability->h5zget_filter_info_f h5zfilter_avail_f h5zfilter_avail_f proc~check_compression_availability->h5zfilter_avail_f proc~check_compression_availability->h5open_f proc~check_compression_availability->h5close_f proc~halo->proc~track proc~mc_halo mc_halo proc~halo->proc~mc_halo proc~get_nlaunch get_nlaunch proc~halo->proc~get_nlaunch proc~halo->interface~store_neutrals proc~halo->proc~get_plasma proc~write_npa->h5gclose_f proc~write_npa->h5fclose_f proc~write_npa->h5ltmake_dataset_int_f proc~write_npa->h5open_f proc~write_npa->h5close_f h5gcreate_f h5gcreate_f proc~write_npa->h5gcreate_f interface~h5ltmake_compressed_dataset_int_f h5ltmake_compressed_dataset_int_f proc~write_npa->interface~h5ltmake_compressed_dataset_int_f proc~write_npa->h5ltset_attribute_string_f proc~write_npa->interface~h5ltmake_compressed_dataset_double_f proc~write_npa->h5fcreate_f proc~dcx->proc~track proc~dcx->proc~mc_halo proc~dcx->proc~get_nlaunch proc~dcx->interface~store_neutrals proc~dcx->proc~get_plasma proc~bt_cx_rates bt_cx_rates proc~fida_weights_los->proc~bt_cx_rates proc~fida_weights_los->proc~track proc~pitch_to_vec pitch_to_vec proc~fida_weights_los->proc~pitch_to_vec proc~fida_weights_los->proc~grid_intersect proc~store_fw_photons_at_chan store_fw_photons_at_chan proc~fida_weights_los->proc~store_fw_photons_at_chan proc~fida_weights_los->proc~in_plasma proc~write_fida_weights write_fida_weights proc~fida_weights_los->proc~write_fida_weights proc~fida_weights_los->proc~get_fields proc~fida_weights_los->proc~get_plasma proc~colrad colrad proc~fida_weights_los->proc~colrad proc~bb_cx_rates bb_cx_rates proc~fida_weights_los->proc~bb_cx_rates proc~fida_f->proc~track proc~fida_f->proc~get_nlaunch proc~mc_fastion mc_fastion proc~fida_f->proc~mc_fastion proc~fida_f->proc~gyro_correction proc~fida_f->proc~get_plasma proc~neutron_mc->proc~uvw_to_xyz proc~get_neutron_rate get_neutron_rate proc~neutron_mc->proc~get_neutron_rate proc~neutron_mc->proc~gyro_correction proc~neutron_mc->proc~get_fields proc~store_neutrons store_neutrons proc~neutron_mc->proc~store_neutrons proc~neutron_mc->proc~get_plasma proc~write_neutrons write_neutrons proc~neutron_mc->proc~write_neutrons proc~read_chords->proc~randu proc~read_chords->h5gclose_f proc~read_chords->proc~track proc~read_chords->h5fclose_f proc~read_chords->h5open_f proc~read_chords->proc~grid_intersect proc~read_chords->proc~h5ltread_dataset_int_scalar_f proc~read_chords->h5close_f proc~read_chords->h5ltpath_valid_f proc~read_chords->h5ltread_dataset_string_f proc~read_chords->h5fopen_f proc~read_chords->h5gopen_f proc~read_chords->h5ltread_dataset_double_f proc~read_chords->proc~line_basis proc~npa_mc->proc~randu proc~get_indices get_indices proc~npa_mc->proc~get_indices proc~gyro_surface gyro_surface proc~npa_mc->proc~gyro_surface proc~npa_mc->proc~uvw_to_xyz proc~npa_mc->proc~hit_npa_detector proc~store_npa store_npa proc~npa_mc->proc~store_npa proc~gyro_trajectory gyro_trajectory proc~npa_mc->proc~gyro_trajectory proc~npa_mc->proc~attenuate proc~npa_mc->proc~get_beam_cx_rate proc~npa_mc->proc~get_fields proc~npa_gyro_range npa_gyro_range proc~npa_mc->proc~npa_gyro_range proc~read_atomic_transitions read_atomic_transitions proc~read_tables->proc~read_atomic_transitions proc~read_tables->h5fclose_f proc~read_atomic_rate read_atomic_rate proc~read_tables->proc~read_atomic_rate proc~read_tables->h5open_f proc~read_tables->proc~h5ltread_dataset_int_scalar_f proc~read_tables->h5close_f proc~read_tables->h5fopen_f proc~read_tables->h5ltread_dataset_double_f proc~read_atomic_cross read_atomic_cross proc~read_tables->proc~read_atomic_cross proc~read_nuclear_rates read_nuclear_rates proc~read_tables->proc~read_nuclear_rates proc~write_birth_profile->h5fclose_f proc~write_birth_profile->h5ltmake_dataset_int_f proc~write_birth_profile->h5open_f proc~write_birth_profile->h5close_f proc~xyz_to_uvw xyz_to_uvw proc~write_birth_profile->proc~xyz_to_uvw proc~write_birth_profile->proc~write_beam_grid proc~write_birth_profile->interface~h5ltmake_compressed_dataset_int_f proc~write_birth_profile->h5ltset_attribute_string_f proc~write_birth_profile->interface~h5ltmake_compressed_dataset_double_f proc~write_birth_profile->h5fcreate_f proc~fida_weights_mc->proc~randu proc~fida_weights_mc->proc~track proc~fida_weights_mc->proc~get_nlaunch proc~fida_weights_mc->proc~write_fida_weights proc~fida_weights_mc->proc~gyro_correction proc~get_ep_denf get_ep_denf proc~fida_weights_mc->proc~get_ep_denf proc~fida_weights_mc->proc~get_fields proc~fida_weights_mc->proc~get_plasma proc~fida_weights_mc->interface~randind proc~read_beam->h5ltread_dataset_int_f proc~read_beam->h5gclose_f proc~read_beam->proc~tb_zyx proc~read_beam->h5fclose_f proc~read_beam->proc~uvw_to_xyz proc~read_beam->h5open_f proc~read_beam->proc~h5ltread_dataset_int_scalar_f proc~read_beam->h5close_f proc~read_beam->h5ltpath_valid_f proc~read_beam->h5ltread_dataset_string_f proc~read_beam->h5fopen_f proc~h5ltread_dataset_double_scalar_f h5ltread_dataset_double_scalar_f proc~read_beam->proc~h5ltread_dataset_double_scalar_f proc~read_beam->h5gopen_f proc~read_beam->h5ltread_dataset_double_f proc~npa_f->proc~get_indices proc~npa_f->proc~gyro_surface proc~npa_f->proc~get_nlaunch proc~npa_f->proc~hit_npa_detector proc~npa_f->proc~mc_fastion proc~npa_f->proc~store_npa proc~npa_f->proc~gyro_trajectory proc~npa_f->proc~attenuate proc~npa_f->proc~get_beam_cx_rate proc~npa_f->proc~npa_gyro_range proc~npa_f->proc~get_plasma proc~neutron_f->proc~uvw_to_xyz proc~neutron_f->proc~get_neutron_rate proc~neutron_f->proc~gyro_correction proc~neutron_f->proc~get_fields proc~neutron_f->proc~store_neutrons proc~neutron_f->proc~get_plasma proc~neutron_f->proc~write_neutrons proc~rng_uniform rng_uniform proc~randu->proc~rng_uniform omp_get_thread_num omp_get_thread_num proc~randu->omp_get_thread_num proc~cross_product cross_product proc~plane_basis->proc~cross_product interface~interpol_coeff interpol_coeff proc~bt_cx_rates->interface~interpol_coeff proc~track->proc~get_indices proc~track->proc~in_plasma proc~read_atomic_transitions->proc~h5ltread_dataset_int_scalar_f proc~read_atomic_transitions->h5ltpath_valid_f proc~read_atomic_transitions->proc~h5ltread_dataset_double_scalar_f proc~read_atomic_transitions->h5ltread_dataset_double_f h5ltget_dataset_ndims_f h5ltget_dataset_ndims_f proc~read_atomic_transitions->h5ltget_dataset_ndims_f proc~read_atomic_rate->proc~h5ltread_dataset_int_scalar_f proc~read_atomic_rate->h5ltpath_valid_f proc~read_atomic_rate->proc~h5ltread_dataset_double_scalar_f proc~read_atomic_rate->h5ltread_dataset_double_f proc~read_atomic_rate->h5ltget_dataset_ndims_f proc~mc_halo->proc~randu proc~mc_halo->proc~get_plasma proc~randn randn proc~mc_halo->proc~randn proc~gyro_step->proc~cross_product proc~line_plane_intersect line_plane_intersect proc~hit_npa_detector->proc~line_plane_intersect proc~in_boundary in_boundary proc~hit_npa_detector->proc~in_boundary proc~h5ltread_dataset_int_scalar_f->h5ltread_dataset_int_f proc~spectrum spectrum proc~store_fw_photons_at_chan->proc~spectrum proc~mc_fastion->proc~randu proc~mc_fastion->proc~get_fields proc~mc_fastion->interface~randind proc~get_distribution get_distribution proc~mc_fastion->proc~get_distribution proc~store_npa->proc~xyz_to_uvw proc~store_npa->proc~get_fields proc~read_mc->h5ltread_dataset_int_f proc~read_mc->proc~uvw_to_xyz proc~read_mc->proc~h5ltread_dataset_int_scalar_f proc~read_mc->proc~in_plasma proc~read_mc->h5ltread_dataset_double_f proc~circle_grid_intersect circle_grid_intersect proc~read_mc->proc~circle_grid_intersect proc~write_beam_grid->h5gclose_f proc~write_beam_grid->h5gcreate_f proc~write_beam_grid->proc~xyz_to_uvw proc~write_beam_grid->h5ltset_attribute_string_f proc~write_beam_grid->interface~h5ltmake_compressed_dataset_double_f proc~store_neutrals_cell store_neutrals_cell interface~store_neutrals->proc~store_neutrals_cell proc~store_neutrals_track store_neutrals_track interface~store_neutrals->proc~store_neutrals_track proc~h5ltmake_compressed_dataset_int_f_2 h5ltmake_compressed_dataset_int_f_2 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_2 proc~h5ltmake_compressed_dataset_int_f_3 h5ltmake_compressed_dataset_int_f_3 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_3 proc~h5ltmake_compressed_dataset_int_f_1 h5ltmake_compressed_dataset_int_f_1 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_1 proc~h5ltmake_compressed_dataset_int_f_6 h5ltmake_compressed_dataset_int_f_6 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_6 proc~h5ltmake_compressed_dataset_int_f_7 h5ltmake_compressed_dataset_int_f_7 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_7 proc~h5ltmake_compressed_dataset_int_f_4 h5ltmake_compressed_dataset_int_f_4 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_4 proc~h5ltmake_compressed_dataset_int_f_5 h5ltmake_compressed_dataset_int_f_5 interface~h5ltmake_compressed_dataset_int_f->proc~h5ltmake_compressed_dataset_int_f_5 proc~in_plasma->proc~xyz_to_uvw proc~in_plasma->interface~interpol_coeff proc~get_neutron_rate->interface~interpol_coeff proc~write_fida_weights->h5fclose_f proc~write_fida_weights->h5ltmake_dataset_int_f proc~write_fida_weights->h5open_f proc~write_fida_weights->h5close_f proc~write_fida_weights->h5ltset_attribute_string_f proc~write_fida_weights->interface~h5ltmake_compressed_dataset_double_f proc~write_fida_weights->h5fcreate_f proc~gyro_correction->proc~randu proc~gyro_correction->proc~pitch_to_vec proc~gyro_correction->proc~gyro_step proc~get_ep_denf->proc~xyz_to_uvw interface~interpol interpol proc~get_ep_denf->interface~interpol proc~attenuate->proc~get_plasma proc~attenuate->proc~colrad proc~get_beam_cx_rate->proc~bt_cx_rates proc~get_beam_cx_rate->proc~get_plasma proc~get_beam_cx_rate->proc~bb_cx_rates proc~h5ltmake_compressed_dataset_double_f_7 h5ltmake_compressed_dataset_double_f_7 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_7 proc~h5ltmake_compressed_dataset_double_f_6 h5ltmake_compressed_dataset_double_f_6 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_6 proc~h5ltmake_compressed_dataset_double_f_5 h5ltmake_compressed_dataset_double_f_5 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_5 proc~h5ltmake_compressed_dataset_double_f_4 h5ltmake_compressed_dataset_double_f_4 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_4 proc~h5ltmake_compressed_dataset_double_f_3 h5ltmake_compressed_dataset_double_f_3 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_3 proc~h5ltmake_compressed_dataset_double_f_2 h5ltmake_compressed_dataset_double_f_2 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_2 proc~h5ltmake_compressed_dataset_double_f_1 h5ltmake_compressed_dataset_double_f_1 interface~h5ltmake_compressed_dataset_double_f->proc~h5ltmake_compressed_dataset_double_f_1 proc~get_fields->proc~in_plasma proc~calc_perp_vectors calc_perp_vectors proc~get_fields->proc~calc_perp_vectors proc~read_f->proc~h5ltread_dataset_int_scalar_f proc~read_f->h5ltread_dataset_double_f proc~h5ltread_dataset_double_scalar_f->h5ltread_dataset_double_f proc~approx_eq approx_eq proc~npa_gyro_range->proc~approx_eq proc~gyro_range gyro_range proc~npa_gyro_range->proc~gyro_range proc~mc_nbi->proc~randu proc~mc_nbi->proc~grid_intersect proc~mc_nbi->proc~in_plasma proc~mc_nbi->proc~randn proc~write_npa_weights->h5fclose_f proc~write_npa_weights->h5ltmake_dataset_int_f proc~write_npa_weights->h5open_f proc~write_npa_weights->h5close_f proc~write_npa_weights->proc~write_beam_grid proc~write_npa_weights->h5ltset_attribute_string_f proc~write_npa_weights->interface~h5ltmake_compressed_dataset_double_f proc~write_npa_weights->h5fcreate_f proc~get_plasma->proc~in_plasma proc~matinv matinv proc~colrad->proc~matinv proc~eigen eigen proc~colrad->proc~eigen proc~get_rate_matrix get_rate_matrix proc~colrad->proc~get_rate_matrix proc~write_neutrons->h5fclose_f proc~write_neutrons->h5ltmake_dataset_int_f proc~write_neutrons->h5open_f proc~write_neutrons->h5close_f proc~write_neutrons->h5ltset_attribute_string_f proc~write_neutrons->interface~h5ltmake_compressed_dataset_double_f proc~write_neutrons->h5fcreate_f h5ltmake_dataset_double_f h5ltmake_dataset_double_f proc~write_neutrons->h5ltmake_dataset_double_f proc~line_basis->proc~tb_zyx proc~read_atomic_cross->proc~h5ltread_dataset_int_scalar_f proc~read_atomic_cross->h5ltpath_valid_f proc~read_atomic_cross->proc~h5ltread_dataset_double_scalar_f proc~read_atomic_cross->h5ltread_dataset_double_f proc~bb_cx_rates->interface~interpol_coeff proc~read_nuclear_rates->proc~h5ltread_dataset_int_scalar_f proc~read_nuclear_rates->h5ltpath_valid_f proc~read_nuclear_rates->proc~h5ltread_dataset_double_scalar_f proc~read_nuclear_rates->h5ltread_dataset_double_f proc~get_distribution->proc~xyz_to_uvw proc~get_distribution->interface~interpol proc~gyro_range->proc~line_plane_intersect proc~gyro_range->proc~in_boundary proc~gyro_surface_coordinates gyro_surface_coordinates proc~gyro_range->proc~gyro_surface_coordinates proc~in_gyro_surface in_gyro_surface proc~gyro_range->proc~in_gyro_surface proc~boundary_edge boundary_edge proc~gyro_range->proc~boundary_edge proc~line_gyro_surface_intersect line_gyro_surface_intersect proc~gyro_range->proc~line_gyro_surface_intersect proc~randn->omp_get_thread_num proc~rng_normal rng_normal proc~randn->proc~rng_normal proc~circle_grid_intersect->proc~grid_intersect proc~circle_grid_intersect->proc~approx_eq proc~in_grid in_grid proc~circle_grid_intersect->proc~in_grid proc~ludcmp ludcmp proc~matinv->proc~ludcmp proc~h5ltmake_compressed_dataset_double_f_7->h5ltmake_dataset_double_f h5sclose_f h5sclose_f proc~h5ltmake_compressed_dataset_double_f_7->h5sclose_f h5dclose_f h5dclose_f proc~h5ltmake_compressed_dataset_double_f_7->h5dclose_f h5pcreate_f h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_7->h5pcreate_f h5screate_simple_f h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_7->h5screate_simple_f h5pclose_f h5pclose_f proc~h5ltmake_compressed_dataset_double_f_7->h5pclose_f h5dcreate_f h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_7->h5dcreate_f h5dwrite_f h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_7->h5dwrite_f h5pset_deflate_f h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_7->h5pset_deflate_f h5pset_chunk_f h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_7->h5pset_chunk_f proc~chunk_size chunk_size proc~h5ltmake_compressed_dataset_double_f_7->proc~chunk_size h5pset_shuffle_f h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_7->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_6->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_6->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_6->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_6->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_6->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_6->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_6->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_6->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_6->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_6->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_6->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_6->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_5->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_5->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_5->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_5->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_5->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_5->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_5->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_5->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_5->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_5->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_5->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_5->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_4->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_4->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_4->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_4->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_4->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_4->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_4->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_4->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_4->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_4->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_4->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_4->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_3->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_3->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_3->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_3->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_3->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_3->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_3->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_3->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_3->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_3->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_3->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_3->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_2->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_2->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_2->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_2->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_2->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_2->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_2->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_2->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_2->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_2->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_2->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_2->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_double_f_1->h5ltmake_dataset_double_f proc~h5ltmake_compressed_dataset_double_f_1->h5sclose_f proc~h5ltmake_compressed_dataset_double_f_1->h5dclose_f proc~h5ltmake_compressed_dataset_double_f_1->h5pcreate_f proc~h5ltmake_compressed_dataset_double_f_1->h5screate_simple_f proc~h5ltmake_compressed_dataset_double_f_1->h5pclose_f proc~h5ltmake_compressed_dataset_double_f_1->h5dcreate_f proc~h5ltmake_compressed_dataset_double_f_1->h5dwrite_f proc~h5ltmake_compressed_dataset_double_f_1->h5pset_deflate_f proc~h5ltmake_compressed_dataset_double_f_1->h5pset_chunk_f proc~h5ltmake_compressed_dataset_double_f_1->proc~chunk_size proc~h5ltmake_compressed_dataset_double_f_1->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_2->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_2->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_2->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_2->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_2->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_2->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_2->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_2->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_2->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_2->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_2->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_2->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_3->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_3->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_3->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_3->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_3->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_3->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_3->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_3->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_3->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_3->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_3->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_3->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_1->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_1->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_1->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_1->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_1->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_1->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_1->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_1->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_1->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_1->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_1->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_1->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_6->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_6->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_6->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_6->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_6->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_6->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_6->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_6->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_6->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_6->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_6->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_6->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_7->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_7->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_7->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_7->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_7->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_7->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_7->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_7->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_7->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_7->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_7->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_7->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_4->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_4->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_4->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_4->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_4->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_4->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_4->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_4->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_4->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_4->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_4->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_4->h5pset_shuffle_f proc~h5ltmake_compressed_dataset_int_f_5->h5ltmake_dataset_int_f proc~h5ltmake_compressed_dataset_int_f_5->h5sclose_f proc~h5ltmake_compressed_dataset_int_f_5->h5dclose_f proc~h5ltmake_compressed_dataset_int_f_5->h5pcreate_f proc~h5ltmake_compressed_dataset_int_f_5->h5screate_simple_f proc~h5ltmake_compressed_dataset_int_f_5->h5pclose_f proc~h5ltmake_compressed_dataset_int_f_5->h5dcreate_f proc~h5ltmake_compressed_dataset_int_f_5->h5dwrite_f proc~h5ltmake_compressed_dataset_int_f_5->h5pset_deflate_f proc~h5ltmake_compressed_dataset_int_f_5->h5pset_chunk_f proc~h5ltmake_compressed_dataset_int_f_5->proc~chunk_size proc~h5ltmake_compressed_dataset_int_f_5->h5pset_shuffle_f proc~elmtrans elmtrans proc~eigen->proc~elmtrans proc~balback balback proc~eigen->proc~balback proc~hqr2 hqr2 proc~eigen->proc~hqr2 proc~elmhes elmhes proc~eigen->proc~elmhes proc~balance balance proc~eigen->proc~balance proc~get_rate_matrix->interface~interpol_coeff proc~interpol1d_coeff_arr interpol1D_coeff_arr interface~interpol_coeff->proc~interpol1d_coeff_arr proc~interpol1d_coeff interpol1D_coeff interface~interpol_coeff->proc~interpol1d_coeff proc~interpol2d_coeff interpol2D_coeff interface~interpol_coeff->proc~interpol2d_coeff proc~interpol2d_coeff_arr interpol2D_coeff_arr interface~interpol_coeff->proc~interpol2d_coeff_arr proc~interpol2d_arr interpol2D_arr interface~interpol->proc~interpol2d_arr proc~interpol2d_2d_arr interpol2D_2D_arr interface~interpol->proc~interpol2d_2d_arr proc~interpol1d_arr interpol1D_arr interface~interpol->proc~interpol1d_arr proc~approx_le approx_le proc~in_grid->proc~approx_le proc~approx_ge approx_ge proc~in_grid->proc~approx_ge proc~interpol2d_arr->interface~interpol_coeff proc~interpol1d_coeff_arr->proc~interpol1d_coeff proc~rng_normal->proc~rng_uniform proc~outerprod outerprod proc~ludcmp->proc~outerprod proc~interpol2d_2d_arr->interface~interpol_coeff proc~hqrvec hqrvec proc~hqr2->proc~hqrvec proc~interpol2d_coeff_arr->proc~interpol2d_coeff proc~interpol1d_arr->interface~interpol_coeff proc~approx_le->proc~approx_eq proc~approx_ge->proc~approx_eq

Contents

Source Code


Variables

Type AttributesNameInitial
character(len=3) :: arg =''
integer, dimension(8):: time_arr
integer, dimension(8):: time_start
integer, dimension(8):: time_end
integer :: i
integer :: narg
integer :: nthreads
integer :: max_threads
integer :: hour
integer :: minu
integer :: sec

Source Code

program fidasim
    !+ FIDASIM {!../VERSION!}
    use libfida
    use hdf5_extra
#ifdef _OMP
    use omp_lib
#endif
    implicit none
    character(3)          :: arg = ''
    integer, dimension(8) :: time_arr,time_start,time_end !Time array
    integer               :: i,narg,nthreads,max_threads
    integer               :: hour,minu,sec

#ifdef _VERSION
    version = _VERSION
#endif

    call print_banner()

    narg = command_argument_count()
    if(narg.eq.0) then
        write(*,'(a)') "usage: ./fidasim namelist_file [num_threads]"
        stop
    else
        call get_command_argument(1,namelist_file)
    endif

    !! Check if compression is possible
    call check_compression_availability()

    !! measure time
    call date_and_time (values=time_start)

    call read_inputs()

#ifdef _OMP
    max_threads = OMP_get_num_procs()
    if(narg.ge.2) then
        call get_command_argument(2,arg)
        read(arg,'(i3)') nthreads
    else
        nthreads = max_threads
    endif
    max_threads = min(nthreads,max_threads)
    if(inputs%verbose.ge.1) then
        write(*,'(a)') "---- OpenMP settings ----"
        write(*,'(T2,"Number of threads: ",i2)') max_threads
        write(*,*) ''
    endif
    call OMP_set_num_threads(max_threads)
#else
    max_threads = 1
#endif

    !! ----------------------------------------------------------
    !! ------ INITIALIZE THE RANDOM NUMBER GENERATOR  -----------
    !! ----------------------------------------------------------
    allocate(rng(max_threads))
    do i=1,max_threads
        call rng_init(rng(i),932117 + i)
    enddo

    !! ----------------------------------------------------------
    !! ------- READ GRIDS, PROFILES, LOS, TABLES, & FBM --------
    !! ----------------------------------------------------------
    call read_equilibrium()
    call make_beam_grid()
    call read_beam()
    call read_tables()
    call read_distribution()

    allocate(spec_chords%inter(beam_grid%nx,beam_grid%ny,beam_grid%nz))
    if((inputs%calc_spec.ge.1).or.(inputs%calc_fida_wght.ge.1)) then
        call read_chords()
    endif

    if((inputs%calc_npa.ge.1).or.(inputs%calc_npa_wght.ge.1)) then
        call read_npa()
    endif

    !! ----------------------------------------------------------
    !! --------------- ALLOCATE THE RESULT ARRAYS ---------------
    !! ----------------------------------------------------------
    !! neutral density array!
    allocate(neut%dens(nlevs,ntypes,beam_grid%nx,beam_grid%ny,beam_grid%nz))
    neut%dens = 0.d0

    !! birth profile
    if(inputs%calc_birth.ge.1) then
        allocate(birth%dens(3, &
                            beam_grid%nx, &
                            beam_grid%ny, &
                            beam_grid%nz))
        allocate(birth%neut_type(int(inputs%n_birth*inputs%n_nbi)))
        allocate(birth%ind(3,int(inputs%n_birth*inputs%n_nbi)))
        allocate(birth%ri(3,int(inputs%n_birth*inputs%n_nbi)))
        allocate(birth%vi(3,int(inputs%n_birth*inputs%n_nbi)))
        birth%neut_type = 0
        birth%dens = 0.d0
        birth%ind = 0
        birth%ri = 0.d0
        birth%vi = 0.d0
    endif

    if(inputs%calc_spec.ge.1) then
        allocate(spec%brems(inputs%nlambda,spec_chords%nchan))
        allocate(spec%bes(inputs%nlambda,spec_chords%nchan,4))
        allocate(spec%fida(inputs%nlambda,spec_chords%nchan,particles%nclass))
        spec%brems = 0.d0
        spec%bes = 0.d0
        spec%fida = 0.d0
    endif

    if(inputs%calc_npa.ge.1)then
        npa%nchan = npa_chords%nchan
        allocate(npa%part(npa%nmax))
        if(inputs%dist_type.eq.1) then
            npa%nenergy = fbm%nenergy
            allocate(npa%energy(npa%nenergy))
            npa%energy = fbm%energy
        else
            allocate(npa%energy(npa%nenergy))
            do i=1,npa%nenergy
                npa%energy(i)=real(i-0.5)
            enddo
        endif
        allocate(npa%flux(npa%nenergy,npa%nchan,particles%nclass))
        npa%flux = 0.0
    endif

    if(inputs%calc_neutron.ge.1)then
        allocate(neutron%rate(particles%nclass))
        neutron%rate = 0.d0
    endif

    !! -----------------------------------------------------------------------
    !! --------------- CALCULATE/LOAD the BEAM and HALO DENSITY---------------
    !! -----------------------------------------------------------------------
    if(inputs%load_neutrals.eq.1) then
        call read_neutrals()
    else
        !! ----------- BEAM NEUTRALS ---------- !!
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'ndmc:    ' , &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        call ndmc
        if(inputs%calc_birth.eq.1)then
            call write_birth_profile()
        endif
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''

        !! ---------- DCX (Direct charge exchange) ---------- !!
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'dcx:     ' , &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        call dcx()
        if(inputs%dump_dcx.eq.1) call write_dcx()
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''

        !! ---------- HALO ---------- !!
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'halo:    ' , &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        call halo()
        !! ---------- WRITE NEUTRALS ---------- !!
        call write_neutrals()
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    !! -----------------------------------------------------------------------
    !!----------------------------- BREMSSTRAHLUNG ---------------------------
    !! -----------------------------------------------------------------------
    if(inputs%calc_brems.ge.1) then
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'bremsstrahlung:    ' , &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        call bremsstrahlung()
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    !! -----------------------------------------------------------------------
    !! --------------------- CALCULATE the FIDA RADIATION --------------------
    !! -----------------------------------------------------------------------
    if(inputs%calc_fida.ge.1)then
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'fida:    ' , &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        if(inputs%dist_type.eq.1) then
            call fida_f()
        else
            call fida_mc()
        endif
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    if(inputs%calc_spec.ge.1) then
        call write_spectra()
        write(*,'(30X,a)') ''
    endif

    !! -----------------------------------------------------------------------
    !! ----------------------- CALCULATE the NPA FLUX ------------------------
    !! -----------------------------------------------------------------------
    if(inputs%calc_npa.ge.1)then
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'npa:    ' , &
            time_arr(5),time_arr(6),time_arr(7)
        endif
        if(inputs%dist_type.eq.1) then
            call npa_f()
        else
            call npa_mc()
        endif
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    if(inputs%calc_npa.ge.1) then
        call write_npa()
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    !! -------------------------------------------------------------------
    !! ------------------- Calculation of neutron flux -------------------
    !! -------------------------------------------------------------------
    if(inputs%calc_neutron.ge.1) then
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'neutron rate:    ',  &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        if(inputs%dist_type.eq.1) then
            call neutron_f()
        else
            call neutron_mc()
        endif
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    !! -------------------------------------------------------------------
    !! ----------- Calculation of weight functions -----------------------
    !! -------------------------------------------------------------------
    if(inputs%calc_fida_wght.ge.1) then
        colrad_threshold=0. !! to speed up simulation!
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'fida weight function:    ',  &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        if(inputs%calc_fida_wght.eq.1) then
            call fida_weights_los()
        else
            call fida_weights_mc()
        endif
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    if(inputs%calc_npa_wght.ge.1) then
        call date_and_time (values=time_arr)
        if(inputs%verbose.ge.1) then
            write(*,'(A,I2,":",I2.2,":",I2.2)') 'npa weight function:    ',  &
                  time_arr(5),time_arr(6),time_arr(7)
        endif
        call npa_weights()
        if(inputs%verbose.ge.1) write(*,'(30X,a)') ''
    endif

    call date_and_time (values=time_arr)
    if(inputs%verbose.ge.1) then
        write(*,'(A,I2,":",I2.2,":",I2.2)') 'END: hour, minute, second: ',&
              time_arr(5),time_arr(6),time_arr(7)
    endif

    call date_and_time (values=time_end)
    hour = time_end(5) - time_start(5)
    minu = time_end(6) - time_start(6)
    sec  = time_end(7) - time_start(7)
    if (minu.lt.0.) then
        minu = minu +60
        hour = hour -1
    endif
    if (sec.lt.0.) then
        sec  = sec +60
        minu = minu -1
    endif

    if(inputs%verbose.ge.1) then
        write(*,'(A,18X,I2,":",I2.2,":",I2.2)') 'duration:',hour,minu,sec
    endif

end program fidasim