Zoltan2
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_ttMVector_t
 

Functions

string trim_right_copy (const string &s, const string &delimiters=" \\\)
 
string trim_left_copy (const string &s, const string &delimiters=" \\\)
 
string trim_copy (const string &s, const string &delimiters=" \\\)
 
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 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)
 
string convert_to_string (char *args)
 
bool getArgumentValue (string &argumentid, double &argumentValue, string argumentline)
 
void getArgVals (int argc, char **argv, 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)
 
void print_usage (char *executable)
 
int main (int argc, char *argv[])
 

Variables

const char param_comment = '#'
 

Macro Definition Documentation

◆ CATCH_EXCEPTIONS_AND_RETURN

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

Definition at line 75 of file MultiJaggedTest.cpp.

◆ CATCH_EXCEPTIONS_WITH_COUNT

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

Definition at line 97 of file MultiJaggedTest.cpp.

Typedef Documentation

◆ tMVector_t

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

Definition at line 120 of file MultiJaggedTest.cpp.

Function Documentation

◆ trim_right_copy()

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

Definition at line 129 of file MultiJaggedTest.cpp.

◆ trim_left_copy()

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

Definition at line 136 of file MultiJaggedTest.cpp.

◆ trim_copy()

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

Definition at line 143 of file MultiJaggedTest.cpp.

◆ print_boxAssign_result()

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 151 of file MultiJaggedTest.cpp.

◆ run_pointAssign_tests()

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

Definition at line 175 of file MultiJaggedTest.cpp.

◆ run_boxAssign_tests()

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

Definition at line 303 of file MultiJaggedTest.cpp.

◆ readGeoGenParams()

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

Definition at line 494 of file MultiJaggedTest.cpp.

◆ GeometricGenInterface()

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 
)

Definition at line 557 of file MultiJaggedTest.cpp.

◆ testFromDataFile()

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 
)

Definition at line 714 of file MultiJaggedTest.cpp.

◆ convert_to_string()

string convert_to_string ( char *  args)

Definition at line 1085 of file MultiJaggedTest.cpp.

◆ getArgumentValue()

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

Definition at line 1091 of file MultiJaggedTest.cpp.

◆ getArgVals()

void getArgVals ( int  argc,
char **  argv,
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 
)

Definition at line 1102 of file MultiJaggedTest.cpp.

◆ print_usage()

void print_usage ( char *  executable)

Definition at line 1243 of file MultiJaggedTest.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 1260 of file MultiJaggedTest.cpp.

Variable Documentation

◆ param_comment

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

Definition at line 127 of file MultiJaggedTest.cpp.