Teko
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Teko_PreconditionerState.cpp
1
// @HEADER
2
// *****************************************************************************
3
// Teko: A package for block and physics based preconditioning
4
//
5
// Copyright 2010 NTESS and the Teko contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#include "Teko_PreconditionerState.hpp"
11
12
#include "Thyra_DefaultPreconditioner.hpp"
13
14
using namespace
Thyra;
15
16
namespace
Teko {
18
20
void
PreconditionerState::setParameterList
(
const
RCP<Teuchos::ParameterList>& paramList) {
21
paramList_
= paramList;
22
}
23
25
RCP<Teuchos::ParameterList>
PreconditionerState::getNonconstParameterList
() {
26
if
(
paramList_
== Teuchos::null)
paramList_
= Teuchos::rcp(
new
Teuchos::ParameterList());
27
28
return
paramList_
;
29
}
30
32
RCP<Teuchos::ParameterList>
PreconditionerState::unsetParameterList
() {
33
RCP<Teuchos::ParameterList> paramList =
paramList_
;
34
paramList_
= Teuchos::null;
35
return
paramList;
36
}
37
39
void
PreconditionerState::merge
(
const
PreconditionerState& ps,
int
/* position */
) {
40
// merge the two linearOps lists
41
linearOps_.insert(ps.linearOps_.begin(), ps.linearOps_.end());
42
43
// merge two parameter lists
44
Teuchos::ParameterList::ConstIterator itr;
45
if
(ps.
paramList_
!= Teuchos::null) {
46
Teuchos::RCP<Teuchos::ParameterList> paramList =
getNonconstParameterList
();
47
for
(itr = ps.
paramList_
->begin(); itr != ps.
paramList_
->end(); ++itr)
48
paramList->setEntry(itr->first, itr->second);
49
}
50
}
51
53
unsigned
int
PreconditionerState::getTag
()
const
{
return
tag_; }
54
56
void
PreconditionerState::setTag
(
unsigned
int
tag) { tag_ = tag; }
57
59
60
}
// end namespace Teko
Teko::PreconditionerState::unsetParameterList
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Unset the parameter list that was set using setParameterList().
Definition
Teko_PreconditionerState.cpp:32
Teko::PreconditionerState::setParameterList
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > ¶mList)
Set parameters from a parameter list and return with default values.
Definition
Teko_PreconditionerState.cpp:20
Teko::PreconditionerState::getTag
unsigned int getTag() const
Get the tag for this operator.
Definition
Teko_PreconditionerState.cpp:53
Teko::PreconditionerState::setTag
void setTag(unsigned int tag)
Set the tag for this operator.
Definition
Teko_PreconditionerState.cpp:56
Teko::PreconditionerState::getNonconstParameterList
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Get the parameter list that was set using setParameterList().
Definition
Teko_PreconditionerState.cpp:25
Teko::PreconditionerState::merge
virtual void merge(const PreconditionerState &ps, int position=-1)
Merge internal storage of another PreconditionerState object into this one.
Definition
Teko_PreconditionerState.cpp:39
Teko::PreconditionerState::paramList_
Teuchos::RCP< Teuchos::ParameterList > paramList_
for ParameterListAcceptor
Definition
Teko_PreconditionerState.hpp:120
Generated by
1.17.0