38 typedef std::function < bool ( gsVector<T>
const &,
gsSparseMatrix<T> & ) > Jacobian_t;
53 Jacobian_t &nonlinear,
56 m_nonlinear(nonlinear),
62 return m_nonlinear(x,m);
67 m_status = this->initializeMatrix();
80 dJacobian_t &dnonlinear,
83 m_dnonlinear(dnonlinear),
90 m_status = this->initializeMatrix();
118 if (m_options.
getInt(
"solver") != 3 )
119 gsWarn<<
"It is highly recommended to use the Buckling solver (option 4)\n";
121 return Base::computeSparse(number);
129 bool verbose = m_options.
getSwitch(
"verbose");
130 if (verbose) {
gsInfo<<
"Computing matrices" ; }
132 if (verbose) {
gsInfo<<
"." ; }
133 m_solVec =
m_solver->solve(m_scaling*m_rhs);
134 if (verbose) {
gsInfo<<
"." ; }
137 m_dnonlinear(m_solVec,gsVector<T>::Zero(m_solVec.rows()),m_B);
145 if (verbose) {
gsInfo<<
"." ; }
146 if (verbose) {
gsInfo<<
"Finished\n" ; }
154 const gsVector<T> m_rhs;
155 const Jacobian_t m_nonlinear;
156 dJacobian_t m_dnonlinear;
165 using Base::m_options;
167 using Base::m_status;
Base class for buckling and modal analyses.
Base class for buckling and modal analyses.
Definition: gsEigenProblemBase.h:37
Performs linear buckling analysis given a matrix or functions of a matrix.
Definition: gsBucklingSolver.h:32
gsBucklingSolver(gsSparseMatrix< T > &linear, gsVector< T > &rhs, Jacobian_t &nonlinear, T scaling=1.0)
Constructor.
Definition: gsBucklingSolver.h:51
gsBucklingSolver(gsSparseMatrix< T > &linear, gsSparseMatrix< T > &nonlinear)
Constructor.
Definition: gsBucklingSolver.h:100
Assembly failed due to an error in the expression (e.g. overflow)
#define index_t
Definition: gsConfig.h:32
gsStatus
Definition: gsStructuralAnalysisTypes.h:20
const index_t & getInt(const std::string &label) const
Reads value for option label from options.
Definition: gsOptionList.cpp:37
gsSparseSolver< T >::uPtr m_solver
Linear solver employed.
Definition: gsBucklingSolver.h:162
#define gsWarn
Definition: gsDebug.h:50
gsBucklingSolver(gsSparseMatrix< T > &linear, gsVector< T > &rhs, dJacobian_t &dnonlinear, T scaling=1.0)
Constructor.
Definition: gsBucklingSolver.h:78
bool getSwitch(const std::string &label) const
Reads value for option label from options.
Definition: gsOptionList.cpp:51
Utility class which holds I/O XML data to read/write to/from files.
#define gsInfo
Definition: gsDebug.h:43
Abstract class for solvers. The solver interface is base on 3 methods: -compute set the system matrix...
Definition: gsSparseSolver.h:66
Utility class which holds I/O XML data to read/write to/from files.