62 RCP<ParameterList> validParamList = rcp(
new ParameterList());
64 validParamList->set< RCP<const FactoryBase> >(
"A", Teuchos::null,
"Generating factory of the matrix A");
65 validParamList->set< RCP<const FactoryBase> >(
"Aggregates", Teuchos::null,
"Generating factory of the aggregates");
66 validParamList->set< RCP<const FactoryBase> >(
"Nullspace", Teuchos::null,
"Generating factory of the nullspace");
67 validParamList->set< RCP<const FactoryBase> >(
"Scaled Nullspace", Teuchos::null,
"Generating factory of the scaled nullspace");
68 validParamList->set< RCP<const FactoryBase> >(
"UnAmalgamationInfo", Teuchos::null,
"Generating factory of UnAmalgamationInfo");
69 validParamList->set< RCP<const FactoryBase> >(
"CoarseMap", Teuchos::null,
"Generating factory of the coarse map");
70 validParamList->set< RCP<const FactoryBase> >(
"Coordinates", Teuchos::null,
"Generating factory of the coordinates");
73 ParameterList norecurse;
74 norecurse.disableRecursiveValidation();
75 validParamList->set<ParameterList> (
"matrixmatrix: kernel params", norecurse,
"MatrixMatrix kernel parameters");
77 return validParamList;
103 const ParameterList& pL = GetParameterList();
104 std::string nspName =
"Nullspace";
105 if(pL.isParameter(
"Nullspace name")) nspName = pL.get<std::string>(
"Nullspace name");
107 auto aggregates = Get< RCP<Aggregates> > (fineLevel,
"Aggregates");
108 auto amalgInfo = Get< RCP<AmalgamationInfo> > (fineLevel,
"UnAmalgamationInfo");
109 auto fineNullspace = Get< RCP<MultiVector> > (fineLevel, nspName);
110 auto coarseMap = Get< RCP<const Map> > (fineLevel,
"CoarseMap");
111 Teuchos::RCP<const Map> fineMap = fineNullspace->getMap();
114 if (aggregates->AggregatesCrossProcessors())
115 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MatrixFreeTentativePFactory does not support aggregates that cross processors!");
117 size_t NSDim = fineNullspace->getNumVectors();
118 RCP<MultiVector> coarseNullspace = MultiVectorFactory::Build(coarseMap, NSDim);
121 P->apply(*fineNullspace,*coarseNullspace,Teuchos::TRANS,1.0,0.0);
123 Set(coarseLevel,
"Nullspace", coarseNullspace);
124 Set(coarseLevel,
"P", P);