26 #include "Teuchos_RCP.hpp"
27 #include "Teuchos_XMLParameterListHelpers.hpp"
30 #ifdef HAVE_ZOLTAN2_PARMA
40 using Teuchos::ParameterList;
43 int main(
int narg,
char *arg[]) {
45 Tpetra::ScopeGuard tscope(&narg, &arg);
46 Teuchos::RCP<const Teuchos::Comm<int> > CommT = Tpetra::getDefaultComm();
48 #ifdef HAVE_ZOLTAN2_PARMA
54 apf::Mesh2* m = apf::loadMdsMesh(
"../partition/pumiTri14/plate.dmg",
"../partition/pumiTri14/2/");
58 Teuchos::ParameterList params(
"test params");
59 params.set(
"timer_output_stream" ,
"std::cout");
60 params.set(
"debug_level",
"verbose_detailed_status");
61 params.set(
"hypergraph_model_type",
"ghosting");
63 RCP<Zoltan2::Environment> env;
69 RCP<const Zoltan2::Environment> envConst = Teuchos::rcp_const_cast<
const Zoltan2::Environment>(env);
72 inputAdapter_t* ia =
new inputAdapter_t(*CommT, m,
"vertex",
"edge",
false);
73 inputAdapter_t::scalar_t* arr =
new inputAdapter_t::scalar_t[ia->getLocalNumOf(ia->getPrimaryEntityType())];
74 for (
size_t i=0;i<ia->getLocalNumOf(ia->getPrimaryEntityType());i++) {
75 arr[i]=PCU_Comm_Self();
77 const inputAdapter_t::scalar_t*
weights=arr;
78 ia->setWeights(ia->getPrimaryEntityType(),
weights,1);
80 const baseMeshAdapter_t *base_ia =
dynamic_cast<const baseMeshAdapter_t*
>(ia);
82 RCP<const baseMeshAdapter_t> baseInputAdapter_(base_ia,
false);
#define Z2_FORWARD_EXCEPTIONS
Forward an exception back through call stack.
MeshAdapter defines the interface for mesh input.
std::bitset< NUM_MODEL_FLAGS > modelFlag_t
int main(int narg, char **arg)
Defines the APFMeshAdapter class.
The user parameters, debug, timing and memory profiling output objects, and error checking methods...
Gathering definitions used in software development.
Defines the HyperGraphModel interface.
Defines the Environment class.
HyperGraphModel defines the interface required for hyper graph models.