82 Teuchos::RCP<Matrix> A = Get<Teuchos::RCP<Matrix> >(currentLevel,
"A");
84 const ParameterList &pL = GetParameterList();
85 std::string mapName = pL.get<std::string>(
"PermutationRowMapName");
86 Teuchos::RCP<const FactoryBase> mapFactory = GetFactory(
"PermutationRowMapFactory");
88 Teuchos::RCP<const Map> permRowMap = Teuchos::null;
89 if (mapName.length() > 0) {
90 permRowMap = currentLevel.
Get<RCP<const Map> >(mapName, mapFactory.get());
92 permRowMap = A->getRowMap();
95 std::string strStrategy = pL.get<std::string>(
"PermutationStrategy");
96 if (strStrategy ==
"Algebraic") {
98 permStrat->BuildPermutation(A, permRowMap, currentLevel,
this);
99 }
else if (strStrategy ==
"Local") {
101 permStrat->BuildPermutation(A, permRowMap, currentLevel,
this);
103 TEUCHOS_TEST_FOR_EXCEPTION(
true,
105 "`PermutationStrategy' has incorrect value (" << strStrategy <<
") in input to PermutationFactory."
106 <<
"Check the documentation for a list of valid choices");
108 GetOStream(
Runtime0) <<
"Using " << strStrategy <<
" permutation strategy." << std::endl;
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access)....