ROL
Public Member Functions | Private Attributes | List of all members
InnerConstraint Class Reference
+ Inheritance diagram for InnerConstraint:

Public Member Functions

 InnerConstraint (int n)
 
void update (const VectorT &x, ROL::UpdateType type, int iter) override
 
void value (VectorT &c, const VectorT &x, RealT &tol) override
 
void applyJacobian (VectorT &jv, const VectorT &v, const VectorT &x, RealT &tol) override
 
void applyAdjointJacobian (VectorT &ajl, const VectorT &l, const VectorT &x, RealT &tol) override
 
void applyAdjointHessian (VectorT &ahlv, const VectorT &l, const VectorT &v, const VectorT &x, RealT &tol) override
 
- Public Member Functions inherited from ROL::StdConstraint< RealT >
virtual ~StdConstraint ()
 
void update (const Vector< RealT > &x, bool flag=true, int iter=-1) override
 Update constraint functions. x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count. More...
 
virtual void update (const std::vector< RealT > &x, bool flag=true, int iter=-1)
 
void update (const Vector< RealT > &x, UpdateType type, int iter=-1) override
 Update constraint function. More...
 
virtual void update (const std::vector< RealT > &x, UpdateType type, int iter=-1)
 
void value (Vector< RealT > &c, const Vector< RealT > &x, RealT &tol) override
 Evaluate the constraint operator \(c:\mathcal{X} \rightarrow \mathcal{C}\) at \(x\). More...
 
virtual void value (std::vector< RealT > &c, const std::vector< RealT > &x, RealT &tol)=0
 
void applyJacobian (Vector< RealT > &jv, const Vector< RealT > &v, const Vector< RealT > &x, RealT &tol) override
 Apply the constraint Jacobian at \(x\), \(c'(x) \in L(\mathcal{X}, \mathcal{C})\), to vector \(v\). More...
 
virtual void applyJacobian (std::vector< RealT > &jv, const std::vector< RealT > &v, const std::vector< RealT > &x, RealT &tol)
 
void applyAdjointJacobian (Vector< RealT > &ajv, const Vector< RealT > &v, const Vector< RealT > &x, RealT &tol) override
 Apply the adjoint of the the constraint Jacobian at \(x\), \(c'(x)^* \in L(\mathcal{C}^*, \mathcal{X}^*)\), to vector \(v\). More...
 
virtual void applyAdjointJacobian (std::vector< RealT > &ajv, const std::vector< RealT > &v, const std::vector< RealT > &x, RealT &tol)
 
void applyAdjointHessian (Vector< RealT > &ahuv, const Vector< RealT > &u, const Vector< RealT > &v, const Vector< RealT > &x, RealT &tol) override
 Apply the derivative of the adjoint of the constraint Jacobian at \(x\) to vector \(u\) in direction \(v\), according to \( v \mapsto c''(x)(v,\cdot)^*u \). More...
 
virtual void applyAdjointHessian (std::vector< RealT > &ahuv, const std::vector< RealT > &u, const std::vector< RealT > &v, const std::vector< RealT > &x, RealT &tol)
 
std::vector< RealTsolveAugmentedSystem (Vector< RealT > &v1, Vector< RealT > &v2, const Vector< RealT > &b1, const Vector< RealT > &b2, const Vector< RealT > &x, RealT &tol) override
 Approximately solves the augmented system

\[ \begin{pmatrix} I & c'(x)^* \\ c'(x) & 0 \end{pmatrix} \begin{pmatrix} v_{1} \\ v_{2} \end{pmatrix} = \begin{pmatrix} b_{1} \\ b_{2} \end{pmatrix} \]

where \(v_{1} \in \mathcal{X}\), \(v_{2} \in \mathcal{C}^*\), \(b_{1} \in \mathcal{X}^*\), \(b_{2} \in \mathcal{C}\), \(I : \mathcal{X} \rightarrow \mathcal{X}^*\) is an identity or Riesz operator, and \(0 : \mathcal{C}^* \rightarrow \mathcal{C}\) is a zero operator. More...

 
virtual std::vector< RealTsolveAugmentedSystem (std::vector< RealT > &v1, std::vector< RealT > &v2, const std::vector< RealT > &b1, const std::vector< RealT > &b2, const std::vector< RealT > &x, RealTtol)
 
void applyPreconditioner (Vector< RealT > &pv, const Vector< RealT > &v, const Vector< RealT > &x, const Vector< RealT > &g, RealT &tol) override
 Apply a constraint preconditioner at \(x\), \(P(x) \in L(\mathcal{C}, \mathcal{C}^*)\), to vector \(v\). Ideally, this preconditioner satisfies the following relationship:

\[ \left[c'(x) \circ R \circ c'(x)^* \circ P(x)\right] v = v \,, \]

where R is the appropriate Riesz map in \(L(\mathcal{X}^*, \mathcal{X})\). It is used by the solveAugmentedSystem method. More...

 
virtual void applyPreconditioner (std::vector< RealT > &pv, const std::vector< RealT > &v, const std::vector< RealT > &x, const std::vector< RealT > &g, RealT &tol)
 
- Public Member Functions inherited from ROL::Constraint< RealT >
virtual ~Constraint (void)
 
 Constraint (void)
 
virtual void applyAdjointJacobian (Vector< RealT > &ajv, const Vector< RealT > &v, const Vector< RealT > &x, const Vector< RealT > &dualv, RealT &tol)
 Apply the adjoint of the the constraint Jacobian at \(x\), \(c'(x)^* \in L(\mathcal{C}^*, \mathcal{X}^*)\), to vector \(v\). More...
 
void activate (void)
 Turn on constraints. More...
 
void deactivate (void)
 Turn off constraints. More...
 
bool isActivated (void)
 Check if constraints are on. More...
 
virtual std::vector
< std::vector< RealT > > 
checkApplyJacobian (const Vector< RealT > &x, const Vector< RealT > &v, const Vector< RealT > &jv, const std::vector< RealT > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference check for the constraint Jacobian application. More...
 
virtual std::vector
< std::vector< RealT > > 
checkApplyJacobian (const Vector< RealT > &x, const Vector< RealT > &v, const Vector< RealT > &jv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference check for the constraint Jacobian application. More...
 
virtual std::vector
< std::vector< RealT > > 
checkApplyAdjointJacobian (const Vector< RealT > &x, const Vector< RealT > &v, const Vector< RealT > &c, const Vector< RealT > &ajv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference check for the application of the adjoint of constraint Jacobian. More...
 
virtual RealT checkAdjointConsistencyJacobian (const Vector< RealT > &w, const Vector< RealT > &v, const Vector< RealT > &x, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual RealT checkAdjointConsistencyJacobian (const Vector< RealT > &w, const Vector< RealT > &v, const Vector< RealT > &x, const Vector< RealT > &dualw, const Vector< RealT > &dualv, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual std::vector
< std::vector< RealT > > 
checkApplyAdjointHessian (const Vector< RealT > &x, const Vector< RealT > &u, const Vector< RealT > &v, const Vector< RealT > &hv, const std::vector< RealT > &step, const bool printToScreen=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference check for the application of the adjoint of constraint Hessian. More...
 
virtual std::vector
< std::vector< RealT > > 
checkApplyAdjointHessian (const Vector< RealT > &x, const Vector< RealT > &u, const Vector< RealT > &v, const Vector< RealT > &hv, const bool printToScreen=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference check for the application of the adjoint of constraint Hessian. More...
 
virtual void setParameter (const std::vector< RealT > &param)
 

Private Attributes

VectorT y_
 
VectorT sin_
 
VectorT cos_
 
int n_
 
int m_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::Constraint< RealT >
const std::vector< RealTgetParameter (void) const
 

Detailed Description

Definition at line 64 of file function/constraint/test_03.cpp.

Constructor & Destructor Documentation

InnerConstraint::InnerConstraint ( int  n)
inline

Definition at line 66 of file function/constraint/test_03.cpp.

Member Function Documentation

void InnerConstraint::update ( const VectorT x,
ROL::UpdateType  type,
int  iter 
)
inlineoverride

Definition at line 68 of file function/constraint/test_03.cpp.

References cos_, m_, n_, sin_, and y_.

void InnerConstraint::value ( VectorT c,
const VectorT x,
RealT tol 
)
inlineoverride

Definition at line 80 of file function/constraint/test_03.cpp.

References m_, and y_.

void InnerConstraint::applyJacobian ( VectorT jv,
const VectorT v,
const VectorT x,
RealT tol 
)
inlineoverride

Definition at line 86 of file function/constraint/test_03.cpp.

References m_, n_, and sin_.

void InnerConstraint::applyAdjointJacobian ( VectorT ajl,
const VectorT l,
const VectorT x,
RealT tol 
)
inlineoverride

Definition at line 97 of file function/constraint/test_03.cpp.

References n_, and sin_.

void InnerConstraint::applyAdjointHessian ( VectorT ahlv,
const VectorT l,
const VectorT v,
const VectorT x,
RealT tol 
)
inlineoverride

Definition at line 106 of file function/constraint/test_03.cpp.

References cos_, n_, and sin_.

Member Data Documentation

VectorT InnerConstraint::y_
private

Definition at line 118 of file function/constraint/test_03.cpp.

Referenced by update(), and value().

VectorT InnerConstraint::sin_
private
VectorT InnerConstraint::cos_
private

Definition at line 118 of file function/constraint/test_03.cpp.

Referenced by applyAdjointHessian(), and update().

int InnerConstraint::n_
private
int InnerConstraint::m_
private

Definition at line 119 of file function/constraint/test_03.cpp.

Referenced by applyJacobian(), update(), and value().


The documentation for this class was generated from the following file: