ROL
ROL_Types.hpp File Reference

Contains definitions of custom data types in ROL. More...

#include <algorithm>
#include <complex>
#include <exception>
#include <string>
#include <sstream>
#include <limits>
#include <type_traits>
#include <ROL_stacktrace.hpp>
#include "ROL_ScalarTraits.hpp"
#include <ROL_Ptr.hpp>
#include <ROL_Vector.hpp>
#include <ROL_config.h>

Go to the source code of this file.

Classes

struct  ROL::ROL::AlgorithmState< Real >
 State for algorithm class. Will be used for restarts. More...
 
struct  ROL::ROL::StepState< Real >
 State for step class. Will be used for restarts. More...
 
struct  ROL::ROL::removeSpecialCharacters
 
struct  ROL::ROL::TypeCaster< Real, Element >
 
struct  ROL::ROL::TypeCaster< Real, std::complex< Real > >
 
struct  ROL::ROL::TypeCaster< double, float >
 
class  ROL::Exception::NotImplemented
 

Namespaces

namespace  ROL
 
namespace  ROL::Finite_Difference_Arrays
 
namespace  ROL::Exception
 

Macros

#define ROL_VALIDATE(A)
 
#define ROL_NUM_CHECKDERIV_STEPS   13
 Number of steps for derivative checks.
 

Typedefs

template<bool B, class T = void>
using ROL::Exception::enable_if_t = typename std::enable_if<B,T>::type
 

Enumerations

enum  ROL::EExitStatus {
  ROL::EXITSTATUS_CONVERGED = 0 , ROL::EXITSTATUS_MAXITER , ROL::EXITSTATUS_STEPTOL , ROL::EXITSTATUS_NAN ,
  ROL::EXITSTATUS_USERDEFINED , ROL::EXITSTATUS_LAST
}
 Enum for algorithm termination. More...
 
enum  ROL::EProblem {
  ROL::TYPE_U = 0 , ROL::TYPE_B , ROL::TYPE_E , ROL::TYPE_EB ,
  ROL::TYPE_LAST
}
 
enum  ROL::EStep {
  ROL::STEP_AUGMENTEDLAGRANGIAN = 0 , ROL::STEP_BUNDLE , ROL::STEP_COMPOSITESTEP , ROL::STEP_LINESEARCH ,
  ROL::STEP_MOREAUYOSIDAPENALTY , ROL::STEP_PRIMALDUALACTIVESET , ROL::STEP_TRUSTREGION , ROL::STEP_INTERIORPOINT ,
  ROL::STEP_FLETCHER , ROL::STEP_LAST
}
 
enum  ROL::EDescent {
  ROL::DESCENT_STEEPEST = 0 , ROL::DESCENT_NONLINEARCG , ROL::DESCENT_SECANT , ROL::DESCENT_NEWTON ,
  ROL::DESCENT_NEWTONKRYLOV , ROL::DESCENT_LAST
}
 
enum  ROL::ESecant {
  ROL::SECANT_LBFGS = 0 , ROL::SECANT_LDFP , ROL::SECANT_LSR1 , ROL::SECANT_BARZILAIBORWEIN ,
  ROL::SECANT_USERDEFINED , ROL::SECANT_LAST
}
 
enum  ROL::ENonlinearCG {
  ROL::NONLINEARCG_HESTENES_STIEFEL = 0 , ROL::NONLINEARCG_FLETCHER_REEVES , ROL::NONLINEARCG_DANIEL , ROL::NONLINEARCG_POLAK_RIBIERE ,
  ROL::NONLINEARCG_FLETCHER_CONJDESC , ROL::NONLINEARCG_LIU_STOREY , ROL::NONLINEARCG_DAI_YUAN , ROL::NONLINEARCG_HAGER_ZHANG ,
  ROL::NONLINEARCG_OREN_LUENBERGER , ROL::NONLINEARCG_USERDEFINED , ROL::NONLINEARCG_LAST
}
 
enum  ROL::ELineSearch {
  ROL::LINESEARCH_ITERATIONSCALING = 0 , ROL::LINESEARCH_PATHBASEDTARGETLEVEL , ROL::LINESEARCH_BACKTRACKING , ROL::LINESEARCH_BISECTION ,
  ROL::LINESEARCH_GOLDENSECTION , ROL::LINESEARCH_CUBICINTERP , ROL::LINESEARCH_BRENTS , ROL::LINESEARCH_USERDEFINED ,
  ROL::LINESEARCH_LAST
}
 
enum  ROL::ECurvatureCondition {
  ROL::CURVATURECONDITION_WOLFE = 0 , ROL::CURVATURECONDITION_STRONGWOLFE , ROL::CURVATURECONDITION_GENERALIZEDWOLFE , ROL::CURVATURECONDITION_APPROXIMATEWOLFE ,
  ROL::CURVATURECONDITION_GOLDSTEIN , ROL::CURVATURECONDITION_NULL , ROL::CURVATURECONDITION_LAST
}
 
enum  ROL::ECGFlag {
  ROL::CG_FLAG_SUCCESS = 0 , ROL::CG_FLAG_ITEREXCEED , ROL::CG_FLAG_NEGCURVE , ROL::CG_FLAG_TRRADEX ,
  ROL::CG_FLAG_ZERORHS , ROL::CG_FLAG_UNDEFINED
}
 

Functions

template<class T >
std::string ROL::NumberToString (T Number)
 
template<class Real >
Real ROL::ROL_EPSILON (void)
 Platform-dependent machine epsilon.
 
template<class Real >
Real ROL::ROL_THRESHOLD (void)
 Tolerance for various equality tests.
 
template<class Real >
Real ROL::ROL_OVERFLOW (void)
 Platform-dependent maximum double.
 
template<class Real >
Real ROL::ROL_INF (void)
 
template<class Real >
Real ROL::ROL_NINF (void)
 
template<class Real >
Real ROL::ROL_UNDERFLOW (void)
 Platform-dependent minimum double.
 
std::string ROL::EExitStatusToString (EExitStatus tr)
 
std::string ROL::removeStringFormat (std::string s)
 
std::string ROL::EStepToString (EStep tr)
 
bool ROL::isCompatibleStep (EProblem p, EStep s)
 
std::string ROL::EProblemToString (EProblem p)
 
int ROL::isValidStep (EStep ls)
 Verifies validity of a TrustRegion enum.
 
EStepROL::operator++ (EStep &type)
 
EStep ROL::operator++ (EStep &type, int)
 
EStepROL::operator-- (EStep &type)
 
EStep ROL::operator-- (EStep &type, int)
 
EStep ROL::StringToEStep (std::string s)
 
std::string ROL::EDescentToString (EDescent tr)
 
int ROL::isValidDescent (EDescent d)
 Verifies validity of a Secant enum.
 
EDescentROL::operator++ (EDescent &type)
 
EDescent ROL::operator++ (EDescent &type, int)
 
EDescentROL::operator-- (EDescent &type)
 
EDescent ROL::operator-- (EDescent &type, int)
 
EDescent ROL::StringToEDescent (std::string s)
 
std::string ROL::ESecantToString (ESecant tr)
 
int ROL::isValidSecant (ESecant s)
 Verifies validity of a Secant enum.
 
ESecantROL::operator++ (ESecant &type)
 
ESecant ROL::operator++ (ESecant &type, int)
 
ESecantROL::operator-- (ESecant &type)
 
ESecant ROL::operator-- (ESecant &type, int)
 
ESecant ROL::StringToESecant (std::string s)
 
std::string ROL::ENonlinearCGToString (ENonlinearCG tr)
 
int ROL::isValidNonlinearCG (ENonlinearCG s)
 Verifies validity of a NonlinearCG enum.
 
ENonlinearCGROL::operator++ (ENonlinearCG &type)
 
ENonlinearCG ROL::operator++ (ENonlinearCG &type, int)
 
ENonlinearCGROL::operator-- (ENonlinearCG &type)
 
ENonlinearCG ROL::operator-- (ENonlinearCG &type, int)
 
ENonlinearCG ROL::StringToENonlinearCG (std::string s)
 
std::string ROL::ELineSearchToString (ELineSearch ls)
 
int ROL::isValidLineSearch (ELineSearch ls)
 Verifies validity of a LineSearch enum.
 
ELineSearchROL::operator++ (ELineSearch &type)
 
ELineSearch ROL::operator++ (ELineSearch &type, int)
 
ELineSearchROL::operator-- (ELineSearch &type)
 
ELineSearch ROL::operator-- (ELineSearch &type, int)
 
ELineSearch ROL::StringToELineSearch (std::string s)
 
std::string ROL::ECurvatureConditionToString (ECurvatureCondition ls)
 
int ROL::isValidCurvatureCondition (ECurvatureCondition ls)
 Verifies validity of a CurvatureCondition enum.
 
ECurvatureConditionROL::operator++ (ECurvatureCondition &type)
 
ECurvatureCondition ROL::operator++ (ECurvatureCondition &type, int)
 
ECurvatureConditionROL::operator-- (ECurvatureCondition &type)
 
ECurvatureCondition ROL::operator-- (ECurvatureCondition &type, int)
 
ECurvatureCondition ROL::StringToECurvatureCondition (std::string s)
 
std::string ROL::ECGFlagToString (ECGFlag cgf)
 
template<class Element , class Real >
Real ROL::rol_cast (const Element &val)
 

Variables

int iter
 
int minIter
 
int nfval
 
int ncval
 
int ngrad
 
Real value
 
Real minValue
 
Real gnorm
 
Real cnorm
 
Real snorm
 
Real aggregateGradientNorm
 
Real aggregateModelError
 
bool flag
 
ROL::Ptr< Vector< Real > > iterateVec
 
ROL::Ptr< Vector< Real > > lagmultVec
 
ROL::Ptr< Vector< Real > > minIterVec
 
EExitStatus statusFlag
 
ROL::Ptr< Vector< Real > > gradientVec
 
ROL::Ptr< Vector< Real > > descentVec
 
ROL::Ptr< Vector< Real > > constraintVec
 
Real searchSize
 
int SPiter
 
int SPflag
 
const int ROL::Finite_Difference_Arrays::shifts [4][4]
 
const double ROL::Finite_Difference_Arrays::weights [4][5]
 

Detailed Description

Contains definitions of custom data types in ROL.

Author
Created by D. Ridzal and D. Kouri.

Definition in file ROL_Types.hpp.

Macro Definition Documentation

◆ ROL_VALIDATE

#define ROL_VALIDATE ( A)
Value:
/* empty */

Definition at line 56 of file ROL_Constraint_SerialSimOpt.hpp.

◆ ROL_NUM_CHECKDERIV_STEPS

#define ROL_NUM_CHECKDERIV_STEPS   13

Number of steps for derivative checks.

Definition at line 74 of file ROL_Constraint_SerialSimOpt.hpp.

Variable Documentation

◆ iter

int iter

Definition at line 144 of file ROL_Types.hpp.

◆ minIter

int minIter

Definition at line 145 of file ROL_Types.hpp.

◆ nfval

◆ ncval

int ncval

Definition at line 147 of file ROL_Types.hpp.

◆ ngrad

◆ value

Real value

Definition at line 149 of file ROL_Types.hpp.

Referenced by ROL::ROL::Constraint< Real >::applyAdjointJacobian(), Constraint_SimOpt::applyAdjointJacobian_1(), Constraint_SimOpt::applyAdjointJacobian_2(), ROL::ROL::Constraint< Real >::applyJacobian(), Constraint_SimOpt::applyJacobian_1(), Constraint_SimOpt::applyJacobian_2(), ROL::DynamicObjectiveCheck< Real >::check(), ROL::ROL::Constraint< Real >::checkApplyAdjointJacobian(), ROL::ROL::Constraint< Real >::checkApplyJacobian(), Constraint_SimOpt::checkApplyJacobian_1(), ROL::Constraint_TimeSimOpt< Real >::checkApplyJacobian_1_new(), Constraint_SimOpt::checkApplyJacobian_2(), ROL::ROL::Objective< Real >::checkGradient(), ROL::Objective_SimOpt< Real >::checkGradient_1(), ROL::Objective_SimOpt< Real >::checkGradient_2(), Constraint_SimOpt::checkSolve(), ROL::Constraint_TimeSimOpt< Real >::checkSolve(), ROL::ColemanLiModel< Real >::computeCauchyPoint(), ROL::ScalarMinimizationLineSearch_U::Phi< Real >::deriv(), ROL::ZOO::Objective_DiodeCircuit< Real >::generate_plot(), ROL::getValidROLParameters(), ROL::FletcherStep< Real >::getValueString(), ROL::ROL::Objective< Real >::gradient(), ROL::StdObjective< Real >::gradient(), ROL::Objective_SimOpt< Real >::gradient_1(), ROL::Objective_SimOpt< Real >::gradient_2(), ROL::BoundFletcher< Real >::hessVec(), main(), ROL::ColemanLiModel< Real >::primalTransform(), ROL::setParameter(), Constraint_BurgersControl< Real >::solve(), Constraint_SimOpt::solve(), DiffusionConstraint< Real >::solve(), ROL::DynamicConstraint< Real >::solve(), testRandomInputs(), ROL::tierParameterList(), Constraint_SimOpt::value(), ROL::Constraint_TimeSimOpt< Real >::value(), ROL::Objective_SimOpt< Real >::value(), ROL::StdConstraint< Real >::value(), ROL::StdObjective< Real >::value(), and ROL::value().

◆ minValue

Real minValue

Definition at line 150 of file ROL_Types.hpp.

◆ gnorm

◆ cnorm

◆ snorm

Real snorm

Definition at line 153 of file ROL_Types.hpp.

Referenced by ROL::CauchyPoint< Real >::cauchypoint_unc(), Gradient_U::compute(), QuasiNewton_U::compute(), ROL::Newton_U< Real >::compute(), ROL::NewtonKrylov_U< Real >::compute(), ROL::NonlinearCG_U< Real >::compute(), ROL::LinMore< Real >::dcauchy(), ROL::TypeB::LinMoreAlgorithm< Real >::dcauchy(), ROL::TypeB::LSecantBAlgorithm< Real >::dcauchy(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::dcauchy(), ROL::ScalarMinimizationLineSearch_U::Phi< Real >::deriv(), LineSearch_U::dirDeriv(), ROL::LinMore< Real >::dprsrch(), ROL::TypeB::LinMoreAlgorithm< Real >::dprsrch(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::dpsg_simple(), ROL::TypeB::LSecantBAlgorithm< Real >::dsrch(), ROL::TRUtils::interpolateRadius(), ROL::ColemanLiModel< Real >::primalTransform(), ROL::CauchyPoint< Real >::run(), ROL::DogLeg< Real >::run(), ROL::DoubleDogLeg< Real >::run(), ROL::LinMore< Real >::run(), ROL::TruncatedCG< Real >::run(), ROL::TypeB::ColemanLiAlgorithm< Real >::run(), ROL::TypeB::LinMoreAlgorithm< Real >::run(), ROL::TypeB::LSecantBAlgorithm< Real >::run(), ROL::TypeB::PrimalDualActiveSetAlgorithm< Real >::run(), CauchyPoint_U::solve(), DogLeg_U::solve(), DoubleDogLeg_U::solve(), SPGTrustRegion_U::solve(), TruncatedCG_U::solve(), ROL::Bundle_AS< Real >::solveDual_arbitrary(), QuasiNewton_U::update(), ROL::NewtonKrylov_U< Real >::update(), ROL::TrustRegion< Real >::update(), TrustRegionModel_U::update(), lSR1::updateStorage(), and Secant::updateStorage().

◆ aggregateGradientNorm

Real aggregateGradientNorm

Definition at line 154 of file ROL_Types.hpp.

◆ aggregateModelError

Real aggregateModelError

Definition at line 155 of file ROL_Types.hpp.

◆ flag

int flag

Definition at line 156 of file ROL_Types.hpp.

Referenced by ROL::CompositeStep< Real >::accept(), ROL::TypeE::CompositeStepAlgorithm< Real >::accept(), ROL::TRUtils::analyzeRatio(), CombinedStatusTest::check(), ROL::FDivergence< Real >::check(), ROL::PrimalDualRisk< Real >::checkStatus(), Gradient_U::compute(), QuasiNewton_U::compute(), ROL::BundleStep< Real >::compute(), ROL::Newton_U< Real >::compute(), ROL::NewtonKrylov_U< Real >::compute(), ROL::NonlinearCG_U< Real >::compute(), ROL::StochasticProblem< Real >::finalize(), ROL::ROL::ScalarController< Real, Key >::get(), ROL::ROL::VectorController< Real, Key >::get(), ROL::ROL::VectorController< Real, Key >::get(), ROL::SampledScalar< Real, Key >::get(), ROL::SampledVector< Real, Key >::get(), ROL::TypeB::GradientAlgorithm< Real >::initialize(), ROL::Bundle_AS< Real >::isNonnegative(), ROL::Sketch< Real >::LSsolver(), main(), ROL::Sketch< Real >::mgs2(), ROL::TrustRegionStep< Real >::printHeader(), ROL::SemismoothNewtonProjection< Real >::project_ssn(), ROL::Sketch< Real >::reconstruct(), ROL::ROL::VectorController< Real, Key >::reset(), ROL::ROL::VectorController< Real, std::vector< Real > >::reset(), ROL::SampledScalar< Real, Key >::reset(), ROL::SampledVector< Real, Key >::reset(), ROL::ConvexCombinationRiskMeasure< Real >::resetStorage(), ROL::RandVarFunctional< Real >::resetStorage(), ROL::SpectralRisk< Real >::resetStorage(), ROL::ConjugateGradients< Real >::run(), ROL::ConjugateResiduals< Real >::run(), ROL::details::MINRES< Real >::run(), ROL::GMRES< Real >::run(), ROL::ProgressiveHedging< Real >::run(), ROL::SemismoothNewtonProjection< Real >::solve_newton_system(), Constraint_SimOpt::update(), Constraint_SimOpt::update(), Objective_PoissonInversion< Real >::update(), QuadraticPenalty::update(), ROL::AlmostSureConstraint< Real >::update(), ROL::AugmentedLagrangian< Real >::update(), ROL::AugmentedLagrangian_SimOpt< Real >::update(), ROL::BlockOperator2Determinant< Real >::update(), ROL::BoundConstraint_Partitioned< Real >::update(), ROL::BoundConstraint_SimOpt< Real >::update(), ROL::BoundFletcher< Real >::update(), ROL::Bundle< Real >::update(), ROL::CompositeConstraint_SimOpt< Real >::update(), ROL::CompositeObjective< Real >::update(), ROL::CompositeObjective_SimOpt< Real >::update(), ROL::Constraint_Partitioned< Real >::update(), ROL::Constraint_TimeSimOpt< Real >::update(), ROL::Constraint_TimeSimOpt< Real >::update(), ROL::ConstraintFromObjective< Real >::update(), ROL::Fletcher< Real >::update(), ROL::InteriorPoint::PenalizedObjective< Real >::update(), ROL::InteriorPointPenalty< Real >::update(), ROL::LinearCombinationObjective< Real >::update(), ROL::LinearCombinationObjective_SimOpt< Real >::update(), ROL::LinearOperatorProduct< Real >::update(), ROL::LinearOperatorSum< Real >::update(), ROL::MeanValueConstraint< Real >::update(), ROL::MeanValueObjective< Real >::update(), ROL::MoreauYosidaPenalty< Real >::update(), ROL::Objective< Real >::update(), ROL::Objective_SimOpt< Real >::update(), ROL::Objective_TimeSimOpt< Real >::update(), ROL::ObjectiveFromConstraint< Real >::update(), ROL::ObjectiveMMA< Real >::update(), ROL::PH_bPOEObjective< Real >::update(), ROL::PH_DeviationObjective< Real >::update(), ROL::PH_ErrorObjective< Real >::update(), ROL::PH_Objective< Real >::update(), ROL::PH_ProbObjective< Real >::update(), ROL::PH_RegretObjective< Real >::update(), ROL::PH_RiskObjective< Real >::update(), ROL::PrimalDualInteriorPointBlock11< Real >::update(), ROL::PrimalDualInteriorPointResidual< Real >::update(), ROL::ProjectedObjective< Real >::update(), ROL::QuadraticPenalty_SimOpt< Real >::update(), ROL::Reduced_AugmentedLagrangian_SimOpt< Real >::update(), ROL::Reduced_Constraint_SimOpt< Real >::update(), ROL::Reduced_Objective_SimOpt< Real >::update(), ROL::ReducedDynamicObjective< Real >::update(), ROL::RiskBoundConstraint< Real >::update(), ROL::RiskLessConstraint< Real >::update(), ROL::RiskLessObjective< Real >::update(), ROL::RiskNeutralConstraint< Real >::update(), ROL::RiskNeutralObjective< Real >::update(), ROL::ROL::AffineTransformConstraint< Real >::update(), ROL::ROL::AffineTransformObjective< Real >::update(), ROL::ROL::NonlinearLeastSquaresObjective< Real >::update(), ROL::SampledScalar< Real, Key >::update(), ROL::SampledVector< Real, Key >::update(), ROL::SimulatedConstraint< Real >::update(), ROL::SimulatedObjective< Real >::update(), ROL::SimulatedObjectiveCVaR< Real >::update(), ROL::SlacklessConstraint< Real >::update(), ROL::SlacklessObjective< Real >::update(), ROL::StdConstraint< Real >::update(), ROL::StdLinearOperator< Real >::update(), ROL::StdObjective< Real >::update(), ROL::StochasticConstraint< Real >::update(), ROL::StochasticObjective< Real >::update(), ROL::update(), ROL::CompositeConstraint_SimOpt< Real >::update_1(), ROL::CompositeConstraint_SimOpt< Real >::update_2(), ROL::ReducedDynamicObjective< Real >::updateSketch(), ROL::TypeB::ColemanLiAlgorithm< Real >::writeHeader(), ROL::TypeB::KelleySachsAlgorithm< Real >::writeHeader(), ROL::TypeB::LinMoreAlgorithm< Real >::writeHeader(), ROL::TypeB::NewtonKrylovAlgorithm< Real >::writeHeader(), ROL::TypeB::PrimalDualActiveSetAlgorithm< Real >::writeHeader(), and ROL::TypeB::TrustRegionSPGAlgorithm< Real >::writeHeader().

◆ iterateVec

ROL::Ptr<Vector<Real> > iterateVec

Definition at line 157 of file ROL_Types.hpp.

◆ lagmultVec

ROL::Ptr<Vector<Real> > lagmultVec

Definition at line 158 of file ROL_Types.hpp.

◆ minIterVec

ROL::Ptr<Vector<Real> > minIterVec

Definition at line 159 of file ROL_Types.hpp.

◆ statusFlag

EExitStatus statusFlag

◆ gradientVec

ROL::Ptr<Vector<Real> > gradientVec

Definition at line 204 of file ROL_Types.hpp.

Referenced by Step::initialize().

◆ descentVec

ROL::Ptr<Vector<Real> > descentVec

Definition at line 205 of file ROL_Types.hpp.

◆ constraintVec

ROL::Ptr<Vector<Real> > constraintVec

Definition at line 206 of file ROL_Types.hpp.

◆ searchSize

◆ SPiter

int SPiter

Definition at line 211 of file ROL_Types.hpp.

◆ SPflag

int SPflag

Definition at line 212 of file ROL_Types.hpp.