MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_NoFactory.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
/*
11
* MueLu_NoFactory.cpp
12
*
13
* Created on: Sep 13, 2011
14
* Author: wiesner
15
*/
16
17
#include "
MueLu_Level.hpp
"
18
19
#include "
MueLu_NoFactory.hpp
"
20
21
namespace
MueLu
{
22
23
NoFactory::NoFactory
() =
default
;
24
25
NoFactory::~NoFactory
() =
default
;
26
27
const
RCP<const NoFactory>
NoFactory::getRCP
() {
28
if
(
noFactory_
.is_null())
29
noFactory_
= rcp(
new
NoFactory
());
30
31
return
noFactory_
;
32
}
33
34
const
NoFactory
*
NoFactory::get
() {
35
return
getRCP
().
get
();
36
}
37
38
void
NoFactory::CallDeclareInput
(
Level
&
/* requestedLevel */
)
const
{}
39
40
RCP<const NoFactory>
NoFactory::noFactory_
= Teuchos::null;
41
42
void
NoFactory::CallBuild
(
Level
& requestedLevel)
const
{
43
GetOStream
(
Errors
) <<
"MueLu::NoFactory::Build(): this method cannot be called."
<< std::endl
44
<< std::endl;
45
GetOStream
(
Errors
) <<
"Maybe, the required variable has been generated by another factory?"
<< std::endl;
46
GetOStream
(
Errors
) <<
"Here is a list of all available data on the current level:"
<< std::endl;
47
requestedLevel.
print
(
GetOStream
(
Errors
),
MueLu::Debug
);
48
throw
Exceptions::RuntimeError
(
"MueLu::NoFactory::Build(): this method cannot be called."
);
49
}
50
51
}
// namespace MueLu
MueLu_Level.hpp
MueLu_NoFactory.hpp
MueLu::Exceptions::RuntimeError
Exception throws to report errors in the internal logical of the program.
Definition
MueLu_Exceptions.hpp:36
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::Level::print
void print(std::ostream &out, const VerbLevel verbLevel=Default) const
Printing method.
Definition
MueLu_Level.cpp:385
MueLu::NoFactory::noFactory_
static RCP< const NoFactory > noFactory_
Definition
MueLu_NoFactory.hpp:63
MueLu::NoFactory::NoFactory
NoFactory()
Constructor.
MueLu::NoFactory::getRCP
static const RCP< const NoFactory > getRCP()
Static Get() functions.
Definition
MueLu_NoFactory.cpp:27
MueLu::NoFactory::CallBuild
void CallBuild(Level &requestedLevel) const
Implementation of FactoryBase interface.
Definition
MueLu_NoFactory.cpp:42
MueLu::NoFactory::CallDeclareInput
void CallDeclareInput(Level &) const
Definition
MueLu_NoFactory.cpp:38
MueLu::NoFactory::get
static const NoFactory * get()
Definition
MueLu_NoFactory.cpp:34
MueLu::NoFactory::~NoFactory
virtual ~NoFactory()
Destructor.
MueLu::VerboseObject::GetOStream
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Definition
MueLu_VerboseObject.cpp:72
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::Debug
@ Debug
Print additional debugging information.
Definition
MueLu_VerbosityLevel.hpp:42
MueLu::Errors
@ Errors
Errors.
Definition
MueLu_VerbosityLevel.hpp:18
src
MueCentral
MueLu_NoFactory.cpp
Generated by
1.17.0