119 Teuchos::RCP<Matrix> A = Get< Teuchos::RCP<Matrix> > (currentLevel,
"A");
121 const ParameterList & pL = GetParameterList();
122 std::string mapName = pL.get<std::string> (
"PermutationRowMapName");
123 Teuchos::RCP<const FactoryBase> mapFactory = GetFactory (
"PermutationRowMapFactory");
125 Teuchos::RCP<const Map> permRowMap = Teuchos::null;
126 if(mapName.length() > 0 ) {
127 permRowMap = currentLevel.
Get<RCP<const Map> >(mapName,mapFactory.get());
129 permRowMap = A->getRowMap();
132 std::string strStrategy = pL.get<std::string> (
"PermutationStrategy");
133 if( strStrategy ==
"Algebraic" ) {
135 permStrat->BuildPermutation(A,permRowMap,currentLevel,
this);
136 }
else if( strStrategy ==
"Local" ) {
138 permStrat->BuildPermutation(A,permRowMap,currentLevel,
this);
140 TEUCHOS_TEST_FOR_EXCEPTION(
true,
142 "`PermutationStrategy' has incorrect value (" << strStrategy <<
") in input to PermutationFactory."
143 <<
"Check the documentation for a list of valid choices");
145 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)....