MueLu
Version of the Day
Loading...
Searching...
No Matches
MueLu_Behavior.cpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Tpetra: Templated Linear Algebra Services Package
4
//
5
// Copyright 2008 NTESS and the Tpetra contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#include "Teuchos_EnvVariables.hpp"
11
#include "
MueLu_Behavior.hpp
"
12
#include <array>
13
#include <map>
14
15
// environ should be available on posix platforms
16
#if not(defined(WIN) && (_MSC_VER >= 1900))
17
// needs to be in the global namespace
18
extern
char
**environ;
19
#endif
20
21
namespace
MueLu
{
22
23
namespace
BehaviorDetails {
24
25
constexpr
const
std::string_view
DEBUG
=
"MUELU_DEBUG"
;
26
27
}
// namespace BehaviorDetails
28
29
namespace
{
// (anonymous)
30
31
constexpr
bool
debugDefault() {
32
#ifdef HAVE_MUELU_DEBUG
33
return
true
;
34
#else
35
return
false
;
36
#endif
// HAVE_MUELU_DEBUG
37
}
38
39
}
// namespace
40
41
bool
Behavior::debug
() {
42
constexpr
bool
defaultValue = debugDefault();
43
44
static
bool
value_ = defaultValue;
45
static
bool
initialized_ =
false
;
46
return
Teuchos::idempotentlyGetEnvironmentVariable(
47
value_, initialized_,
BehaviorDetails::DEBUG
, defaultValue);
48
}
49
50
}
// namespace MueLu
MueLu_Behavior.hpp
MueLu::Behavior::debug
static bool debug()
Whether MueLu is in debug mode.
Definition
MueLu_Behavior.cpp:41
MueLu::BehaviorDetails::DEBUG
constexpr const std::string_view DEBUG
Definition
MueLu_Behavior.cpp:25
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
src
Utils
MueLu_Behavior.cpp
Generated by
1.9.8