`problem`

linear solver

# Description

The `problem` class solves a given linear system for PDEs in variational formulation.

# Description

The degrees of freedom are splitting between unknown degrees of freedom and blocked one. See also `form` and `space`. Let `a` be a bilinear `form` and `lh` be the right-hand-side, as in the previous example. The linear system expands as:

        [ a.uu  a.ub ] [ uh.u ]   [ lh.u ]
        [            ] [      ] = [      ]
        [ a.bu  a.bb ] [ uh.b ]   [ lh.b ]

The `uh.b` are blocked degrees of freedom: their values are prescribed and the corresponding values are move to the right-hand-side of the system that reduces to:

        a.uu*uh.u =  lh.u - a.ub*uh.b

This writes:

        problem p (a);
        p.solve (lh, uh);

Observe that, during the `p.solve` call, `uh` is both an input variable, for the `uh.b` contribution to the right-hand-side, and an output variable, with `uh.u`. When using an iterative resolution, the details about its convergence, e.g. the number of iterations and the final residue, can be obtain via the `p.option()` member function, see `solver_option`. Finally, the previous linear system is solved via the `solver` class: the `problem` class is simply a convenient wrapper around the `solver` one.

# Example

See dirichlet.cc

# Customization

The `solver` could be customized via the constructor optional `solver_option` argument:

        problem p (a, sopt);

When using a direct `solver`, the determinant of the linear system matrix is also available as `p.det()`. When using an iterative `solver`, the preconditionner could be customized:

        p.set_preconditionner (m);

# TODO

The `solve` method could return a boolean when success.

# Implementation

This documentation has been generated from file main/lib/problem.h

The `problem` class is simply an alias to the `problem_basic` class

typedef problem_basic<Float> problem;

The `problem_basic` class provides a generic interface:

template <class T, class M = rheo_default_memory_model>
class problem_basic {
public:
// typedefs:
typedef typename solver_basic<T,M>::size_type size_type;
typedef typename solver_basic<T,M>::determinant_type determinant_type;
// allocators:
problem_basic ();
problem_basic (const form_basic<T,M>& a,
const solver_option& sopt = solver_option());
void update_value (const form_basic<T,M>& a);
void set_preconditioner (const solver_basic<T,M>&);
// accessor:
void solve (const field_basic<T,M>& lh, field_basic<T,M>& uh) const;
void trans_solve (const field_basic<T,M>& lh, field_basic<T,M>& uh) const;
determinant_type det() const;
const solver_option& option() const;
bool initialized() const;
};
rheolef::problem
problem_basic< Float > problem
Definition: problem.h:163
rheolef::problem_basic::size_type
solver_basic< T, M >::size_type size_type
Definition: problem.h:125
rheolef::solver_basic::size_type
rep::size_type size_type
Definition: solver.h:270
rheolef::solver_basic::determinant_type
rep::determinant_type determinant_type
Definition: solver.h:271
rheolef::problem_basic::problem_basic
problem_basic()
Definition: problem.h:171
rheolef::problem_basic::determinant_type
solver_basic< T, M >::determinant_type determinant_type
Definition: problem.h:126
a
Definition: diffusion_isotropic.h:25
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
rheolef::problem_basic::update_value
void update_value(const form_basic< T, M > &a)
Definition: problem.h:188
rheolef::problem_basic::trans_solve
void trans_solve(const field_basic< T, M > &lh, field_basic< T, M > &uh) const
Definition: problem.h:209
rheolef::problem_basic::det
determinant_type det() const
Definition: problem.h:223
rheolef::problem_basic::set_preconditioner
void set_preconditioner(const solver_basic< T, M > &)
Definition: problem.h:196
rheolef::problem_basic::initialized
bool initialized() const
Definition: problem.h:216
rheolef::problem_basic::option
const solver_option & option() const
Definition: problem.h:230
rheolef::problem_basic::solve
void solve(const field_basic< T, M > &lh, field_basic< T, M > &uh) const
Definition: problem.h:203