8 #if defined __cplusplus
24 if( particle == NULL )
return( NULL );
45 if( *p == particle ) {
81 int i, iCmp,
min, mid,
max,
Z,
A,
m, level;
89 mid = ( min +
max ) / 2;
94 if( mid == 0 ) max = 0; }
97 if( min > max ) min =
max;
104 if( ( iCmp < 0 ) && ( mid != 0 ) ) {
111 if( ( particle->
name =
smr_allocateCopyString( smr, name,
"particle->name", __FILE__, __LINE__, __func__ ) ) == NULL )
goto err;
113 particle->
prior = NULL;
114 particle->
next = NULL;
132 "particleSortedList" ) ) == NULL )
goto err;
145 if( ( mid != 0 ) || ( iCmp > 0 ) ) mid++;
167 #if defined __cplusplus
T max(const T t1, const T t2)
brief Return the largest of the two arguments
MCGIDI_particle * MCGIDI_particle_free(statusMessageReporting *smr, MCGIDI_particle *particle)
int MCGIDI_particle_freeInternalList(statusMessageReporting *smr)
#define smr_realloc2(smr, old, size, forItem)
MCGIDI_particle * MCGIDI_particle_getInternalID(statusMessageReporting *smr, const char *const name, MCGIDI_POPs *pops)
char * smr_allocateCopyString(statusMessageReporting *smr, char const *s, char const *forItem, char const *file, int line, char const *function)
static int incrementalSizeOfList
int MCGIDI_particle_initialize(statusMessageReporting *smr, MCGIDI_particle *particle)
static constexpr double m
#define smr_malloc2(smr, size, zero, forItem)
static MCGIDI_particle ** particleSortedList
int MCGIDI_particle_release(statusMessageReporting *smr, MCGIDI_particle *particle)
int smr_isOk(statusMessageReporting *smr)
int MCGIDI_miscNameToZAm(statusMessageReporting *smr, const char *name, int *Z, int *A, int *m, int *level)
printf("%d Experimental points found\n", nlines)
static int initialSizeOfList
double A(double temperature)
double MCGIDI_particleMass_AMU(statusMessageReporting *smr, const char *name)
int MCGIDI_particle_printInternalSortedList(statusMessageReporting *smr)
void * smr_freeMemory(void **p)
MCGIDI_POP * MCGIDI_POPs_findParticle(MCGIDI_POPs *pops, char const *name)
static MCGIDI_particle * particleListEnd
static MCGIDI_particle * particleList
static int numberOfParticles
static int sizeOfParticleSortedList
MCGIDI_particle * MCGIDI_particle_new(statusMessageReporting *smr)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments