MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_FacadeClassBase_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef PACKAGES_MUELU_SRC_INTERFACE_FACADECLASSES_MUELU_FACADECLASSBASE_DECL_HPP_
11 #define PACKAGES_MUELU_SRC_INTERFACE_FACADECLASSES_MUELU_FACADECLASSBASE_DECL_HPP_
12 
13 #include "MueLu_BaseClass.hpp"
14 
15 namespace MueLu {
16 
17 template <class Scalar = DefaultScalar,
20  class Node = DefaultNode>
22  : public virtual BaseClass {
23 #undef MUELU_FACADECLASSBASE_SHORT
24 #include "MueLu_UseShortNames.hpp"
25 
26  public:
28 
29 
32 
34  virtual ~FacadeClassBase() {}
35 
37 
43 
44  protected:
47  std::string ReplaceString(std::string& subject, const std::string& search, const std::string& replace) {
48  size_t pos = 0;
49  while ((pos = subject.find(search, pos)) != std::string::npos) {
50  subject.replace(pos, search.length(), replace);
51  pos += replace.length();
52  }
53  return subject;
54  }
55 };
56 
57 } // namespace MueLu
58 
59 #define MUELU_FACADECLASSBASE_SHORT
60 
61 #endif /* PACKAGES_MUELU_SRC_INTERFACE_FACADECLASSES_MUELU_FACADECLASSBASE_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
std::string ReplaceString(std::string &subject, const std::string &search, const std::string &replace)
Replace all occurrences of search string &quot;search&quot; by the string in &quot;replace&quot; given the string &quot;subjec...
MueLu::DefaultNode Node
virtual ~FacadeClassBase()
Destructor.
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
virtual Teuchos::RCP< Teuchos::ParameterList > SetParameterList(const Teuchos::ParameterList &paramList)=0
Set parameter list for FacadeClass (abstract member).
Base class for MueLu classes.