The categorization of the PDE problems presented in Categorization of Problems are realized by Interface classes in libDiscretization.
IAssemble Interface
The class ug::IAssemble implements the interface for assembling, that can be used in a newton solver.
template < typename TDoFDistribution,
typename TAlgebra>
class IAssemble {
public:
typedef TAlgebra algebra_type;
typedef IDoFDistribution<TDoFDistribution> dof_distribution_type;
public:
virtual IAssembleReturn assemble_jacobian(
matrix_type& J,
const dof_distribution_type& dofDistr)
{return false;}
virtual IAssembleReturn assemble_defect(
vector_type& d,
const dof_distribution_type& dofDistr)
{return false;}
virtual IAssembleReturn assemble_linear(
matrix_type& A,
const dof_distribution_type& dofDistr)
{return false;}
virtual IAssembleReturn adjust_solution(
vector_type& u,
const dof_distribution_type& dofDistr)
{return false;}
}
CPUAlgebra::matrix_type matrix_type
CPUAlgebra::vector_type vector_type
ITimeDiscretization Interface
template < typename TDoFDistribution,
typename TAlgebra>
class ITimeDiscretization
: public IAssemble<TDoFDistribution, TAlgebra>
{
public:
typedef IDoFDistribution<TDoFDistribution> dof_distribution_type;
typedef TAlgebra algebra_type;
typedef typename algebra_type::vector_type
vector_type;
typedef IDomainDiscretization<TDoFDistribution, algebra_type>
domain_discretization_type;
public:
void set_domain_discretization(domain_discretization_type& dd);
domain_discretization_type* get_domain_discretization();
virtual bool prepare_step(std::deque<vector_type*>& u_old,
std::deque<number>& time_old,
virtual size_t num_prev_steps() = 0;
};
double number
Definition: types.h:124
IDomainDiscretization Interface
template < typename TDoFDistribution,
typename TAlgebra>
class IDomainDiscretization : public IAssemble<TDoFDistribution, TAlgebra>{
public:
typedef IDoFDistribution<TDoFDistribution> dof_distribution_type;
typedef TAlgebra algebra_type;
typedef typename algebra_type::matrix_type
matrix_type;
typedef typename algebra_type::vector_type
vector_type;
public:
virtual
const dof_distribution_type& dofDistr,
{return false;}
virtual
const dof_distribution_type& dofDistr,
{return false;}
virtual
const dof_distribution_type& dofDistr,
{return false;}
virtual
const dof_distribution_type& dofDistr,
{return false;}
virtual size_t num_constraints() const = 0;
virtual IConstraint<TDoFDistribution, TAlgebra>* constraint(size_t i) = 0;
};