schiff_args.h (2404B)
1 /* Copyright (C) 2015-2016 CNRS 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SCHIFF_ARGS_H 17 #define SCHIFF_ARGS_H 18 19 #include "schiff_geometry.h" 20 #include <rsys/rsys.h> 21 #include <star/sschiff.h> 22 23 struct schiff_args { 24 const char* output_filename; /* File in which output data are stored */ 25 struct schiff_optical_properties* properties; /* List of properties */ 26 double* wavelengths; /* List of wavelengths to integrate */ 27 28 double characteristic_length; /* Characteristic length of the soft particles */ 29 30 /* List of parsed geometry distribution parameters and its associated random 31 * variate */ 32 struct schiff_geometry* geoms; 33 struct ssp_ran_discrete* ran_geoms; 34 35 unsigned ngeoms_dump; /* # sampled geometries to dump */ 36 unsigned nrealisations; /* # realisation */ 37 unsigned ndirs; /* Number of directions to sample per realisation */ 38 unsigned nangles; /* Number of scattering angles */ 39 unsigned nangles_inv; /* Number of angles in the the inverse phase function */ 40 41 unsigned nthreads; /* Hint on the number of thread to use */ 42 }; 43 44 static const struct schiff_args SCHIFF_ARGS_NULL = { 45 NULL, /* Output filename */ 46 NULL, /* List of optical properties */ 47 NULL, /* List of wavelength to integrate */ 48 -1.0, /* Caracteristic length */ 49 NULL, /* List of Schiff geometries */ 50 NULL, /* Schiff geometry random variates */ 51 0, /* # Dumped geometries */ 52 10000, /* # Sampled geometries */ 53 100, /* # Sampled directions per geometry */ 54 1000, /* # Scattering angles */ 55 2000, /* # angles in the inv cumulative phase function */ 56 SSCHIFF_NTHREADS_DEFAULT 57 }; 58 59 extern LOCAL_SYM res_T 60 schiff_args_init 61 (struct schiff_args* args, 62 const int argc, 63 char** argv); 64 65 extern LOCAL_SYM void 66 schiff_args_release 67 (struct schiff_args* args); 68 69 #endif /* SCHIFF_ARGS_H */ 70