6 #ifndef restart_nonlinear_problem_alg_h
7 #define restart_nonlinear_problem_alg_h
25 free_surface(free_surface),
28 free_surf_y(free_surf_y),
29 free_surf_y_dot(free_surf_y_dot),
30 free_surf_jacobian(free_surf_jacobian)
37 for (
unsigned int i=0; i<comp_dom.
dh.
n_dofs(); ++i)
58 unsigned int count = 0;
105 virtual unsigned int n_dofs()
const;
108 const unsigned int step_number);
SparseMatrix< double > jacobian_matrix
const NumericalTowingTank & comp_dom
DoFHandler< dim-1, dim > vector_dh
Vector< double > & free_surf_y
virtual void output_step(Vector< double > &solution, const unsigned int step_number)
This function is called at the end of each iteration step for the newton solver.
virtual void reinit(const SparsityPattern &sparsity)
virtual unsigned int n_dofs() const
Returns the number of degrees of freedom.
virtual int setup_jacobian_prec(const Vector< double > &src_yy)
Setup Jacobian preconditioner for Newton.
SparsityPattern jacobian_sparsity_pattern
void add(const size_type i, const size_type j)
std::vector< GeometryFlags > flags
types::global_dof_index n_dofs() const
Vector< double > free_surf_jac_x_delta
virtual int jacobian_prec_prod(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian preconditioner vector product for newton solver.
void reinit(const size_type m, const size_type n, const unsigned int max_per_row)
RestartNonlinearProblemAlg(FreeSurface< 3 > &free_surface, const NumericalTowingTank &comp_dom, const double &time, Vector< double > &free_surf_y, Vector< double > &free_surf_y_dot, const SparseMatrix< double > &free_surf_jacobian)
Base class that needs to be inherited by any function that wants to use the newton solver class...
const SparsityPattern & get_sparsity_pattern() const
virtual int residual(Vector< double > &dst, const Vector< double > &src_yy)
For newton solver, we need a residual function.
std::set< unsigned int > dphi_dn_indices
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
FreeSurface< 3 > & free_surface
virtual int jacobian_prec(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian inverse preconditioner vector product for newton solver.
Vector< double > & free_surf_y_dot
const SparseMatrix< double > & free_surf_jacobian
DoFHandler< dim-1, dim > dh
virtual int jacobian(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian vector product for newton solver.
Vector< double > free_surf_res
std::map< unsigned int, unsigned int > indices_map