6 #ifndef restart_nonlinear_problem_diff_h
7 #define restart_nonlinear_problem_diff_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_dot(free_surf_jacobian_dot)
42 for (
unsigned int i=0; i<comp_dom.
dh.
n_dofs(); ++i)
59 for (
unsigned int k=3; k<7; ++k)
66 for (
unsigned int i=0; i<comp_dom.
dh.
n_dofs(); ++i)
80 for (
unsigned int i=0; i<comp_dom.
dh.
n_dofs(); ++i)
98 for (
unsigned int d=0; d<13; ++d)
108 unsigned int count = 0;
168 line_lengths[i] = 40;
242 virtual unsigned int n_dofs()
const;
245 const unsigned int step_number);
virtual int setup_jacobian_prec(const Vector< double > &src_yy)
Setup Jacobian preconditioner for Newton.
std::set< unsigned int > rigid_modes_indices
SparseMatrix< double > jacobian_matrix
ConstraintMatrix vector_constraints
DoFHandler< dim-1, dim > vector_dh
bool is_constrained(const size_type index) const
virtual int jacobian_prec(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian inverse preconditioner vector product for newton solver.
virtual int jacobian_prec_prod(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian preconditioner vector product for newton solver.
std::set< unsigned int > bow_stern_indices
virtual int residual(Vector< double > &dst, const Vector< double > &src_yy)
For newton solver, we need a residual function.
std::set< unsigned int > water_indices
virtual void reinit(const SparsityPattern &sparsity)
std::set< unsigned int > water_line_indices
std::vector< unsigned int > moving_point_ids
virtual unsigned int n_dofs() const
Returns the number of degrees of freedom.
SparsityPattern jacobian_sparsity_pattern
const NumericalTowingTank & comp_dom
Vector< double > & free_surf_y
void add(const size_type i, const size_type j)
std::vector< GeometryFlags > flags
Vector< double > free_surf_res
types::global_dof_index n_dofs() const
std::map< unsigned int, unsigned int > indices_map
std::vector< GeometryFlags > vector_flags
const SparseMatrix< double > & free_surf_jacobian_dot
void reinit(const size_type m, const size_type n, const unsigned int max_per_row)
RestartNonlinearProblemDiff(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_dot)
Base class that needs to be inherited by any function that wants to use the newton solver class...
FreeSurface< 3 > & free_surface
const SparsityPattern & get_sparsity_pattern() const
virtual int jacobian(Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
Jacobian vector product for newton solver.
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
std::set< unsigned int > phi_indices
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.
Vector< double > free_surf_jac_x_delta
Vector< double > & free_surf_y_dot
Vector< double > edges_tangents
DoFHandler< dim-1, dim > dh