61 #include "Tpetra_DefaultPlatform.hpp" 64 #include "Teuchos_RCP.hpp" 65 #include "Teuchos_GlobalMPISession.hpp" 66 #include "Teuchos_XMLParameterListHelpers.hpp" 69 #ifdef HAVE_ZOLTAN2_PARMA 79 using Teuchos::ParameterList;
81 typedef Tpetra::DefaultPlatform::DefaultPlatformType
Platform;
83 int main(
int narg,
char *arg[]) {
85 Teuchos::GlobalMPISession mpiSession(&narg, &arg,0);
86 Platform &platform = Tpetra::DefaultPlatform::getDefaultPlatform();
87 RCP<const Teuchos::Comm<int> > CommT = platform.getComm();
89 #ifdef HAVE_ZOLTAN2_PARMA 95 apf::Mesh2* m = apf::loadMdsMesh(
"../partition/pumiTri14/plate.dmg",
"../partition/pumiTri14/2/");
99 Teuchos::ParameterList params(
"test params");
100 params.set(
"timer_output_stream" ,
"std::cout");
101 params.set(
"debug_level",
"verbose_detailed_status");
102 params.set(
"hypergraph_model_type",
"ghosting");
104 RCP<Zoltan2::Environment> env;
110 RCP<const Zoltan2::Environment> envConst = Teuchos::rcp_const_cast<
const Zoltan2::Environment>(env);
113 inputAdapter_t* ia =
new inputAdapter_t(*CommT, m,
"vertex",
"edge",
false);
114 inputAdapter_t::scalar_t* arr =
new inputAdapter_t::scalar_t[ia->getLocalNumOf(ia->getPrimaryEntityType())];
115 for (
size_t i=0;i<ia->getLocalNumOf(ia->getPrimaryEntityType());i++) {
116 arr[i]=PCU_Comm_Self();
118 const inputAdapter_t::scalar_t*
weights=arr;
119 ia->setWeights(ia->getPrimaryEntityType(),
weights,1);
121 const baseMeshAdapter_t *base_ia =
dynamic_cast<const baseMeshAdapter_t*
>(ia);
123 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
Defines the APFMeshAdapter class.
Tpetra::DefaultPlatform::DefaultPlatformType Platform
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.
int main(int narg, char *arg[])