OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [ultrasp6.c] - Blame information for rev 764

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* PR target/7784 */
2
/* Originator: Peter van Hoof <p.van-hoof@qub.ac.uk> */
3
 
4
/* { dg-do compile } */
5
/* { dg-options "-O2 -mcpu=ultrasparc" } */
6
 
7
typedef struct
8
{
9
  float EnergyErg;
10
  float ots;
11
} EmLine;
12
 
13
extern const int ipH_LIKE ;
14
extern const int ipHYDROGEN ;
15
extern const int ipH1s;
16
extern const int ipH2s;
17
extern const int ipH2p;
18
 
19
extern EmLine ****EmisLines;
20
 
21
typedef struct
22
{
23
  long n;
24
  long s;
25
  long l;
26
} Elevels;
27
 
28
extern struct t_iso
29
{
30
  float ***Pop2Ion;
31
  long int numLevels[2][30L];
32
} iso;
33
 
34
extern struct t_LineSave
35
{
36
  long int nsum;
37
  long int ndsum;
38
  long int nComment;
39
  long int npxdd;
40
  long int ipass;
41
  char chHoldComments[10][200];
42
} LineSave;
43
 
44
extern struct t_hydro
45
{
46
  int lgHydEmiss;
47
  float **pestrk ;
48
} hydro;
49
 
50
extern struct t_dense
51
{
52
  double DensityLaw[10];
53
  float frad[500];
54
  float fhden[500];
55
  float den0;
56
  double eden;
57
} dense;
58
 
59
extern struct t_abund
60
{
61
  float xIonFracs[30L +3][30L +1];
62
} abund;
63
 
64
extern struct t_CaseBHS
65
{
66
  long int nDensity[2][8] , ntemp[2][8] , ncut[2][8] ;
67
  int lgHCaseBOK[2][8];
68
} CaseBHS ;
69
 
70
extern struct t_smbeta
71
{
72
  float SimHBeta,
73
    cn4861,
74
    cn1216,
75
    sv4861,
76
    sv1216;
77
} smbeta;
78
 
79
extern struct t_phycon
80
{
81
  float te;
82
} phycon;
83
 
84
 
85
extern struct t_sphere
86
{
87
  int lgSphere;
88
  float covgeo;
89
} sphere;
90
 
91
void linadd(double xInten, float wavelength, char *chLab, char chInfo);
92
 
93
extern struct t_radiusVar
94
{
95
  int lgDrNeg;
96
  double dVeff;
97
} radius;
98
 
99
void lines_hydro(void)
100
{
101
  long int i, nelem, ipHi, ipLo;
102
  double hbetab, em , EmisFac, pump;
103
  char chLabel[5];
104
 
105
  linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][3]*hydro.pestrk[3][2]*3.025e-12, 6563,"Strk",'i');
106
 
107
  linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][2]*4.084e-12, 4861,"Strk",'i');
108
 
109
  linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][4]*hydro.pestrk[4][3]*1.059e-12, 18751,"Strk",'i');
110
 
111
  linadd(abund.xIonFracs[ipHYDROGEN][1]*iso.Pop2Ion[ipH_LIKE][ipHYDROGEN][5]*hydro.pestrk[5][4]*4.900e-13, 40512,"Strk",'i');
112
 
113
  ((void)((LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.) || (__assert("LineSave.ipass <1 || EmisLines[ipH_LIKE][ipHYDROGEN][ipH2p][ipH1s].ots>= 0.", "lines_hydro.c", 118), 0)));
114
 
115
  linadd(EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].ots*EmisLines[ipH_LIKE][ipHYDROGEN][3][ipH2s].EnergyErg, 6563,"Dest",'i');
116
 
117
  linadd(EmisLines[ipH_LIKE][ipHYDROGEN][5][4].ots*EmisLines[ipH_LIKE][ipHYDROGEN][5][4].EnergyErg,40516, "Dest",'i');
118
 
119
  smbeta.SimHBeta = smbeta.SimHBeta/(float)radius.dVeff*sphere.covgeo;
120
 
121
  linadd(smbeta.SimHBeta,4861,"Q(H)",'i');
122
 
123
  smbeta.SimHBeta = smbeta.SimHBeta*(float)radius.dVeff/sphere.covgeo;
124
 
125
  for( nelem=0; nelem < 30L; nelem++ )
126
  {
127
    int iCase;
128
    for( iCase=0; iCase<2; ++iCase )
129
    {
130
      char chAB[2]={'A','B'};
131
      char chLab[5]="Ca  ";
132
 
133
      for( ipLo=1+iCase; ipLo<(((6)<(iso.numLevels[ipH_LIKE][nelem])) ? (6) : (5)); ++ipLo )
134
      {
135
        for( ipHi=ipLo+1; ipHi< (((ipLo+5)<(iso.numLevels[ipH_LIKE][nelem])) ? (ipLo+5) : (iso.numLevels[ipH_LIKE][nelem])); ++ipHi )
136
        {
137
          float wl;
138
 
139
          hbetab = HSRate( ipHi,ipLo , nelem+1, phycon.te , dense.eden, chAB[iCase] );
140
          if( hbetab<=0. )
141
            CaseBHS.lgHCaseBOK[iCase][nelem] = 0;
142
 
143
          if( !hydro.lgHydEmiss )
144
            hbetab *= abund.xIonFracs[nelem][nelem+1]*dense.eden;
145
 
146
         linadd(hbetab,wl,chLab,'i' );
147
        }
148
      }
149
    }
150
  }
151
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.