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

Base class that needs to be inherited by any function that wants to use the time integrator class. More...

#include <ode_argument.h>

Inheritance diagram for OdeArgument:
FreeSurface< dim > FreeSurface< 3 >

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, Vector< double > &solution_dot, const double t, const unsigned int step_number, const double h)=0
 This function is called at the end of each iteration step for the ode solver. More...
 
virtual bool solution_check (Vector< double > &solution, Vector< double > &solution_dot, const double t, const unsigned int step_number, const double h)=0
 This function will check the behaviour of the solution. More...
 
virtual int residual (const double t, Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src_yp)=0
 For dae problems, we need a residual function. More...
 
virtual int jacobian (const double t, Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src_yp, const Vector< double > &src, const double alpha)
 Jacobian vector product. More...
 
virtual int setup_jacobian_prec (const double t, const Vector< double > &src_yy, const Vector< double > &src_yp, const double alpha)
 Setup Jacobian preconditioner. More...
 
virtual int jacobian_prec (const double t, Vector< double > &dst, const Vector< double > &src_yy, const Vector< double > &src_yp, const Vector< double > &src, const double alpha)
 Jacobian preconditioner vector product. More...
 
virtual Vector< double > & differential_components ()
 And an identification of the differential components. More...
 
virtual Vector< double > & get_diameters ()
 
virtual ~OdeArgument ()
 

Public Attributes

bool reset_time_integrator
 
bool stop_time_integrator
 

Detailed Description

Base class that needs to be inherited by any function that wants to use the time integrator class.

Definition at line 12 of file ode_argument.h.

Constructor & Destructor Documentation

virtual OdeArgument::~OdeArgument ( )
inlinevirtual

Definition at line 79 of file ode_argument.h.

Member Function Documentation

Vector< double > & OdeArgument::differential_components ( )
virtual

And an identification of the differential components.

This has to be 1 if the corresponding variable is a differential component, zero otherwise.

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

Definition at line 34 of file ode_argument.cc.

Vector< double > & OdeArgument::get_diameters ( )
virtual

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

Definition at line 42 of file ode_argument.cc.

int OdeArgument::jacobian ( const double  t,
Vector< double > &  dst,
const Vector< double > &  src_yy,
const Vector< double > &  src_yp,
const Vector< double > &  src,
const double  alpha 
)
virtual

Jacobian vector product.

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

Definition at line 22 of file ode_argument.cc.

int OdeArgument::jacobian_prec ( const double  t,
Vector< double > &  dst,
const Vector< double > &  src_yy,
const Vector< double > &  src_yp,
const Vector< double > &  src,
const double  alpha 
)
virtual

Jacobian preconditioner vector product.

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

Definition at line 12 of file ode_argument.cc.

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

Returns the number of degrees of freedom.

Pure virtual function.

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

virtual void OdeArgument::output_step ( Vector< double > &  solution,
Vector< double > &  solution_dot,
const double  t,
const unsigned int  step_number,
const double  h 
)
pure virtual

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

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

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

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

For dae problems, we need a residual function.

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

int OdeArgument::setup_jacobian_prec ( const double  t,
const Vector< double > &  src_yy,
const Vector< double > &  src_yp,
const double  alpha 
)
virtual

Setup Jacobian preconditioner.

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

Definition at line 3 of file ode_argument.cc.

virtual bool OdeArgument::solution_check ( Vector< double > &  solution,
Vector< double > &  solution_dot,
const double  t,
const unsigned int  step_number,
const double  h 
)
pure virtual

This function will check the behaviour of the solution.

If it is converged or if it is becoming unstable the time integrator will be stopped. If the convergence is not achived the calculation will be continued. If necessary, it can also reset the time stepper.

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

Member Data Documentation

bool OdeArgument::reset_time_integrator

Definition at line 79 of file ode_argument.h.

bool OdeArgument::stop_time_integrator

Definition at line 83 of file ode_argument.h.


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