10 #ifndef MUELU_REPARTITIONBLOCKDIAGONALFACTORY_DEF_HPP_
11 #define MUELU_REPARTITIONBLOCKDIAGONALFACTORY_DEF_HPP_
25 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
30 return validParamList;
33 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
35 Input(currentLevel,
"A");
38 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
43 RCP<Matrix> originalA = Get<RCP<Matrix> >(currentLevel,
"A");
44 RCP<BlockCrs> A = Teuchos::rcp_dynamic_cast<BlockCrs>(originalA);
51 for (
size_t i = 0; i < A->Rows(); i++)
52 DiagonalMatrix->setMatrix(i, i, A->getMatrix(i, i));
54 Set(currentLevel,
"A", Teuchos::rcp_dynamic_cast<Matrix>(DiagonalMatrix));
Exception indicating invalid cast attempted.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
void DeclareInput(Level &level) const
Specifies the data that this class needs, and the factories that generate that data.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
void Build(Level &level) const
Build an object with this factory.