ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
operator
ROL_AugmentedSystemPrecOperator.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Rapid Optimization Library (ROL) Package
4
//
5
// Copyright 2014 NTESS and the ROL contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef ROL_AUGMENTED_SYSTEM_PREC_OPERATOR_H
11
#define ROL_AUGMENTED_SYSTEM_PREC_OPERATOR_H
12
13
#include "
ROL_Constraint.hpp
"
14
#include "
ROL_PartitionedVector.hpp
"
15
22
23
namespace
ROL
{
24
25
template
<
class
Real>
26
class
AugmentedSystemPrecOperator
:
public
LinearOperator
<Real> {
27
private
:
28
const
Ptr<Constraint<Real>>
con_
;
29
const
Ptr<const Vector<Real>>
x_
;
30
31
public
:
32
virtual
~AugmentedSystemPrecOperator
() {}
33
AugmentedSystemPrecOperator
(
const
Ptr<
Constraint<Real>
> &con,
34
const
Ptr<
const
Vector<Real>
> &x)
35
:
con_
(con),
x_
(x) {}
36
37
void
apply
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
38
throw
Exception::NotImplemented
(
">>> AugmentedSystemPrecOperator::apply : Not Implemented!"
);
39
}
40
41
void
applyAdjoint
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
42
throw
Exception::NotImplemented
(
">>> AugmentedSystemPrecOperator::applyAdjoint : Not Implemented!"
);
43
}
44
45
void
applyInverse
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
46
Real
zero
(0);
47
PartitionedVector<Real>
&Hvp =
dynamic_cast<
PartitionedVector<Real>
&
>
(Hv);
48
const
PartitionedVector<Real>
&vp =
dynamic_cast<
const
PartitionedVector<Real>
&
>
(v);
49
50
Hvp.
set
(0, *(vp.
get
(0)));
51
// Second x should be dual, but unused?
52
con_
->applyPreconditioner(*(Hvp.
get
(1)),*(vp.
get
(1)),*
x_
,*
x_
,
zero
);
53
}
54
55
void
applyAdjointInverse
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
56
applyInverse
(Hv,v,tol);
57
}
58
59
};
// class AugmentedSystemPrecOperator
60
61
}
// namespace ROL
62
63
#endif
ROL_Constraint.hpp
zero
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0 zero)()
Definition
ROL_Objective_SerialSimOpt.hpp:77
ROL_PartitionedVector.hpp
ROL::AugmentedSystemPrecOperator::apply
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_AugmentedSystemPrecOperator.hpp:37
ROL::AugmentedSystemPrecOperator::applyAdjointInverse
void applyAdjointInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_AugmentedSystemPrecOperator.hpp:55
ROL::AugmentedSystemPrecOperator::AugmentedSystemPrecOperator
AugmentedSystemPrecOperator(const Ptr< Constraint< Real > > &con, const Ptr< const Vector< Real > > &x)
Definition
ROL_AugmentedSystemPrecOperator.hpp:33
ROL::AugmentedSystemPrecOperator::~AugmentedSystemPrecOperator
virtual ~AugmentedSystemPrecOperator()
Definition
ROL_AugmentedSystemPrecOperator.hpp:32
ROL::AugmentedSystemPrecOperator::applyAdjoint
void applyAdjoint(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_AugmentedSystemPrecOperator.hpp:41
ROL::AugmentedSystemPrecOperator::con_
const Ptr< Constraint< Real > > con_
Definition
ROL_AugmentedSystemPrecOperator.hpp:28
ROL::AugmentedSystemPrecOperator::applyInverse
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_AugmentedSystemPrecOperator.hpp:45
ROL::AugmentedSystemPrecOperator::x_
const Ptr< const Vector< Real > > x_
Definition
ROL_AugmentedSystemPrecOperator.hpp:29
ROL::Constraint
Defines the general constraint operator interface.
Definition
ROL_Constraint.hpp:52
ROL::Exception::NotImplemented
Definition
ROL_Types.hpp:884
ROL::LinearOperator
Provides the interface to apply a linear operator.
Definition
ROL_LinearOperator.hpp:37
ROL::PartitionedVector
Defines the linear algebra of vector space on a generic partitioned vector.
Definition
ROL_PartitionedVector.hpp:26
ROL::PartitionedVector::get
ROL::Ptr< const Vector< Real > > get(size_type i) const
Definition
ROL_PartitionedVector.hpp:221
ROL::PartitionedVector::set
void set(const V &x)
Definition
ROL_PartitionedVector.hpp:46
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.17.0