MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::Ginkgo::ResidualLogger< ValueType > Struct Template Reference

#include <ginkgo.hpp>

Inheritance diagram for mfem::Ginkgo::ResidualLogger< ValueType >:
[legend]
Collaboration diagram for mfem::Ginkgo::ResidualLogger< ValueType >:
[legend]

Public Types

using gko_dense = gko::matrix::Dense<ValueType>
 

Public Member Functions

void write () const
 
void on_iteration_complete (const gko::LinOp *op, const gko::size_type &iteration, const gko::LinOp *residual, const gko::LinOp *solution, const gko::LinOp *residual_norm) const override
 
void on_iteration_complete (const gko::LinOp *op, const gko::size_type &iteration, const gko::LinOp *residual, const gko::LinOp *solution, const gko::LinOp *residual_norm, const gko::LinOp *implicit_sq_residual_norm) const override
 
void on_iteration_complete (const gko::LinOp *op, const gko::LinOp *rhs, const gko::LinOp *solution, const gko::size_type &iteration, const gko::LinOp *residual, const gko::LinOp *residual_norm, const gko::LinOp *implicit_sq_residual_norm, const gko::array< gko::stopping_status > *status, bool stopped) const override
 
 ResidualLogger (std::shared_ptr< const gko::Executor > exec, const gko::LinOp *matrix, const gko_dense *b, bool compute_real_residual=false)
 

Detailed Description

template<typename ValueType = real_t>
struct mfem::Ginkgo::ResidualLogger< ValueType >

Custom logger class which intercepts the residual norm scalar and solution vector in order to print a table of real vs recurrent (internal to the solvers) residual norms.

This has been taken from the custom-logger example of Ginkgo. See the custom-logger example to understand how to write and modify your own loggers with Ginkgo.

Definition at line 289 of file ginkgo.hpp.

Member Typedef Documentation

◆ gko_dense

template<typename ValueType = real_t>
using mfem::Ginkgo::ResidualLogger< ValueType >::gko_dense = gko::matrix::Dense<ValueType>

Definition at line 324 of file ginkgo.hpp.

Constructor & Destructor Documentation

◆ ResidualLogger()

template<typename ValueType = real_t>
mfem::Ginkgo::ResidualLogger< ValueType >::ResidualLogger ( std::shared_ptr< const gko::Executor > exec,
const gko::LinOp * matrix,
const gko_dense * b,
bool compute_real_residual = false )
inline

Definition at line 365 of file ginkgo.hpp.

Member Function Documentation

◆ on_iteration_complete() [1/3]

template<typename ValueType = real_t>
void mfem::Ginkgo::ResidualLogger< ValueType >::on_iteration_complete ( const gko::LinOp * op,
const gko::LinOp * rhs,
const gko::LinOp * solution,
const gko::size_type & iteration,
const gko::LinOp * residual,
const gko::LinOp * residual_norm,
const gko::LinOp * implicit_sq_residual_norm,
const gko::array< gko::stopping_status > * status,
bool stopped ) const
inlineoverride

Definition at line 349 of file ginkgo.hpp.

◆ on_iteration_complete() [2/3]

template<typename ValueType = real_t>
void mfem::Ginkgo::ResidualLogger< ValueType >::on_iteration_complete ( const gko::LinOp * op,
const gko::size_type & iteration,
const gko::LinOp * residual,
const gko::LinOp * solution,
const gko::LinOp * residual_norm ) const
inlineoverride

Definition at line 327 of file ginkgo.hpp.

◆ on_iteration_complete() [3/3]

template<typename ValueType = real_t>
void mfem::Ginkgo::ResidualLogger< ValueType >::on_iteration_complete ( const gko::LinOp * op,
const gko::size_type & iteration,
const gko::LinOp * residual,
const gko::LinOp * solution,
const gko::LinOp * residual_norm,
const gko::LinOp * implicit_sq_residual_norm ) const
inlineoverride

Definition at line 337 of file ginkgo.hpp.

◆ write()

template<typename ValueType = real_t>
void mfem::Ginkgo::ResidualLogger< ValueType >::write ( ) const
inline

Definition at line 292 of file ginkgo.hpp.


The documentation for this struct was generated from the following file: