Page MenuHomec4science

dfpm_program.hpp
No OneTemporary

File Metadata

Created
Sun, Nov 10, 06:32

dfpm_program.hpp

#ifndef SPECMICP_DFPMSOLVER_DFPMPROGRAM_HPP
#define SPECMICP_DFPMSOLVER_DFPMPROGRAM_HPP
#include "common.hpp"
namespace specmicp {
namespace dfpmsolver {
//! \brief Base class for a program
template <class Derived>
class DFPMProgram
{
public:
//! \brief Return a pointer to the true object
Derived* derived() {static_cast<Derived*>(this);}
//! \brief Return the number of equations
index_t get_neq() const {return derived()->get_neq();}
//! \brief Return the number of degrees of freedom per node
index_t get_ndf() const {return derived()->get_ndf();}
//! \brief Return the total number of degrees of freedom
index_t get_tot_ndf() const {return derived()->get_tot_ndf();}
//! \brief Return the id of the equation corresponding to the degree of freedom 'id_dof'
//!
//! Return 'no_equation' if no equation exist
index_t id_equation(index_t id_dof) const {return derived()->id_equation(id_dof);}
};
} // end namespace dfpmsolver
} // end namespace specmicp
#endif // SPECMICP_DFPMSOLVER_DFPMPROGRAM_HPP

Event Timeline