PISM, A Parallel Ice Sheet Model
stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
|
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, Vec x, double *value, void *ctx) |
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 Objective callback with a C++ object method. To assign
as the objective function to a TaoSolver
tao
,
The method name evaluateObjective
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 183 of file TaoUtil.hh.