File: TRAN_Set_MP.c

package info (click to toggle)
openmx 3.2.4.dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 62,572 kB
  • ctags: 2,684
  • sloc: ansic: 130,666; python: 876; makefile: 560; xml: 63; perl: 18; sh: 4
file content (26 lines) | stat: -rw-r--r-- 442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
#include <math.h>
#include <string.h>

void TRAN_Set_MP(
        int job, 
        int atomnum, int *WhatSpecies, int *Spe_Total_CNO, 
        int *NUM,  /* output */
        int *MP    /* output */
)
{
  int Anum, i, wanA, tnoA;

 /* setup MP */
  Anum = 1;
  for (i=1; i<=atomnum; i++){
    if (job) MP[i]=Anum; 
    wanA = WhatSpecies[i];
    tnoA = Spe_Total_CNO[wanA];
    Anum = Anum + tnoA;
  }

  *NUM=Anum-1;
}