Skip to content
William Henney edited this page Oct 17, 2019 · 1 revision

Transition transition[up][lo];
state levels[n];

Transition {
  state *Lo, *Hi;
  emission *Emis;
  collision *Coll;
  Transition *nextemis, *nextcoll; /* Possible linked-list optimization */
}

emission {
  double Aul, opac, nphot, pump, tau;
  double escprob[n], destprob;
  int    ipdistfn;
  ....
}

collision {
  species *collider;
  double Cul;
  collision *next; /* Linked list for possible colliders */
}

state {
  char      chLabel[];
  species   *sp; /* nelem, mass */
  long int  ion;
  double    g, Pop, Energy, damp;
};

transitions[hi][lo].Lo->g;

sed commands to do this conversion (but needs tuning to cut out false +ves)

s/gLo/Lo->g/g;
s/gHi/Hi->g/g;

if (EmisLine[][][ipHi][ipLo] != NULL)
  EmisLine[][][ipHi][ipLo]->Lo->g;

Clone this wiki locally