46 #ifndef MUELU_SMOOTHERBASECLONER_HPP
47 #define MUELU_SMOOTHERBASECLONER_HPP
55 #if defined(HAVE_MUELU_IFPACK2)
56 #include "MueLu_Ifpack2Smoother.hpp"
58 #include "MueLu_TrilinosSmoother.hpp"
62 #ifdef HAVE_MUELU_DEPRECATED_CODE
63 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node1,
class Node2>
66 clone (
const Teuchos::RCP<SmootherBase<Scalar,LocalOrdinal,GlobalOrdinal,Node1> >& SB,
68 const RCP<Node2>& node2)
70 #if defined(HAVE_MUELU_IFPACK2)
73 Teuchos::rcp_dynamic_cast<TrilinosSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node1> >(SB);
74 if (trilSmoother != Teuchos::null){
75 cloneSB = trilSmoother->clone (node2, cloneA);
80 Teuchos::rcp_dynamic_cast<Ifpack2Smoother<Scalar, LocalOrdinal, GlobalOrdinal, Node1> >(SB);
81 if (ifSmoother != Teuchos::null){
82 cloneSB = ifSmoother->clone(node2, cloneA);
88 true, std::invalid_argument,
"MueLu::SmootherClone: "
89 "Invalid smoother type to clone (not TrilinosSmoother or Ifpack2 ) \"");
93 true, std::invalid_argument,
"MueLu::SmootherClone: "
94 "clone() only available with IFPACK2 enabled.");
101 #define MUELU_SMOOTHERBASECLONER_SHORT
102 #endif //ifndef MUELU_SMOOTHERBASECLONER_HPP
RCP< Map< LocalOrdinal, GlobalOrdinal, Node2 > > clone(const Map< LocalOrdinal, GlobalOrdinal, Node1 > &map, const RCP< Node2 > &node2)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)