WaveBEM: Unsteady Nonlinear Potential Flow Solver for Ship-Wave Interaction.
RestartNonlinearProblemDiff Class Reference

#include <restart_nonlinear_problem_diff.h>

Inheritance diagram for RestartNonlinearProblemDiff:
NewtonArgument

Public Member Functions

 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)
 
virtual unsigned int n_dofs () const
 Returns the number of degrees of freedom. More...
 
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. More...
 
virtual int residual (Vector< double > &dst, const Vector< double > &src_yy)
 For newton solver, we need a residual function. More...
 
virtual int jacobian (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Jacobian vector product for newton solver. More...
 
virtual int setup_jacobian_prec (const Vector< double > &src_yy)
 Setup Jacobian preconditioner for Newton. More...
 
virtual int jacobian_prec (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Jacobian inverse preconditioner vector product for newton solver. More...
 
virtual int jacobian_prec_prod (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Jacobian preconditioner vector product for newton solver. More...
 
- Public Member Functions inherited from NewtonArgument
virtual ~NewtonArgument ()
 

Public Attributes

std::map< unsigned int, unsigned int > indices_map
 

Private Attributes

FreeSurface< 3 > & free_surface
 
const NumericalTowingTankcomp_dom
 
const double & time
 
Vector< double > & free_surf_y
 
Vector< double > & free_surf_y_dot
 
const SparseMatrix< double > & free_surf_jacobian_dot
 
Vector< double > free_surf_jac_x_delta
 
Vector< double > free_surf_res
 
std::set< unsigned int > water_line_indices
 
std::set< unsigned int > bow_stern_indices
 
std::set< unsigned int > water_indices
 
std::set< unsigned int > phi_indices
 
std::set< unsigned int > rigid_modes_indices
 
SparsityPattern jacobian_sparsity_pattern
 
SparseMatrix< double > jacobian_matrix
 

Detailed Description

Definition at line 15 of file restart_nonlinear_problem_diff.h.

Constructor & Destructor Documentation

RestartNonlinearProblemDiff::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 
)
inline

Definition at line 19 of file restart_nonlinear_problem_diff.h.

Member Function Documentation

int RestartNonlinearProblemDiff::jacobian ( Vector< double > &  dst,
const Vector< double > &  src_yy,
const Vector< double > &  src 
)
virtual

Jacobian vector product for newton solver.

Reimplemented from NewtonArgument.

Definition at line 91 of file restart_nonlinear_problem_diff.cc.

int RestartNonlinearProblemDiff::jacobian_prec ( Vector< double > &  dst,
const Vector< double > &  src_yy,
const Vector< double > &  src 
)
virtual

Jacobian inverse preconditioner vector product for newton solver.

Inverse preconditioner vector product for newton solver.

Reimplemented from NewtonArgument.

Definition at line 193 of file restart_nonlinear_problem_diff.cc.

int RestartNonlinearProblemDiff::jacobian_prec_prod ( Vector< double > &  dst,
const Vector< double > &  src_yy,
const Vector< double > &  src 
)
virtual

Jacobian preconditioner vector product for newton solver.

Preconditioner vector product for newton solver.

Reimplemented from NewtonArgument.

Definition at line 206 of file restart_nonlinear_problem_diff.cc.

unsigned int RestartNonlinearProblemDiff::n_dofs ( ) const
virtual

Returns the number of degrees of freedom.

Pure virtual function.

Implements NewtonArgument.

Definition at line 3 of file restart_nonlinear_problem_diff.cc.

void RestartNonlinearProblemDiff::output_step ( Vector< double > &  solution,
const unsigned int  step_number 
)
virtual

This function is called at the end of each iteration step for the newton solver.

Once again, the conversion between pointers and other forms of vectors need to be done inside the inheriting class.

Implements NewtonArgument.

Definition at line 11 of file restart_nonlinear_problem_diff.cc.

int RestartNonlinearProblemDiff::residual ( Vector< double > &  dst,
const Vector< double > &  src_yy 
)
virtual

For newton solver, we need a residual function.

This one is computed with sacado to allow computations of derivatives for jacobian

Implements NewtonArgument.

Definition at line 20 of file restart_nonlinear_problem_diff.cc.

int RestartNonlinearProblemDiff::setup_jacobian_prec ( const Vector< double > &  src_yy)
virtual

Setup Jacobian preconditioner for Newton.

Preconditioner is the jacobian itself, so this matrix has nothing to do.

Reimplemented from NewtonArgument.

Definition at line 216 of file restart_nonlinear_problem_diff.cc.

Member Data Documentation

std::set<unsigned int> RestartNonlinearProblemDiff::bow_stern_indices
private

Definition at line 285 of file restart_nonlinear_problem_diff.h.

const NumericalTowingTank& RestartNonlinearProblemDiff::comp_dom
private

Definition at line 276 of file restart_nonlinear_problem_diff.h.

Vector<double> RestartNonlinearProblemDiff::free_surf_jac_x_delta
private

Definition at line 282 of file restart_nonlinear_problem_diff.h.

const SparseMatrix<double>& RestartNonlinearProblemDiff::free_surf_jacobian_dot
private

Definition at line 280 of file restart_nonlinear_problem_diff.h.

Vector<double> RestartNonlinearProblemDiff::free_surf_res
private

Definition at line 283 of file restart_nonlinear_problem_diff.h.

Vector<double>& RestartNonlinearProblemDiff::free_surf_y
private

Definition at line 278 of file restart_nonlinear_problem_diff.h.

Vector<double>& RestartNonlinearProblemDiff::free_surf_y_dot
private

Definition at line 279 of file restart_nonlinear_problem_diff.h.

FreeSurface<3>& RestartNonlinearProblemDiff::free_surface
private

Definition at line 275 of file restart_nonlinear_problem_diff.h.

std::map<unsigned int,unsigned int> RestartNonlinearProblemDiff::indices_map

Definition at line 293 of file restart_nonlinear_problem_diff.h.

SparseMatrix<double> RestartNonlinearProblemDiff::jacobian_matrix
private

Definition at line 290 of file restart_nonlinear_problem_diff.h.

SparsityPattern RestartNonlinearProblemDiff::jacobian_sparsity_pattern
private

Definition at line 289 of file restart_nonlinear_problem_diff.h.

std::set<unsigned int> RestartNonlinearProblemDiff::phi_indices
private

Definition at line 287 of file restart_nonlinear_problem_diff.h.

std::set<unsigned int> RestartNonlinearProblemDiff::rigid_modes_indices
private

Definition at line 288 of file restart_nonlinear_problem_diff.h.

const double& RestartNonlinearProblemDiff::time
private

Definition at line 277 of file restart_nonlinear_problem_diff.h.

std::set<unsigned int> RestartNonlinearProblemDiff::water_indices
private

Definition at line 286 of file restart_nonlinear_problem_diff.h.

std::set<unsigned int> RestartNonlinearProblemDiff::water_line_indices
private

Definition at line 284 of file restart_nonlinear_problem_diff.h.


The documentation for this class was generated from the following files: