15#if defined __cplusplus
21static double PoPs_getBDFLS_mass(
char const *name,
PoP *pop,
double mass );
23#if defined __cplusplus
31#if defined __cplusplus
42 for( i1 = 0; i1 < n1; ++i1 ) {
46 snprintf( ZAName,
sizeof ZAName,
"%d%.3d", pop->
Z, pop->
A );
52 if(
smr_isOk( smr ) == 0 )
return( 1 );
65 if( ( pop =
PoP_new( smr ) ) != NULL ) {
78 for( i = 0; i < n; i++ ) {
79 if( strcmp(
PoPDatas[i].name, name ) == 0 ) {
85 pop->
mass = PoPs_getBDFLS_mass( name, pop,
PoPDatas[i].mass );
95static void *BDFLS_Data = NULL;
100static double PoPs_getBDFLS_mass(
char const * ,
PoP * ,
double mass ) {
104 int ZA = 1000 * pop->Z + pop->A;
107 if( BDFLS_Data == NULL )
return( mass );
109 mass_ = cbdflsGetMass( (cbdfls_file *) BDFLS_Data, ZA ); }
111 if( pop->name[0] ==
'e' ) mass_ = cbdflsGetMass( (cbdfls_file *) BDFLS_Data, 8 );
113 if( mass_ < 0 ) mass_ = mass;
128 if( BDFLS_Data != NULL ) cbdflsRelease( (cbdfls_file *) BDFLS_Data );
131 if( ( p = cbdflsOpen( name, &Error ) ) == NULL )
return( 1 );
132 BDFLS_Data = (
void *) p;
135 if( name == NULL ) BDFLS_Data = NULL;
140#if defined __cplusplus
int PoPs_setBDFLS_File(char const *name)
PoP * PoP_new(statusMessageReporting *smr)
int lPoPs_addParticleIfNeeded(statusMessageReporting *smr, char const *name, char const *special)
PoP * PoPs_particleCreateLoadInfo(statusMessageReporting *smr, const char *name)
int PoPs_particleLoadInfo(statusMessageReporting *smr, const char *name, PoP *pop)
int PoPs_particleReadDatabase(statusMessageReporting *smr, char const *name)
PoP * PoPs_addParticleIfNeeded(statusMessageReporting *smr, PoP *pop)
char const * unitsDB_addUnitIfNeeded(statusMessageReporting *smr, char const *unit)
#define smr_setReportError2(smr, libraryID, code, fmt,...)
#define smr_allocateCopyString2(smr, s, forItem)
void * smr_freeMemory(void **p)
int smr_isOk(statusMessageReporting *smr)