60 RCP<const Map> rowMap = A->getRowMap();
62 int numParts =
Get<int>(level,
"number of partitions");
63 if (numParts == 1 || numParts == -1) {
65 RCP<Xpetra::Vector<GO, LO, GO, NO> > decomposition = Xpetra::VectorFactory<GO, LO, GO, NO>::Build(rowMap,
true);
66 Set(level,
"Partition", decomposition);
72 TEUCHOS_TEST_FOR_EXCEPTION(NodeComm.is_null(),
Exceptions::RuntimeError,
"MueLu::NodePartitionInterface::Build(): NodeComm is null.");
75 int nodeZeroRank = A->getMap()->getComm()->getRank();
76 Teuchos::broadcast<int, int>(*NodeComm, 0, Teuchos::inOutArg(nodeZeroRank));
80 RCP<Xpetra::Vector<GO, LO, GO, NO> > decomposition = Xpetra::VectorFactory<GO, LO, GO, NO>::Build(rowMap,
false);
81 decomposition->putScalar(Teuchos::as<GO>(nodeZeroRank));
83 Set(level,
"Partition", decomposition);