forked from LLNL/paraDIS_lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparadisStreamingTest.C
66 lines (55 loc) · 1.62 KB
/
paradisStreamingTest.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
58
59
60
61
62
63
64
65
66
/* Written by Richard David Cook
at Lawrence Livermore National Laboratory
Contact: [email protected]
See license.txt for information about usage.
Spoiler alert: it's GNU opensource.
*/
/* just a file to contain a main() for testing paraDIS library */
#include "paradisStreaming.h"
#include "debugutil.h"
#include "args.h"
using namespace std;
int main(int argc, char *argv[]) {
long restrictBounds = 0, debugfiles = 0, verbosity=4;
long procnum = 0, numprocs = 1;
char inputfile[2048]="";
argt args[7] = {
{BOOL_TYPE, "-restrict", 1, &restrictBounds},
{BOOL_TYPE, "-debugfiles", 1, &debugfiles},
{LONG_TYPE, "-v", 1, &verbosity},
{LONG_TYPE, "-procnum", 1, &procnum},
{LONG_TYPE, "-numprocs", 1, &numprocs},
{LONG_TYPE, "-verbose", 1, &verbosity},
{STRING_TYPE, "-in", 2048, inputfile}
};
arg_expect_args(args, 7);
arg_ignore_bad_args(1);
arg_parse_args(&argc, argv);
dbg_setverbose(verbosity);
try {
rclib::Point<float> datamin, datamax;
paraDIS::ParadisDumpFile df;
char *datafile = "../paraDIS_data/rs0443.data";
if (*inputfile) datafile = inputfile;
df.SetDumpFile(datafile);
/* dsData.SetProcNum(procnum,numprocs);
dsData.SetDataFile(datafile);
dsData.EnableDebugOutput(debugfiles);
dsData.SetDebugOutputDir("debuginfo");
dsData.GetBounds(datamin, datamax, datafile);
*/
/*!
restrict the bounds for fun
*/
/*
if (restrictBounds) {
dsData.TestRestrictSubspace();
}
dsData.ReadData();
*/
df.ProcessDumpFile();
} catch (string err) {
cerr <<"Error in main: "<<err<<endl;
}
return 0;
}