PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Static Public Member Functions | Static Protected Member Functions | List of all members
pism::taoutil::TaoConvergenceCallback< Problem > Class Template Reference

Adaptor to connect a TAO objective function callback to a C++ object method. More...

#include <TaoUtil.hh>

Static Public Member Functions

static void connect (Tao tao, Problem &p)
 

Static Protected Member Functions

static PetscErrorCode callback (Tao tao, void *ctx)
 

Detailed Description

template<class Problem>
class pism::taoutil::TaoConvergenceCallback< Problem >

Adaptor to connect a TAO objective function callback to a C++ object method.

The TAO library interfaces with user code via C-style callback functions. This class makes it convenient to associate a TAO convergence monitoring callback with a C++ object method. To assign

void MyObject::convergenceTest(Tao tao);

as the convergence test function to a Tao tao,

MyObject obj;
static void connect(Tao tao, Problem &p)
Definition: TaoUtil.hh:369

The method name convergenceTest for the callback is hard-coded. See TaoObjGradCallback for a technique to allow the method name to be specified (at the expense of a little more cumbersome code).

Definition at line 367 of file TaoUtil.hh.


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