57 m_residualFun(residualFun),
74 m_ALresidualFun(ALresidualFun),
80 return m_ALresidualFun(x,m_L,result);
96 m_residualFun(u,result);
109 result.resize(u.rows());
110 m_residualFun(u,tmp);
116 Residual_t m_residualFun;
117 ALResidual_t m_ALresidualFun;
148template <
class T,
class Optimizer = gsGradientDescent<T>>
155 typedef typename Base::Residual_t Residual_t;
156 typedef typename Base::ALResidual_t ALResidual_t;
168 m_optimizer(&m_optProblem),
169 m_optProblem(Residual,m_L,
numDofs)
183 m_optimizer(&m_optProblem),
184 m_optProblem(ALResidual,m_L,
numDofs)
242 Optimizer m_optimizer;
247 using Base::m_DeltaU;
255 using Base::m_numIterations;
256 using Base::m_maxIterations;
266 using Base::m_options;
267 using Base::m_verbose;
273 using Base::m_headstart;
276 using Base::m_status;
283#ifndef GISMO_BUILD_LIB
284#include GISMO_HPP_HEADER(gsStaticOpt.hpp)
Creates a mapped object or data pointer to a const vector without copying data.
Definition gsAsMatrix.h:285
Creates a mapped object or data pointer to a vector without copying data.
Definition gsAsMatrix.h:239
A class representing a static optimization problem.
Definition gsStaticOpt.h:40
T evalObj(const gsAsConstVector< T > &u) const
Evaluates the objective function.
Definition gsStaticOpt.h:93
void gradObj_into(const gsAsConstVector< T > &u, gsAsVector< T > &result) const
Computes the gradient of the objective function.
Definition gsStaticOpt.h:106
gsOptProblemStatic(const typename gsStructuralAnalysisOps< T >::Residual_t &residualFun, const T &L, index_t numDesignVars)
Constructor for gsOptProblemStatic.
Definition gsStaticOpt.h:55
gsOptProblemStatic(const typename gsStructuralAnalysisOps< T >::ALResidual_t &ALresidualFun, const T &L, index_t numDesignVars)
Constructor for gsOptProblemStatic with arc-length residual function.
Definition gsStaticOpt.h:72
int m_numDesignVars
Number of design variables.
Definition gsOptProblem.h:171
gsMatrix< T > m_curDesign
Current design variables (and starting point )
Definition gsOptProblem.h:198
Class defining an optimization problem.
Definition gsOptProblem.h:25
int m_numConstraints
Number of constraints.
Definition gsOptProblem.h:174
int numDesignVars() const
Callback function is executed after every iteration. Returning false causes premature termination of ...
Definition gsOptProblem.h:119
gsVector< T > m_conUpperBounds
Upper bounds for the constraints.
Definition gsOptProblem.h:189
gsVector< T > m_conLowerBounds
Lower bounds for the constraints.
Definition gsOptProblem.h:186
gsVector< T > m_desLowerBounds
Lower bounds for the design variables.
Definition gsOptProblem.h:180
int m_numConJacNonZero
Number of nonzero entries in the Constraint Jacobian.
Definition gsOptProblem.h:177
std::vector< index_t > m_conJacRows
Constraint Jacobian non-zero entries rows.
Definition gsOptProblem.h:192
int m_numDesignVars
Number of design variables.
Definition gsOptProblem.h:171
std::vector< index_t > m_conJacCols
Constraint Jacobian non-zero entries columns.
Definition gsOptProblem.h:195
gsMatrix< T > m_curDesign
Current design variables (and starting point )
Definition gsOptProblem.h:198
gsVector< T > m_desUpperBounds
Upper bounds for the design variables.
Definition gsOptProblem.h:183
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
Base class for static solvers.
Definition gsStaticBase.h:38
virtual index_t numDofs()
Returns the number of DoFs of the system.
Definition gsStaticBase.h:132
Static solver using the Dynamic Relaxation method.
Definition gsStaticOpt.h:150
gsStaticOpt(const ALResidual_t &ALResidual, const index_t numDofs)
Constructor for gsStaticOpt with arc-length residual function.
Definition gsStaticOpt.h:181
void _init()
Initializes the method.
Definition gsStaticOpt.hpp:40
gsStaticOpt(const Residual_t &Residual, const index_t numDofs)
Constructor for gsStaticOpt.
Definition gsStaticOpt.h:166
void defaultOptions() override
See gsStaticBase.
Definition gsStaticOpt.hpp:34
void getOptions() override
See gsStaticBase.
Definition gsStaticOpt.hpp:55
gsStatus solve() override
gsStaticBase base functions
Definition gsStaticOpt.hpp:92
T indicator(const gsSparseMatrix< T > &, T)
Returns the stability indicator.
Definition gsStaticOpt.h:223
gsOptionList & optimizerOptions()
Returns the optimizer options.
Definition gsStaticOpt.h:197
gsVector< T > stabilityVec(const gsSparseMatrix< T > &, T)
Returns the stability vector.
Definition gsStaticOpt.h:229
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
#define GISMO_NO_IMPLEMENTATION
Definition gsDebug.h:129
Provides declaration of the gradient descent method.
Base class for static solvers.
The G+Smo namespace, containing all definitions for the library.
gsStatus
Definition gsStructuralAnalysisTypes.h:21
std::function< bool(gsVector< T > const &, const T, gsVector< T > &)> ALResidual_t
Arc-Length Residual, Fint-lambda*Fext.
Definition gsStructuralAnalysisTypes.h:70
std::function< bool(gsVector< T > const &, gsVector< T > &)> Residual_t
Residual, Fint-Fext.
Definition gsStructuralAnalysisTypes.h:68