9 #ifndef _fei_test_utils_hpp_
10 #define _fei_test_utils_hpp_
25 namespace fei_test_utils {
53 bool bool_arg(
const char* flag,
int argc,
char** argv,
54 bool default_result=
false);
62 std::string
get_arg_value(
const char* flag,
int argc,
char** argv);
79 std::vector<std::string>& stdstrings);
85 std::vector<std::string>& file_contents);
95 std::vector<std::string>& file_contents);
103 const char* testname);
127 const char* filename);
129 int whichArg(
int argc,
const char*
const* argv,
const char* findarg);
131 int dirname(
const char* name,
char*& dir);
int readMatrix(const char *baseName, int np, fei::FillableMat &matrix)
int writeMatrix(const char *fileName, fei::FillableMat &matrix)
std::string construct_filename(int argc, char **argv)
std::string check_test_result(double value, double goldvalue, unsigned margin)
void read_file_lines_into_strings(const char *filename, std::vector< std::string > &file_contents)
bool bool_arg(const char *flag, int argc, char **argv, bool default_result)
int whichArg(int argc, const char *const *argv, const char *findarg)
int compareMatrices(fei::FillableMat &mat1, fei::FillableMat &mat2, double tol)
double get_file_benchmark(const char *filename, const char *testname)
int get_filename_and_read_input(int argc, char **argv, MPI_Comm comm, int localProc, std::vector< std::string > &stdstrings)
int copy_feiMatrix_to_FillableMat(fei::Matrix &feimat, fei::FillableMat &fmat)
int initialize_mpi(int argc, char **argv, int &localProc, int &numProcs)
void read_input_file(const char *filename, MPI_Comm comm, std::vector< std::string > &file_contents)
void broadcast_string(MPI_Comm comm, int root, std::string &strg)
void print_args(int argc, char **argv)
bool within_percentage_margin(double value1, double value2, unsigned margin)
int localProc(MPI_Comm comm)
int compare_with_file_benchmark(const char *name, double benchmark, const char *filename)
std::string get_arg_value(const char *flag, int argc, char **argv)
int dirname(const char *name, char *&dir)
int numProcs(MPI_Comm comm)
bool check_and_cout_test_result(std::string testname, double value, double file_value, unsigned margin)