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