68 RCP<ParameterList> validParamList = rcp(
new ParameterList());
70 validParamList->set< RCP<const FactoryBase> >(
"A", Teuchos::null,
"Generating factory of the matrix A");
71 validParamList->set< RCP<const FactoryBase> >(
"Aggregates", Teuchos::null,
"Generating factory of the aggregates");
72 validParamList->set< RCP<const FactoryBase> >(
"Nullspace", Teuchos::null,
"Generating factory of the nullspace");
73 validParamList->set< RCP<const FactoryBase> >(
"Scaled Nullspace", Teuchos::null,
"Generating factory of the scaled nullspace");
74 validParamList->set< RCP<const FactoryBase> >(
"UnAmalgamationInfo", Teuchos::null,
"Generating factory of UnAmalgamationInfo");
75 validParamList->set< RCP<const FactoryBase> >(
"CoarseMap", Teuchos::null,
"Generating factory of the coarse map");
76 validParamList->set< RCP<const FactoryBase> >(
"Coordinates", Teuchos::null,
"Generating factory of the coordinates");
79 ParameterList norecurse;
80 norecurse.disableRecursiveValidation();
81 validParamList->set<ParameterList> (
"matrixmatrix: kernel params", norecurse,
"MatrixMatrix kernel parameters");
83 return validParamList;
109 const ParameterList& pL = GetParameterList();
110 std::string nspName =
"Nullspace";
111 if(pL.isParameter(
"Nullspace name")) nspName = pL.get<std::string>(
"Nullspace name");
113 auto aggregates = Get< RCP<Aggregates_kokkos> > (fineLevel,
"Aggregates");
114 auto amalgInfo = Get< RCP<AmalgamationInfo_kokkos> > (fineLevel,
"UnAmalgamationInfo");
115 auto fineNullspace = Get< RCP<MultiVector> > (fineLevel, nspName);
116 auto coarseMap = Get< RCP<const Map> > (fineLevel,
"CoarseMap");
117 Teuchos::RCP<const Map> fineMap = fineNullspace->getMap();
120 if (aggregates->AggregatesCrossProcessors())
121 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"MatrixFreeTentativePFactory does not support aggregates that cross processors!");
123 size_t NSDim = fineNullspace->getNumVectors();
124 RCP<MultiVector> coarseNullspace = MultiVectorFactory::Build(coarseMap, NSDim);
127 P->apply(*fineNullspace,*coarseNullspace,Teuchos::TRANS,1.0,0.0);
129 Set(coarseLevel,
"Nullspace", coarseNullspace);
130 Set(coarseLevel,
"P", P);