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
MCGIDI_particle * MCGIDI_particle_getInternalID(statusMessageReporting *smr, const char *const name, MCGIDI_POPs *pops)
static int numberOfParticles
double MCGIDI_particleMass_AMU(statusMessageReporting *smr, const char *name)
static MCGIDI_particle * particleListEnd
static int initialSizeOfList
MCGIDI_POP * MCGIDI_POPs_findParticle(MCGIDI_POPs *pops, char const *name)
static MCGIDI_particle ** particleSortedList
int MCGIDI_particle_freeInternalList(statusMessageReporting *smr)
static int sizeOfParticleSortedList
static MCGIDI_particle * particleList
double A(double temperature)
static constexpr double m
MCGIDI_particle * MCGIDI_particle_free(statusMessageReporting *smr, MCGIDI_particle *particle)
#define smr_malloc2(smr, size, zero, forItem)
int MCGIDI_particle_printInternalSortedList(statusMessageReporting *smr)
int smr_isOk(statusMessageReporting *smr)
char * smr_allocateCopyString(statusMessageReporting *smr, char const *s, char const *forItem, char const *file, int line, char const *function)
MCGIDI_particle * MCGIDI_particle_new(statusMessageReporting *smr)
int MCGIDI_miscNameToZAm(statusMessageReporting *smr, const char *name, int *Z, int *A, int *m, int *level)
int MCGIDI_particle_initialize(statusMessageReporting *smr, MCGIDI_particle *particle)
void * smr_freeMemory(void **p)
static int incrementalSizeOfList
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
#define smr_realloc2(smr, old, size, forItem)
int MCGIDI_particle_release(statusMessageReporting *smr, MCGIDI_particle *particle)