Thyra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
support
operator_solve
client_support
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_decl.hpp
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Thyra: Interfaces and Support for Abstract Numerical Algorithms
5
// Copyright (2004) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
9
//
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
12
// met:
13
//
14
// 1. Redistributions of source code must retain the above copyright
15
// notice, this list of conditions and the following disclaimer.
16
//
17
// 2. Redistributions in binary form must reproduce the above copyright
18
// notice, this list of conditions and the following disclaimer in the
19
// documentation and/or other materials provided with the distribution.
20
//
21
// 3. Neither the name of the Corporation nor the names of the
22
// contributors may be used to endorse or promote products derived from
23
// this software without specific prior written permission.
24
//
25
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
//
37
// Questions? Contact Roscoe A. Bartlett (bartlettra@ornl.gov)
38
//
39
// ***********************************************************************
40
// @HEADER
41
42
#ifndef THYRA_DEFAULT_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
43
#define THYRA_DEFAULT_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
44
45
46
#include "Thyra_LinearOpWithSolveFactoryBase.hpp"
47
#include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
48
49
50
namespace
Thyra {
51
52
59
template
<
class
Scalar>
60
class
DefaultSerialDenseLinearOpWithSolveFactory
61
:
virtual
public
LinearOpWithSolveFactoryBase
<Scalar>,
62
virtual
protected
Teuchos::ParameterListAcceptorDefaultBase
63
{
64
public
:
65
68
70
73
75
void
setParameterList
(
RCP<ParameterList>
const
& paramList);
77
RCP<const ParameterList>
getValidParameters
()
const
;
78
80
83
85
virtual
bool
acceptsPreconditionerFactory
()
const
;
86
88
virtual
void
setPreconditionerFactory
(
89
const
RCP
<
PreconditionerFactoryBase<Scalar>
> &precFactory,
90
const
std::string &precFactoryName
91
);
92
94
virtual
RCP<PreconditionerFactoryBase<Scalar>
>
95
getPreconditionerFactory
()
const
;
96
98
virtual
void
unsetPreconditionerFactory
(
99
RCP
<
PreconditionerFactoryBase<Scalar>
> *precFactory,
100
std::string *precFactoryName
101
);
102
104
virtual
bool
isCompatible
(
105
const
LinearOpSourceBase<Scalar>
&fwdOpSrc
106
)
const
;
107
109
virtual
RCP<LinearOpWithSolveBase<Scalar>
>
createOp
()
const
;
110
112
virtual
void
initializeOp
(
113
const
RCP
<
const
LinearOpSourceBase<Scalar>
> &fwdOpSrc,
114
LinearOpWithSolveBase<Scalar>
*Op,
115
const
ESupportSolveUse
supportSolveUse
116
)
const
;
117
119
virtual
void
initializeAndReuseOp
(
120
const
RCP
<
const
LinearOpSourceBase<Scalar>
> &fwdOpSrc,
121
LinearOpWithSolveBase<Scalar>
*Op
122
)
const
;
123
125
virtual
void
uninitializeOp
(
126
LinearOpWithSolveBase<Scalar>
*Op,
127
RCP
<
const
LinearOpSourceBase<Scalar>
> *fwdOpSrc,
128
RCP
<
const
PreconditionerBase<Scalar>
> *
prec
,
129
RCP
<
const
LinearOpSourceBase<Scalar>
> *approxFwdOpSrc,
130
ESupportSolveUse
*supportSolveUse
131
)
const
;
132
134
virtual
bool
supportsPreconditionerInputType
(
135
const
EPreconditionerInputType
precOpType
136
)
const
;
137
139
virtual
void
initializePreconditionedOp
(
140
const
RCP
<
const
LinearOpSourceBase<Scalar>
> &fwdOpSrc,
141
const
RCP
<
const
PreconditionerBase<Scalar>
> &
prec
,
142
LinearOpWithSolveBase<Scalar>
*Op,
143
const
ESupportSolveUse
supportSolveUse
144
)
const
;
145
147
virtual
void
initializeApproxPreconditionedOp
(
148
const
RCP
<
const
LinearOpSourceBase<Scalar>
> &fwdOpSrc,
149
const
RCP
<
const
LinearOpSourceBase<Scalar>
> &approxFwdOpSrc,
150
LinearOpWithSolveBase<Scalar>
*Op,
151
const
ESupportSolveUse
supportSolveUse
152
)
const
;
153
155
156
};
157
158
163
template
<
class
Scalar>
164
RCP<DefaultSerialDenseLinearOpWithSolveFactory<Scalar>
>
165
defaultSerialDenseLinearOpWithSolveFactory()
166
{
167
return
Teuchos::rcp
(
new
DefaultSerialDenseLinearOpWithSolveFactory<Scalar>
);
168
}
169
170
171
}
// namespace Thyra
172
173
174
#endif
// THYRA_DEFAULT_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
Teuchos::ParameterListAcceptorDefaultBase
Teuchos::RCP
Thyra::DefaultSerialDenseLinearOpWithSolveFactory
Concreate LinearOpWithSolveFactoryBase subclass that creates DefaultSerialDenseLinearOpWithSolve obje...
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_decl.hpp:63
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::setPreconditionerFactory
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
Throws exception.
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:89
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::getValidParameters
RCP< const ParameterList > getValidParameters() const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:71
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::createOp
virtual RCP< LinearOpWithSolveBase< Scalar > > createOp() const
Returns a DefaultSerialDenseLinearOpWithSolve object .
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:128
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::acceptsPreconditionerFactory
virtual bool acceptsPreconditionerFactory() const
returns false.
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:82
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::getPreconditionerFactory
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Returns null .
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:100
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::initializePreconditionedOp
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:215
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::initializeOp
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:135
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::uninitializeOp
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, RCP< const PreconditionerBase< Scalar > > *prec, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:174
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::supportsPreconditionerInputType
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:205
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::setParameterList
void setParameterList(RCP< ParameterList > const ¶mList)
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:60
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::unsetPreconditionerFactory
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *precFactory, std::string *precFactoryName)
Throws exception.
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:107
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::initializeApproxPreconditionedOp
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:227
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::initializeAndReuseOp
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:164
Thyra::DefaultSerialDenseLinearOpWithSolveFactory::isCompatible
virtual bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
Definition
Thyra_DefaultSerialDenseLinearOpWithSolveFactory_def.hpp:117
Thyra::LinearOpSourceBase
Base interface for objects that can return a linear operator.
Definition
Thyra_LinearOpSourceBase.hpp:58
Thyra::LinearOpWithSolveBase
Base class for all linear operators that can support a high-level solve operation.
Definition
Thyra_LinearOpWithSolveBase_decl.hpp:311
Thyra::LinearOpWithSolveFactoryBase
Factory interface for creating LinearOpWithSolveBase objects from compatible LinearOpBase objects.
Definition
Thyra_LinearOpWithSolveFactoryBase_decl.hpp:408
Thyra::PreconditionerBase
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
Definition
Thyra_PreconditionerBase.hpp:90
Thyra::PreconditionerFactoryBase
Factory interface for creating preconditioner objects from LinearOpBase objects.
Definition
Thyra_PreconditionerFactoryBase_decl.hpp:67
Thyra::PreconditionerFactoryBase::prec
Teuchos::RCP< PreconditionerBase< Scalar > > prec(const PreconditionerFactoryBase< Scalar > &precFactory, const Teuchos::RCP< const LinearOpBase< Scalar > > &fwdOp, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED)
Create and initialize a preconditioner from a forward linear operator.
Definition
Thyra_PreconditionerFactoryHelpers.hpp:96
Thyra::EPreconditionerInputType
EPreconditionerInputType
Enum defining the status of a preconditioner object.
Definition
Thyra_SolveSupportTypes.hpp:501
Thyra::ESupportSolveUse
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
Definition
Thyra_SolveSupportTypes.hpp:489
Teuchos::rcp
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Generated by
1.17.0