-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgetdp_fun.h
45 lines (36 loc) · 1.01 KB
/
getdp_fun.h
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
#ifndef _GETDP_FUN_H
#define _GETDP_FUN_H
#include <fstream>
#include <string>
#include <cstdlib>
#include <cstring>
// const list
const int MAX_CHARS_PER_LINE = 512;
const int MAX_TOKENS_PER_LINE = 20;
const std::string DELIMITER = " \t=";
double findKeywordValue(std::string &filename, std::string &keystr);
// keystr list:
// entries
// history
// wavelength
// seperation
// meshsize
double findMainKeyValue(std::string &filename, std::string &keystr);
// keystr list:
// delz
// xlamd
// etc.
// convert scientific notation with D into E, e.g. 1.0D+01 to be 1.0E+01
std::string dToE(std::string cppstr);
// parse input options
int parseOpts(int argc, char* argv[],
std::string &infilename, std::string &outfilename,
int &isOrder, double &dsPosition,
int &izOrder, double &dzPosition,
int &sFlag, int &zFlag,
int &ishowRange);
// check input options
void checkParams(int argc, char* argv[]);
// show s/z order range, min to max
void showRange(std::string &infilename);
#endif //_GETDP_FUN_H