Blame view

main.cpp 1.46 KB
3f56f1f9   dmayerich   initial commit
1
  #include "sphere.h"
d6f53e68   dmayerich   rts organization
2
  #include "rts/optics/material.h"
3f56f1f9   dmayerich   initial commit
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  #include <vector>
  //#include "rts/complex.h"
  
  #include "nearfield.h"
  //nearfieldStruct* NF;
  
  #include "microscope.h"
  microscopeStruct* SCOPE;
  
  #include "fieldslice.h"
  
  #include "fileout.h"
  #include "options.h"
  #include "montecarlo.h"
d6f53e68   dmayerich   rts organization
17
18
19
20
  #include "rts/math/point.h"
  #include "rts/math/spherical_bessel.h"
  #include "rts/math/matrix.h"
  #include "rts/math/quaternion.h"
3f56f1f9   dmayerich   initial commit
21
  
d6f53e68   dmayerich   rts organization
22
  #include "rts/envi/envi.h"
3f56f1f9   dmayerich   initial commit
23
24
25
  
  #include "warnings.h"
  
3f36b18e   David Mayerich   Adding planewave ...
26
27
28
29
30
31
  #include "planewave.h"
  
  //user interface
  #include "qtMainDialog.h"
  bool gui = false;
  
3f56f1f9   dmayerich   initial commit
32
  fileoutStruct gFileOut;
51b6469a   dmayerich   added look-up tables
33
  bool verbose = false;
3f56f1f9   dmayerich   initial commit
34
35
36
37
38
39
40
  using namespace std;
  
  int cbessjyva(double v,complex<double> z,double &vm,complex<double>*cjv,

      complex<double>*cyv,complex<double>*cjvp,complex<double>*cyvp);
  
  int main(int argc, char *argv[])
  {
3f56f1f9   dmayerich   initial commit
41
  
3f36b18e   David Mayerich   Adding planewave ...
42
43
44
45
46
47
48
49
50
      //benchtest planewave class
      rts::vector<ptype, 3> k(1, 0, 0);
      rts::vector<ptype, 3> E(2, 2, 0);
      planewave<ptype> P(k, E);
  
      std::cout<<P<<std::endl;
  
      exit(1);
  
3f56f1f9   dmayerich   initial commit
51
52
  	SCOPE = new microscopeStruct();
  
3f56f1f9   dmayerich   initial commit
53
54
      LoadParameters(argc, argv);
  
3f56f1f9   dmayerich   initial commit
55
56
57
  	//initialize GPU memory for fields
  	SCOPE->init();
  
3f36b18e   David Mayerich   Adding planewave ...
58
59
60
61
62
63
64
65
66
67
68
69
70
71
      if(gui)
      {
          QApplication app(argc, argv);
          qtMainDialog bsDialog;
  
          //populate the user interface with the default and command-line values
          bsDialog.populateUi();
          bsDialog.show();
          return app.exec();
      }
      else
      {
  
          gFileOut.Save(SCOPE);
3f56f1f9   dmayerich   initial commit
72
  
3f36b18e   David Mayerich   Adding planewave ...
73
74
          if(verbose)
              OutputOptions();
51b6469a   dmayerich   added look-up tables
75
  
3f36b18e   David Mayerich   Adding planewave ...
76
77
          SCOPE->destroy();
      }
3f56f1f9   dmayerich   initial commit
78
79
  
  
7d43100a   dmayerich   allow appending t...
80
  
3f56f1f9   dmayerich   initial commit
81
82
  
  }