Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Typedefs | Functions | Variables
MultiJaggedTest.cpp File Reference
#include <Zoltan2_TestHelpers.hpp>
#include <Zoltan2_XpetraMultiVectorAdapter.hpp>
#include <Zoltan2_BasicVectorAdapter.hpp>
#include <Zoltan2_PartitioningSolution.hpp>
#include <Zoltan2_PartitioningProblem.hpp>
#include <GeometricGenerator.hpp>
#include <vector>
#include <Zoltan2_EvaluatePartition.hpp>
#include "Teuchos_XMLParameterListHelpers.hpp"
#include <Teuchos_LAPACK.hpp>
#include <fstream>
#include <string>
Include dependency graph for MultiJaggedTest.cpp:

Go to the source code of this file.

Macros

#define CATCH_EXCEPTIONS_AND_RETURN(pp)
 
#define CATCH_EXCEPTIONS_WITH_COUNT(ierr, pp)
 

Typedefs

typedef Tpetra::MultiVector
< zscalar_t, zlno_t, zgno_t,
znode_t
tMVector_t
 

Functions

string trim_right_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
string trim_left_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
string trim_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
template<typename Adapter >
void print_boxAssign_result (const char *str, int dim, typename Adapter::scalar_t *lower, typename Adapter::scalar_t *upper, size_t nparts, typename Adapter::part_t *parts)
 
template<typename Adapter >
int run_pointAssign_tests (Zoltan2::PartitioningProblem< Adapter > *problem, RCP< tMVector_t > &coords)
 
template<typename Adapter >
int run_boxAssign_tests (Zoltan2::PartitioningProblem< Adapter > *problem, RCP< tMVector_t > &coords)
 
void readGeoGenParams (string paramFileName, Teuchos::ParameterList &geoparams, const RCP< const Teuchos::Comm< int > > &comm)
 
int GeometricGenInterface (RCP< const Teuchos::Comm< int > > &comm, int numParts, float imbalance, std::string paramFile, std::string pqParts, std::string pfname, int k, int migration_check_option, int migration_all_to_all_type, zscalar_t migration_imbalance_cut_off, int migration_processor_assignment_type, int migration_doMigration_type, bool test_boxes, bool rectilinear, int mj_premigration_option, int mj_premigration_coordinate_cutoff)
 
int testFromDataFile (RCP< const Teuchos::Comm< int > > &comm, int numParts, float imbalance, std::string fname, std::string pqParts, std::string pfname, int k, int migration_check_option, int migration_all_to_all_type, zscalar_t migration_imbalance_cut_off, int migration_processor_assignment_type, int migration_doMigration_type, bool test_boxes, bool rectilinear, int mj_premigration_option, int mj_premigration_coordinate_cutoff)
 
string convert_to_string (char *args)
 
bool getArgumentValue (string &argumentid, double &argumentValue, string argumentline)
 
void getArgVals (int narg, char **arg, int &numParts, float &imbalance, string &pqParts, int &opt, std::string &fname, std::string &pfname, int &k, int &migration_check_option, int &migration_all_to_all_type, zscalar_t &migration_imbalance_cut_off, int &migration_processor_assignment_type, int &migration_doMigration_type, bool &test_boxes, bool &rectilinear, int &mj_premigration_option, int &mj_coordinate_cutoff)
 
void print_usage (char *executable)
 
int main (int narg, char *arg[])
 

Variables

const char param_comment = '#'
 

Macro Definition Documentation

#define CATCH_EXCEPTIONS_AND_RETURN (   pp)
Value:
catch (std::runtime_error &e) { \
std::cout << "Runtime exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::logic_error &e) { \
std::cout << "Logic exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::bad_alloc &e) { \
std::cout << "Bad_alloc exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::exception &e) { \
std::cout << "Unknown exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
}

Definition at line 74 of file MultiJaggedTest.cpp.

#define CATCH_EXCEPTIONS_WITH_COUNT (   ierr,
  pp 
)
Value:
catch (std::runtime_error &e) { \
std::cout << "Runtime exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::logic_error &e) { \
std::cout << "Logic exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::bad_alloc &e) { \
std::cout << "Bad_alloc exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::exception &e) { \
std::cout << "Unknown exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
}

Definition at line 96 of file MultiJaggedTest.cpp.

Typedef Documentation

typedef Tpetra::MultiVector<zscalar_t, zlno_t, zgno_t, znode_t> tMVector_t

Definition at line 119 of file MultiJaggedTest.cpp.

Function Documentation

string trim_right_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 128 of file MultiJaggedTest.cpp.

string trim_left_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 135 of file MultiJaggedTest.cpp.

string trim_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 142 of file MultiJaggedTest.cpp.

template<typename Adapter >
void print_boxAssign_result ( const char *  str,
int  dim,
typename Adapter::scalar_t *  lower,
typename Adapter::scalar_t *  upper,
size_t  nparts,
typename Adapter::part_t parts 
)

Definition at line 150 of file MultiJaggedTest.cpp.

template<typename Adapter >
int run_pointAssign_tests ( Zoltan2::PartitioningProblem< Adapter > *  problem,
RCP< tMVector_t > &  coords 
)

Definition at line 174 of file MultiJaggedTest.cpp.

template<typename Adapter >
int run_boxAssign_tests ( Zoltan2::PartitioningProblem< Adapter > *  problem,
RCP< tMVector_t > &  coords 
)

Definition at line 301 of file MultiJaggedTest.cpp.

void readGeoGenParams ( string  paramFileName,
Teuchos::ParameterList &  geoparams,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Definition at line 491 of file MultiJaggedTest.cpp.

int GeometricGenInterface ( RCP< const Teuchos::Comm< int > > &  comm,
int  numParts,
float  imbalance,
std::string  paramFile,
std::string  pqParts,
std::string  pfname,
int  k,
int  migration_check_option,
int  migration_all_to_all_type,
zscalar_t  migration_imbalance_cut_off,
int  migration_processor_assignment_type,
int  migration_doMigration_type,
bool  test_boxes,
bool  rectilinear,
int  mj_premigration_option,
int  mj_premigration_coordinate_cutoff 
)

Definition at line 554 of file MultiJaggedTest.cpp.

int testFromDataFile ( RCP< const Teuchos::Comm< int > > &  comm,
int  numParts,
float  imbalance,
std::string  fname,
std::string  pqParts,
std::string  pfname,
int  k,
int  migration_check_option,
int  migration_all_to_all_type,
zscalar_t  migration_imbalance_cut_off,
int  migration_processor_assignment_type,
int  migration_doMigration_type,
bool  test_boxes,
bool  rectilinear,
int  mj_premigration_option,
int  mj_premigration_coordinate_cutoff 
)

Definition at line 717 of file MultiJaggedTest.cpp.

string convert_to_string ( char *  args)

Definition at line 1100 of file MultiJaggedTest.cpp.

bool getArgumentValue ( string &  argumentid,
double &  argumentValue,
string  argumentline 
)

Definition at line 1106 of file MultiJaggedTest.cpp.

void getArgVals ( int  narg,
char **  arg,
int &  numParts,
float &  imbalance,
string &  pqParts,
int &  opt,
std::string &  fname,
std::string &  pfname,
int &  k,
int &  migration_check_option,
int &  migration_all_to_all_type,
zscalar_t migration_imbalance_cut_off,
int &  migration_processor_assignment_type,
int &  migration_doMigration_type,
bool &  test_boxes,
bool &  rectilinear,
int &  mj_premigration_option,
int &  mj_coordinate_cutoff 
)

Definition at line 1117 of file MultiJaggedTest.cpp.

void print_usage ( char *  executable)

Definition at line 1276 of file MultiJaggedTest.cpp.

int main ( int  narg,
char *  arg[] 
)

Definition at line 1293 of file MultiJaggedTest.cpp.

Variable Documentation

const char param_comment = '#'
Test:
MultiJaggedTest.cpp An example of the use of the MultiJagged algorithm to partition coordinate data.

Definition at line 126 of file MultiJaggedTest.cpp.