17 #ifdef gsHLBFGS_ENABLED
18 #include <gsHLBFGS/gsHLBFGS.h>
21 #ifdef gsIpOpt_ENABLED
33 Base::defaultOptions();
46 gsInfo<<std::setw(4)<<std::left<<
"It.";
47 gsInfo<<std::setw(17)<<std::left<<
"|R|";
48 gsInfo<<std::setw(17)<<std::left<<
"|R|/|R0|";
49 gsInfo<<std::setw(17)<<std::left<<
" Ek";
50 gsInfo<<std::setw(17)<<std::left<<
" Ek/Ek0";
51 gsInfo<<std::setw(17)<<std::left<<
"|dU|";
52 gsInfo<<std::setw(17)<<std::left<<
"|dU|/|DU|";
53 gsInfo<<std::setw(17)<<std::left<<
"|dU|/|U+DU|";
54 gsInfo<<std::setw(17)<<std::left<<
"|dV|";
62 gsInfo<<std::setw(4)<<std::left<<k;
63 gsInfo<<std::setw(17)<<std::left<<m_residual;
64 gsInfo<<std::setw(17)<<std::left<<m_residual/m_residualIni;
65 gsInfo<<std::setw(17)<<std::left<<m_Ek;
66 gsInfo<<std::setw(17)<<std::left<<m_Ek/m_Ek0;
67 gsInfo<<std::setw(17)<<std::left<<m_deltaU.norm();
68 gsInfo<<std::setw(17)<<std::left<<m_deltaU.norm()/m_DeltaU.norm();
69 gsInfo<<std::setw(17)<<std::left<<m_deltaU.norm()/(m_U+m_DeltaU).norm();
70 gsInfo<<std::setw(17)<<std::left<<m_v.norm();
86 else if (errorCode==2)
88 else if (errorCode==3)
104 m_Eks.reserve(m_maxIterations);
106 if (m_verbose) initOutput();
111 m_Eks.push_back(m_Ek);
113 if (m_verbose != 0) stepOutput(0);
115 for (m_numIterations=1; m_numIterations!=m_maxIterations; m_numIterations++, resetIt++)
118 if ((m_c==0 && m_Ek_prev > m_Ek) || resetIt==m_resetIterations)
125 if (m_numIterations % m_verbose == 0 || m_verbose==-1 ) stepOutput(m_numIterations);
127 m_Eks.push_back(m_Ek);
129 m_residualOld = m_residual;
131 if (m_residual/m_residualIni < m_tolF && m_Ek/m_Ek0 < m_tolE && m_deltaU.norm()/m_DeltaU.norm() < m_tolU)
135 gsDebug <<
"\t |R|/|R0| = "<<m_residual/m_residualIni<<
" < tolF = "<<m_tolF<<
"\n";
136 gsDebug <<
"\t |E|/|E0| = "<<m_Ek/m_Ek0 <<
" < tolE = "<<m_tolE<<
"\n";
137 gsDebug <<
"\t |U|/|U0| = "<<m_deltaU.norm()/m_DeltaU.norm()<<
" < tolF = "<<m_tolU<<
"\n";
140 if (m_numIterations==m_maxIterations-1)
143 gsInfo<<
"Maximum iterations reached. Solution did not converge\n";
175 if (!m_residualFun(U, resVec))
181 gsOptProblemStatic<T>::gsOptProblemStatic()
187 m_numConstraints = 0;
189 m_numConJacNonZero = 0;
191 m_desLowerBounds.resize(m_numDesignVars);
192 m_desUpperBounds.resize(m_numDesignVars);
194 m_desLowerBounds.setConstant(-1e19);
195 m_desUpperBounds.setConstant( 1e19);
198 m_curDesign.resize(m_numDesignVars,1);
199 m_curDesign.setZero();
void _init()
Initializes the method.
Definition: gsStaticOpt.hpp:165
#define gsDebug
Definition: gsDebug.h:61
void initOutput() override
See gsStaticBase.
Definition: gsStaticOpt.hpp:43
void reset() override
See gsStaticBase.
Definition: gsStaticOpt.hpp:158
Provides declaration of an optimization problem.
Assembly problem in step.
Assembly failed due to an error in the expression (e.g. overflow)
#define index_t
Definition: gsConfig.h:32
gsStatus
Definition: gsStructuralAnalysisTypes.h:20
Provides declaration of an optimization problem.
void getOptions() override
See gsStaticBase.
Definition: gsStaticOpt.hpp:37
void _solve()
See solve()
Definition: gsStaticOpt.hpp:101
Static solver using the Dynamic Relaxation method.
Definition: gsStaticOpt.h:27
void defaultOptions() override
See gsStaticBase.
Definition: gsStaticOpt.hpp:31
#define gsInfo
Definition: gsDebug.h:43
void initialize() override
See gsStaticBase.
Definition: gsStaticOpt.hpp:151
Provides declaration of the gradient descent method.
gsStatus solve() override
gsStaticBase base functions
Definition: gsStaticOpt.hpp:75
void stepOutput(index_t k) override
See gsStaticBase.
Definition: gsStaticOpt.hpp:59