pi-DoMUS: Parallel Deal.II MUltiphysics Solver
piDoMUS< dim, spacedim, LAC > Class Template Reference

#include <pidomus.h>

Inheritance diagram for piDoMUS< dim, spacedim, LAC >:

Public Member Functions

 piDoMUS (const std::string &name, const BaseInterface< dim, spacedim, LAC > &energy, const MPI_Comm &comm=MPI_COMM_WORLD)
 
virtual void declare_parameters (ParameterHandler &prm)
 
virtual void parse_parameters_call_back ()
 
void run ()
 
virtual shared_ptr< typename LAC::VectorTypecreate_new_vector () const
 
virtual unsigned int n_dofs () const
 Returns the number of degrees of freedom. More...
 
virtual void output_step (const double t, const typename LAC::VectorType &solution, const typename LAC::VectorType &solution_dot, const unsigned int step_number, const double h)
 This function is called at the end of each iteration step for the ode solver. More...
 
virtual bool solver_should_restart (const double t, const unsigned int step_number, const double h, typename LAC::VectorType &solution, typename LAC::VectorType &solution_dot)
 This function will check the behaviour of the solution. More...
 
virtual int residual (const double t, const typename LAC::VectorType &src_yy, const typename LAC::VectorType &src_yp, typename LAC::VectorType &dst)
 For dae problems, we need a residual function. More...
 
virtual int setup_jacobian (const double t, const typename LAC::VectorType &src_yy, const typename LAC::VectorType &src_yp, const typename LAC::VectorType &residual, const double alpha)
 Setup Jacobian system and preconditioner. More...
 
virtual int solve_jacobian_system (const double t, const typename LAC::VectorType &y, const typename LAC::VectorType &y_dot, const typename LAC::VectorType &residual, const double alpha, const typename LAC::VectorType &src, typename LAC::VectorType &dst) const
 Inverse of the Jacobian vector product. More...
 
virtual LAC::VectorTypedifferential_components () const
 And an identification of the differential components. More...
 
LAC::VectorTypeget_solution ()
 This function is used to get back the solution. More...
 
void update_functions_and_constraints (const double &t)
 set time to t for forcing terms and boundary conditions More...
 
void apply_dirichlet_bcs (const DoFHandler< dim, spacedim > &dof_handler, ConstraintMatrix &constraints) const
 Applies Dirichlet boundary conditions. More...
 
void apply_neumann_bcs (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &scratch, std::vector< double > &local_residual) const
 Applies Neumann boundary conditions. More...
 
void apply_forcing_terms (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &scratch, std::vector< double > &local_residual) const
 Applies CONSERVATIVE forcing terms. More...
 

Friends

template<int fdim, int fspacedim, typename fn_LAC >
void test (piDoMUS< fdim, fspacedim, fn_LAC > &)
 

Constructor & Destructor Documentation

template<int dim, int spacedim, typename LAC >
piDoMUS< dim, spacedim, LAC >::piDoMUS ( const std::string &  name,
const BaseInterface< dim, spacedim, LAC > &  energy,
const MPI_Comm &  comm = MPI_COMM_WORLD 
)

Member Function Documentation

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::apply_dirichlet_bcs ( const DoFHandler< dim, spacedim > &  dof_handler,
ConstraintMatrix constraints 
) const

Applies Dirichlet boundary conditions.

This function is used to applies Dirichlet boundary conditions. It takes as argument a DoF handler dof_handler and a constraint matrix constraints.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::apply_forcing_terms ( const typename DoFHandler< dim, spacedim >::active_cell_iterator cell,
FEValuesCache< dim, spacedim > &  scratch,
std::vector< double > &  local_residual 
) const

Applies CONSERVATIVE forcing terms.

This function applies the conservative forcing terms, which can be defined by expressions in the parameter file.

If the problem involves NON-conservative loads, they must be included in the residual formulation.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::apply_neumann_bcs ( const typename DoFHandler< dim, spacedim >::active_cell_iterator cell,
FEValuesCache< dim, spacedim > &  scratch,
std::vector< double > &  local_residual 
) const

Applies Neumann boundary conditions.

template<int dim, int spacedim, typename LAC >
shared_ptr< typename LAC::VectorType > piDoMUS< dim, spacedim, LAC >::create_new_vector ( ) const
virtual
template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::declare_parameters ( ParameterHandler prm)
virtual
template<int dim, int spacedim, typename LAC >
LAC::VectorType & piDoMUS< dim, spacedim, LAC >::differential_components ( ) const
virtual

And an identification of the differential components.

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

template<int dim, int spacedim, typename LAC >
LAC::VectorType & piDoMUS< dim, spacedim, LAC >::get_solution ( )

This function is used to get back the solution.

template<int dim, int spacedim, typename LAC >
unsigned int piDoMUS< dim, spacedim, LAC >::n_dofs ( ) const
virtual

Returns the number of degrees of freedom.

Pure virtual function.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::output_step ( const double  t,
const typename LAC::VectorType solution,
const typename LAC::VectorType solution_dot,
const unsigned int  step_number,
const double  h 
)
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.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::parse_parameters_call_back ( )
virtual
template<int dim, int spacedim, typename LAC >
int piDoMUS< dim, spacedim, LAC >::residual ( const double  t,
const typename LAC::VectorType src_yy,
const typename LAC::VectorType src_yp,
typename LAC::VectorType dst 
)
virtual

For dae problems, we need a residual function.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::run ( )
template<int dim, int spacedim, typename LAC >
int piDoMUS< dim, spacedim, LAC >::setup_jacobian ( const double  t,
const typename LAC::VectorType src_yy,
const typename LAC::VectorType src_yp,
const typename LAC::VectorType residual,
const double  alpha 
)
virtual

Setup Jacobian system and preconditioner.

template<int dim, int spacedim, typename LAC >
int piDoMUS< dim, spacedim, LAC >::solve_jacobian_system ( const double  t,
const typename LAC::VectorType y,
const typename LAC::VectorType y_dot,
const typename LAC::VectorType residual,
const double  alpha,
const typename LAC::VectorType src,
typename LAC::VectorType dst 
) const
virtual

Inverse of the Jacobian vector product.

template<int dim, int spacedim, typename LAC >
bool piDoMUS< dim, spacedim, LAC >::solver_should_restart ( const double  t,
const unsigned int  step_number,
const double  h,
typename LAC::VectorType solution,
typename LAC::VectorType solution_dot 
)
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.

template<int dim, int spacedim, typename LAC >
void piDoMUS< dim, spacedim, LAC >::update_functions_and_constraints ( const double &  t)

set time to t for forcing terms and boundary conditions

Friends And Related Function Documentation

template<int dim, int spacedim = dim, typename LAC = LATrilinos>
template<int fdim, int fspacedim, typename fn_LAC >
void test ( piDoMUS< fdim, fspacedim, fn_LAC > &  )
friend

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