#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <ostream>
#include <fstream>
#include <string>
#include <time.h>
#include <getopt.h>
#include <vector>
#include <limits>
#include "file.h"
#include "fileselect.h"
#include "metric.h"
#include "interpolation.h"
#include "datatypedef.h"
#include "util.h"
#include "BoundingBox.hpp"
Go to the source code of this file.
Classes | |
class | ComSwitch |
Functions | |
string | gUsage ("Usage: [--outfile | -o] <output file prefix>\n\t""[--infile1 | -1] <intput file 1 name>:<dimensions>\n\t""[--infile2 | -2] <intput file 2 name>:<dimensions>\n\t""[--fieldmap | -f] <File (1,2)>:<File Dimension>/<Mapped Dimension or \"null\">\n\t""[--index-order | -i] <File (1,2)>:<Partition>:<Dimension 1>,<Dimension 2>,...\n\t""[--conv | -c] <File (1,2)>:<Variable>:<Conversion Factor> \n\t""[--norm | -n] <File (1,2)>:<Variable>:<Normalization Factor> \n\t""[--range | -r] <xmin>,<ymin>,<zmin>,<xmax>,<ymax>,<zmax> \n\t""[--metric | -m] <metric number>=<file 1 partition 1>,<file 1 partition 2>,...:<file 1 variable>/\n\t"" <file 2 partition>:<file 2 variable>\n\t""[--verbose | -v]\n") |
void | printUsage (string rErrorMessage) |
Print the rc_cmp usage message. More... | |
vector< datafile * > | openAndParseFiles () |
Open the files specified at the command line and parse them. More... | |
void | compareFiles (vector< datafile * > pFiles) |
Compare the two files, interpolating the points from the second onto the first mesh. More... | |
std::vector< points * > | retrievePoints (datafile *pFile, vector< int > rPartitions) |
Construct a vector of pointers to datasets (point objects) from a list of partition numbers. More... | |
void | printPointValues (points *pPoints) |
Write point values to standard out. More... | |
long double | calcAverageValue (points *pPoints, int rVar) |
Calculates the average value of the points. More... | |
long double | minPoint (points *pPoints, int rVar) |
Find the minimum value. More... | |
long double | maxPoint (points *pPoints, int rVar) |
Find the maximum value. More... | |
long double calcAverageValue | ( | points * | pPoints, |
int | rVar | ||
) |
Calculates the average value of the points.
pPoints | Datapoints |
rVar | Variable number to average |
Definition at line 276 of file main.cpp.
References points::get_num_points(), points::get_point(), and pnt::vals.
void compareFiles | ( | vector< datafile * > | pFiles | ) |
Compare the two files, interpolating the points from the second onto the first mesh.
Then, ouput results.
Definition at line 95 of file main.cpp.
References Interpolate::bilinear(), points::contains_null(), points::delete_all(), cmp_map::file1_partitions, cmp_map::file2_partition, metric::get_metric_name(), datafile::get_points(), metric::get_res(), ComSwitch::getComparisonList(), ComSwitch::getLogFile(), ComSwitch::getOutPrefix(), ComSwitch::getRange(), ComSwitch::getVerbosity(), i, ComSwitch::isRangeSpecified(), itoa(), cmp_map::metric, metric_select(), retrievePoints(), same_elements(), metric::setRange(), cmp_map::var1, and cmp_map::var2.
Referenced by main().
string gUsage | ( | "Usage: <output file prefix>\n\t"" <intput file 1 name>:<dimensions>\n\t"" <intput file 2 name>:<dimensions>\n\t"" <File (1,2)>:<File Dimension>/<Mapped Dimension or \"null\">\n\t"" <File (1,2)>:<Partition>:<Dimension 1> | [--outfile|-o][--infile1|-1][--infile2|-2][--fieldmap|-f][--index-order|-i], |
< Dimension 2 > | , | ||
...\n\t""< File(1, 2)>:< Variable >:< Conversion Factor >\n\t""< File(1, 2)>:< Variable >:< Normalization Factor >\n\t""< xmin > | [--conv|-c][--norm|-n][--range|-r], | ||
< ymin > | , | ||
< zmin > | , | ||
< xmax > | , | ||
< ymax > | , | ||
< zmax >\n\t""< metric number > | [--metric|-m] = <file 1 partition 1> , |
||
< file 1 partition 2 > | , | ||
...:< file 1 variable >/\n\t""< file 2 partition >:< file 2 variable >\n\t""\n" | [--verbose|-v] | ||
) |
long double maxPoint | ( | points * | pPoints, |
int | rVar | ||
) |
Find the maximum value.
pPoints | Points |
rVar | Variable number |
Definition at line 309 of file main.cpp.
References points::get_num_points(), points::get_point(), max(), and pnt::vals.
long double minPoint | ( | points * | pPoints, |
int | rVar | ||
) |
Find the minimum value.
pPoints | Points |
rVar | Variable number |
Definition at line 293 of file main.cpp.
References points::get_num_points(), points::get_point(), min(), and pnt::vals.
vector<datafile*> openAndParseFiles | ( | ) |
Open the files specified at the command line and parse them.
Definition at line 40 of file main.cpp.
References Fileselect::detectFiletype(), ComSwitch::getConvFactor(), ComSwitch::getFieldMappings(), ComSwitch::getFileDimensions(), ComSwitch::getFileName(), ComSwitch::getIndexOrder(), ComSwitch::getInputFile(), ComSwitch::getLogFile(), ComSwitch::getNormVal(), ComSwitch::getVerbosity(), and datafile::parse().
Referenced by main().
void printPointValues | ( | points * | pPoints | ) |
Write point values to standard out.
Definition at line 259 of file main.cpp.
References points::get_num_points(), points::get_point(), pnt::size, and pnt::vals.
void printUsage | ( | string | rErrorMessage | ) |
Print the rc_cmp usage message.
rErrorString | The error message |
Definition at line 326 of file main.cpp.
References gUsage(), print_metrics(), and Fileselect::printFiletypes().
Construct a vector of pointers to datasets (point objects) from a list of partition numbers.
Definition at line 240 of file main.cpp.
References datafile::get_num_partitions(), and datafile::get_points().
Referenced by compareFiles().