46#ifndef MUELU_CONSTRAINTFACTORY_DEF_HPP
47#define MUELU_CONSTRAINTFACTORY_DEF_HPP
49#include <Xpetra_MultiVector_fwd.hpp>
50#include <Xpetra_CrsGraph_fwd.hpp>
55#include "MueLu_Constraint.hpp"
60 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
62 RCP<ParameterList> validParamList = rcp(
new ParameterList());
64 validParamList->set< RCP<const FactoryBase> >(
"FineNullspace", Teuchos::null,
"Generating factory for the nullspace");
65 validParamList->set< RCP<const FactoryBase> >(
"CoarseNullspace", Teuchos::null,
"Generating factory for the nullspace");
66 validParamList->set< RCP<const FactoryBase> >(
"Ppattern", Teuchos::null,
"Generating factory for the nonzero pattern");
68 return validParamList;
71 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
73 Input(fineLevel,
"Nullspace",
"FineNullspace");
74 Input(coarseLevel,
"Nullspace",
"CoarseNullspace");
75 Input(coarseLevel,
"Ppattern");
78 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
82 RCP<MultiVector> fineNullspace = Get< RCP<MultiVector> >(fineLevel,
"Nullspace",
"FineNullspace");
83 RCP<MultiVector> coarseNullspace = Get< RCP<MultiVector> >(coarseLevel,
"Nullspace",
"CoarseNullspace");
86 constraint->Setup(*fineNullspace, *coarseNullspace,
87 Get< RCP<const CrsGraph> >(coarseLevel,
"Ppattern"));
89 Set(coarseLevel,
"Constraint", constraint);
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void Build(Level &fineLevel, Level &coarseLevel) const
Build method.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Input.
Constraint space information for the potential prolongator.
Timer to be used in factories. Similar to Monitor but with additional timers.
Class that holds all level-specific information.
Namespace for MueLu classes and methods.