-
Notifications
You must be signed in to change notification settings - Fork 25
/
main.c
57 lines (50 loc) · 1.36 KB
/
main.c
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* main.c
* LIME, The versatile 3D line modeling environment
*
* Created by Christian Brinch on 16/11/06.
* Copyright 2006-2014, Christian Brinch,
* <brinch@nbi.dk>
* Niels Bohr institutet
* University of Copenhagen
* All rights reserved.
*
* LIME is derived from RATRAN by Michiel Hogerheijde and Floris van der Tak,
* Copyright 2000, Hogerheijde and van der Tak, A&A, 362, 697, 2000.
*
* DISCLAIMER: LIME is provided as is and the author does not resume any
* responsibility for erroneous results due to bugs in the code.
*
* Any publication with results obtain using LIME should refer to
* Brinch & Hogerheijde, A&A, 523, A25, 2010
*
*/
#include "lime.h"
int main () {
int i;
int initime=time(0);
int popsdone=0;
molData *m;
inputPars par;
struct grid *g;
image *img;
if(!silent) greetings();
if(!silent) screenInfo();
parseInput(&par,&img,&m);
gridAlloc(&par,&g);
if(par.pregrid) predefinedGrid(&par,g);
else if(par.restart) popsin(&par,&g,&m,&popsdone);
else buildGrid(&par,g);
for(i=0;i<par.nImages;i++){
if(img[i].doline==1 && popsdone==0) {
levelPops(m,&par,g,&popsdone);
}
if(img[i].doline==0) {
continuumSetup(i,img,m,&par,g);
}
raytrace(i,&par,g,m,img);
writefits(i,&par,m,img);
}
if(!silent) goodnight(initime,img[0].filename);
return 0;
}