Page MenuHomec4science

transport_stagger_base.hpp
No OneTemporary

File Metadata

Created
Sat, May 11, 18:50

transport_stagger_base.hpp

#ifndef SPECMICP_REACTMICP_SOLVER_TRANSPORTSTAGGERBASE_HPP
#define SPECMICP_REACTMICP_SOLVER_TRANSPORTSTAGGERBASE_HPP
//! \file transport_stagger_base.hpp The base class for the transport stagger
// following file include main data types and forward declaration needed for a stagger
#include "decl.inl"
namespace specmicp {
namespace reactmicp {
namespace solver {
//! \brief The base class for a transport stagger
//!
class TransportStaggerBase
{
public:
virtual ~TransportStaggerBase() {}
//! \brief Initialize the stagger at the beginning of the computation
//!
//! \param var shared_ptr to the variables
virtual void initialize(VariablesBasePtr var) {}
//! \brief Initialize the stagger at the beginning of an iteration
//!
//! This is where the first residual may be computed, the predictor saved, ...
//! \param dt the duration of the timestep
//! \param var shared_ptr to the variables
virtual void initialize_timestep(scalar_t dt, VariablesBasePtr var) = 0;
//! \brief Solve the equation for the timetep
//!
//! \param var shared_ptr to the variables
virtual StaggerReturnCode restart_timestep(VariablesBasePtr var) = 0;
//! \brief Compute the residuals norm
//!
//! \param var shared_ptr to the variables
virtual scalar_t get_residual(VariablesBasePtr var) = 0;
//! \brief Compute the residuals norm
//!
//! \param var shared_ptr to the variables
virtual scalar_t get_residual_0(VariablesBasePtr var) = 0;
//! \brief Obtain the norm of the step size
//!
//! This is used to check if the algorithm has reach a stationary points.
//! It should look like : return main_variables.norm()
//!
//! \param var shared_ptr to the variables
virtual scalar_t get_update(VariablesBasePtr var) = 0;
};
} // end namespace solver
} // end namespace reactmicp
} // end namespace specmicp
#endif // SPECMICP_REACTMICP_SOLVER_TRANSPORTSTAGGERBASE_HPP

Event Timeline