WaveBEM: Unsteady Nonlinear Potential Flow Solver for Ship-Wave Interaction.
NewtonArgument Class Referenceabstract

Base class that needs to be inherited by any function that wants to use the newton solver class. More...

#include <newton_argument.h>

Inheritance diagram for NewtonArgument:
FreeSurface< dim > FreeSurface< 3 > RestartNonlinearProblemAlg RestartNonlinearProblemDiff

Public Member Functions

virtual unsigned int n_dofs () const =0
 Returns the number of degrees of freedom. More...
 
virtual void output_step (Vector< double > &solution, const unsigned int step_number)=0
 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)=0
 For dae problems, we need a residual function. More...
 
virtual int jacobian (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Jacobian vector product. More...
 
virtual int setup_jacobian_prec (const Vector< double > &src_yy)
 Setup Jacobian preconditioner (builds the Jacobian preconditioner matrix). More...
 
virtual int jacobian_prec (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Inverse Jacobian preconditioner vector product. More...
 
virtual int jacobian_prec_prod (Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src)
 Jacobian preconditioner vector product. More...
 
virtual ~NewtonArgument ()
 

Detailed Description

Base class that needs to be inherited by any function that wants to use the newton solver class.

Definition at line 12 of file newton_argument.h.

Constructor & Destructor Documentation

virtual NewtonArgument::~NewtonArgument ( )
inlinevirtual

Definition at line 51 of file newton_argument.h.

Member Function Documentation

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

Jacobian vector product.

Reimplemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

Definition at line 25 of file newton_argument.cc.

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

Inverse Jacobian preconditioner vector product.

Reimplemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

Definition at line 9 of file newton_argument.cc.

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

Jacobian preconditioner vector product.

Reimplemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

Definition at line 17 of file newton_argument.cc.

virtual unsigned int NewtonArgument::n_dofs ( ) const
pure virtual

Returns the number of degrees of freedom.

Pure virtual function.

Implemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

virtual void NewtonArgument::output_step ( Vector< double > &  solution,
const unsigned int  step_number 
)
pure 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.

Implemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

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

For dae problems, we need a residual function.

Implemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

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

Setup Jacobian preconditioner (builds the Jacobian preconditioner matrix).

Reimplemented in RestartNonlinearProblemDiff, FreeSurface< dim >, FreeSurface< 3 >, and RestartNonlinearProblemAlg.

Definition at line 3 of file newton_argument.cc.


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