28 #include "libmesh/numeric_vector.h" 29 #include "libmesh/equation_systems.h" 30 #include "libmesh/sparse_matrix.h" 31 #include "libmesh/eigen_solver.h" 32 #include "libmesh/dof_map.h" 36 const std::string& name,
37 const unsigned int number):
137 START_LOG(
"solve()",
"StructuralSystem");
142 if_converged =
false;
147 std::unique_ptr<libMesh::NumericVector<Real> >
148 x_old (this->solution->zero_clone().release()),
149 delta_x0 (this->solution->zero_clone().release()),
150 dx (this->solution->zero_clone().release()),
151 dx_residual (this->solution->zero_clone().release()),
152 dx_load (this->solution->zero_clone().release());
155 *x_old = *(this->solution);
167 while (!if_converged) {
185 *dx = *(this->solution);
186 dx->add(-1., *x_old);
187 dx->add(-1., *delta_x0);
190 this->solution->swap(*dx_residual);
195 *dx_load = this->get_sensitivity_solution();
201 a0 = dx_load->dot(*dx_load);
202 a1 = 2.*(delta_x0->dot(*dx_load) + dx_residual->dot(*dx_load));
206 a2 = (delta_x0->dot(*delta_x0) +
207 2.*delta_x0->dot(*dx_residual) +
208 dx_residual->dot(*dx_residual) -
_dl*
_dl);
214 dp1 = (-a1 + sqrt(v1))/(2.*a0);
215 dp2 = (-a1 - sqrt(v1))/(2.*a0);
228 (*_load_param)() += dp;
232 dx->add(dp, *dx_load);
234 this->solution->add(1., *dx);
237 if (dx->l2_norm() <= 1.e-6 ||
246 STOP_LOG(
"solve()",
"StructuralSystem");
virtual void sensitivity_solve(MAST::AssemblyElemOperations &elem_ops, MAST::AssemblyBase &assembly, const MAST::FunctionBase &p, bool if_assemble_jacobian=true)
Solves the sensitivity problem for the provided parameter.
virtual ~StructuralSystem()
void set_load_parameter(MAST::Parameter ¶m, Real min_p, Real max_p)
sets the laod parameter for incrementing
Real _dl
value of update length
This class implements a system for solution of nonlinear systems.
MAST::Parameter * _load_param
load parameter that is updated by this solution procedure
virtual void clear() libmesh_override
Clear all the data structures associated with the system.
This is a scalar function whose value can be changed and one that can be used as a design variable in...
virtual void clear() libmesh_override
Clear all the data structures associated with the system.
Real _beta
value of beta that scales the external load vector in the constrain
StructuralSystem(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
Default constructor.
Real _min_p
maximum and minimum values of the parameter
virtual void solve(MAST::AssemblyElemOperations &elem_ops, MAST::AssemblyBase &assembly) libmesh_override
Assembles & solves the nonlinear system R(x) = 0.
virtual void solve(MAST::AssemblyElemOperations &elem_ops, MAST::AssemblyBase &assembly)
solves the nonlinear problem with the specified assembly operation object