28 #include "libmesh/linear_solver.h" 29 #include "libmesh/dof_map.h" 55 std::unique_ptr<libMesh::NumericVector<Real>>
56 dX(system.solution->clone().release());
60 dX->add(-1., *system.solution);
69 std::pow(
_X_scale, 2) * std::pow(dX->l2_norm(), 2));
84 std::unique_ptr<libMesh::NumericVector<Real>>
85 f(X.zero_clone().release()),
86 dgdX(X.zero_clone().release()),
87 dfdp(X.zero_clone().release()),
88 dXdp(X.zero_clone().release()),
89 dX(X.zero_clone().release());
91 libMesh::SparseMatrix<Real>
99 _g(X, p, *dfdp, *dXdp, g, dgdp, dgdX.get());
125 _dXdp(
const libMesh::NumericVector<Real> &X,
127 libMesh::NumericVector<Real> &dfdp,
128 libMesh::NumericVector<Real> &dXdp) {
143 libMesh::SparseMatrix<Real>
144 *pc = system.request_matrix(
"Preconditioner");
146 std::pair<unsigned int, Real>
155 solver_params.second,
156 solver_params.first);
162 #ifdef LIBMESH_ENABLE_CONSTRAINTS 163 system.get_dof_map().enforce_constraints_exactly (system,
179 std::unique_ptr<libMesh::NumericVector<Real>>
180 dfdp(X.zero_clone().release()),
181 dXdp(X.zero_clone().release());
187 _g(X, p, *dfdp, *dXdp, g, dgdp,
nullptr);
196 libMesh::NumericVector<Real> &dfdp,
197 libMesh::NumericVector<Real> &dXdp,
200 libMesh::NumericVector<Real> *dgdX) {
205 _dXdp(X, p, dfdp, dXdp);
211 std::unique_ptr<libMesh::NumericVector<Real>>
212 dX(X.clone().release());
ArclengthContinuationSolver()
This class implements a system for solution of nonlinear systems.
virtual void clear_elem_operation_object()
clears the association of this object with the assembly element operation object. ...
virtual bool sensitivity_assemble(const MAST::FunctionBase &f, libMesh::NumericVector< Real > &sensitivity_rhs)
Assembly function.
virtual void _solve_NR_iterate(libMesh::NumericVector< Real > &X, MAST::Parameter &p)
This is a scalar function whose value can be changed and one that can be used as a design variable in...
virtual void set_elem_operation_object(MAST::AssemblyElemOperations &elem_ops)
attaches a element operation to this object, and associated this with the element operation object...
void _solve_schur_factorization(const libMesh::NumericVector< Real > &X, const MAST::Parameter &p, libMesh::SparseMatrix< Real > &jac, bool update_jac, libMesh::NumericVector< Real > &f, bool update_f, libMesh::NumericVector< Real > &dfdp, bool update_dfdp, libMesh::NumericVector< Real > &dXdp, bool update_dXdp, const libMesh::NumericVector< Real > &dgdX, const Real dgdp, const Real g, libMesh::NumericVector< Real > &dX, Real &dp)
solves for the linear system of equation using Schur factorization.
virtual ~ArclengthContinuationSolver()
void _solve(const libMesh::NumericVector< Real > &X, const MAST::Parameter &p, libMesh::NumericVector< Real > &f, bool update_f, libMesh::NumericVector< Real > &dfdp, bool update_dfdp, const libMesh::NumericVector< Real > &dgdX, const Real dgdp, const Real g, libMesh::NumericVector< Real > &dX, Real &dp)
solves for the linear system of equation as a monolithic system dX and dp are returned from the solu...
the equation set is: the N-R updates are calculated such that This equation is solved using Schur-f...
virtual std::pair< unsigned int, Real > get_linear_solve_parameters()
calls NonlinearImplicitSystem::set_solver_parameters() before accessing the values.
Real arc_length
arc length that the solver is required to satisfy for the update.
MAST::AssemblyBase * _assembly
std::unique_ptr< libMesh::NumericVector< Real > > _X0
void set_operation(MAST::NonlinearSystem::Operation op)
sets the current operation of the system
std::unique_ptr< libMesh::LinearSolver< Real > > linear_solver
The LinearSolver for solution of the linear equations.
virtual Real _g(const libMesh::NumericVector< Real > &X, const MAST::Parameter &p)
MAST::NonlinearSystem::Operation operation()
MAST::AssemblyElemOperations * _elem_ops
const MAST::NonlinearSystem & system() const
virtual void initialize(Real dp)
sets the arc length using a nonlinear solution using a step dp.
bool schur_factorization
flag to use Schur-factorizaiton (default) or monolithic solver
virtual void _dXdp(const libMesh::NumericVector< Real > &X, const MAST::Parameter &p, libMesh::NumericVector< Real > &dfdp, libMesh::NumericVector< Real > &dXdp)
virtual void solve(MAST::AssemblyElemOperations &elem_ops, MAST::AssemblyBase &assembly)
solves the nonlinear problem with the specified assembly operation object