Commit 2b8a1d846217ea369611310bfbf143df1acfeb99
1 parent
9714d7c7
added an error if an FFT is unavailable
Showing
2 changed files
with
43 additions
and
2 deletions
Show diff stats
main.cpp
@@ -11,7 +11,7 @@ using namespace std; | @@ -11,7 +11,7 @@ using namespace std; | ||
11 | #include <fftw3.h> | 11 | #include <fftw3.h> |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | -#include "rts/material.h" | 14 | +#include "rts/optics/material.h" |
15 | //#include "options.h" | 15 | //#include "options.h" |
16 | 16 | ||
17 | #include <boost/program_options.hpp> | 17 | #include <boost/program_options.hpp> |
@@ -30,7 +30,7 @@ int main(int argc, char* argv[]) | @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) | ||
30 | po::options_description desc("Allowed options"); | 30 | po::options_description desc("Allowed options"); |
31 | desc.add_options() | 31 | desc.add_options() |
32 | ("help,h", "Display this help message.") | 32 | ("help,h", "Display this help message.") |
33 | - ("input-file,i", po::value<string>(), "Input file containing material information.") | 33 | + ("input-file,i", po::value<string>()->default_value("etaToluene.txt"), "Input file containing material information.") |
34 | ("input-format,f", po::value<string>()->default_value("wavenumber,n,k"), "Format string identifying the order of material properties in the input file. Options include: microns, wavenumber, n (real RI), k (imaginary RI), A (absorbance), Xp (real Chi), Xpp (imaginary Chi).\n\nThe default [microns,n,k] will load a material file with columns representing the wavelength in microns, followed by the real and imaginary parts of the refractive index.") | 34 | ("input-format,f", po::value<string>()->default_value("wavenumber,n,k"), "Format string identifying the order of material properties in the input file. Options include: microns, wavenumber, n (real RI), k (imaginary RI), A (absorbance), Xp (real Chi), Xpp (imaginary Chi).\n\nThe default [microns,n,k] will load a material file with columns representing the wavelength in microns, followed by the real and imaginary parts of the refractive index.") |
35 | ("output-file,o", po::value<string>()->default_value("out.txt"), "Output file containing the processed material information.") | 35 | ("output-file,o", po::value<string>()->default_value("out.txt"), "Output file containing the processed material information.") |
36 | ("output-format,t", po::value<string>()->default_value("wavenumber,n,k"), "Format string for the output file (similar to --input-format).") | 36 | ("output-format,t", po::value<string>()->default_value("wavenumber,n,k"), "Format string for the output file (similar to --input-format).") |
1 | +#ifndef RTS_OPTIONS_H | ||
2 | +#define RTS_OPTIONS_H | ||
3 | + | ||
4 | +#include <string> | ||
5 | + | ||
6 | +enum opt_type {optInt, optDouble, optStr, optFlag}; | ||
7 | + | ||
8 | +struct opt | ||
9 | +{ | ||
10 | + //long name for the option | ||
11 | + std::string _lname; | ||
12 | + | ||
13 | + //short name for the option | ||
14 | + char _sname; | ||
15 | + | ||
16 | + //help string | ||
17 | + std::string _help; | ||
18 | + | ||
19 | + //store the type | ||
20 | + opt_type _type; | ||
21 | + | ||
22 | + //data is stored in a vector of void pointers | ||
23 | + std::vector<void*> _data; | ||
24 | +}; | ||
25 | + | ||
26 | +class rtOptions | ||
27 | +{ | ||
28 | + std::vector<opt> optArray; | ||
29 | + | ||
30 | + int addOption(char sname, std::string lname, std::string help, opt_type type = optStr) | ||
31 | + { | ||
32 | + | ||
33 | + | ||
34 | + } | ||
35 | + | ||
36 | +}; | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | +#endif | ||
0 | \ No newline at end of file | 42 | \ No newline at end of file |