MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_Describable.cpp
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 MUELU_DESCRIBABLE_HPP
11
#define MUELU_DESCRIBABLE_HPP
12
13
#include "
MueLu_Describable.hpp
"
14
15
namespace
MueLu
{
16
17
Describable::~Describable
() {}
18
19
void
Describable::describe
(Teuchos::FancyOStream &out_arg,
const
VerbLevel
/* verbLevel */
)
const
{
20
Teuchos::RCP<Teuchos::FancyOStream> out = rcp(&out_arg,
false
);
// JG: no idea why we have to do that, but it's how Teuchos::Describable::describe() is implemented
21
Teuchos::OSTab tab(out);
22
*out << this->
description
() << std::endl;
23
}
24
25
std::string
Describable::description
()
const
{
26
std::string str = Teuchos::Describable::description();
27
28
// remove template parameters
29
size_t
found = str.find_first_of(
"<"
);
30
if
(found != std::string::npos)
31
return
str.substr(0, found);
32
33
return
str;
34
}
35
36
void
Describable::describe
(Teuchos::FancyOStream &out,
const
Teuchos::EVerbosityLevel verbLevel)
const
{
describe
(out,
toMueLuVerbLevel
(verbLevel)); }
37
38
std::string
Describable::ShortClassName
()
const
{
39
if
(
shortClassName_
.empty()) {
40
std::string str = Teuchos::Describable::description();
41
42
// remove template parameters
43
{
44
size_t
found = str.find_first_of(
"<"
);
45
if
(found != std::string::npos)
46
str = str.substr(0, found);
47
}
48
49
// remove namespace
50
{
51
size_t
found = str.find_last_of(
":"
);
52
if
(found != std::string::npos)
53
str = str.substr(found + 1);
54
}
55
shortClassName_
= str;
56
}
57
return
shortClassName_
;
58
}
59
60
}
// namespace MueLu
61
62
#define MUELU_DESCRIBABLE_SHORT
63
#endif
// MUELU_DESCRIBABLE_HPP
MueLu_Describable.hpp
MueLu::Describable::ShortClassName
virtual std::string ShortClassName() const
Return the class name of the object, without template parameters and without namespace.
Definition
MueLu_Describable.cpp:38
MueLu::Describable::shortClassName_
std::string shortClassName_
Definition
MueLu_Describable.hpp:30
MueLu::Describable::~Describable
virtual ~Describable()
Destructor.
Definition
MueLu_Describable.cpp:17
MueLu::Describable::description
virtual std::string description() const
Return a simple one-line description of this object.
Definition
MueLu_Describable.cpp:25
MueLu::Describable::describe
virtual void describe(Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const
Definition
MueLu_Describable.cpp:19
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::VerbLevel
int VerbLevel
Definition
MueLu_VerbosityLevel.hpp:76
MueLu::toMueLuVerbLevel
VerbLevel toMueLuVerbLevel(const Teuchos::EVerbosityLevel verbLevel)
Translate Teuchos verbosity level to MueLu verbosity level.
Definition
MueLu_VerbosityLevel.cpp:18
src
MueCentral
MueLu_Describable.cpp
Generated by
1.17.0