tlm_adjoint.manager

This module provides a simple EquationManager interface. Functions defined here access and interact with the default manager.

Module Contents

tlm_adjoint.manager.manager()
Returns:

An EquationManager, the current default manager.

tlm_adjoint.manager.set_manager(manager)

Set the default manager.

Parameters:

manager – An EquationManager to use as the default manager.

tlm_adjoint.manager.restore_manager(fn)

Decorator to revert the default manager to the manager used prior to calling the decorated callable. A typical use is

@restore_manager
def decorated(*M):
    set_manager(manager().new())
    forward(*M)
Parameters:

fn – A decorated callable.

Returns:

A callable, where the default manager on entry is restored on exit.

tlm_adjoint.manager.configure_checkpointing(cp_method, cp_parameters)

See EquationManager.configure_checkpointing().

tlm_adjoint.manager.manager_info(*, info=print)

See EquationManager.info().

tlm_adjoint.manager.reset_manager(cp_method=None, cp_parameters=None)

See EquationManager.reset().

tlm_adjoint.manager.annotation_enabled()

See EquationManager.annotation_enabled().

tlm_adjoint.manager.start_manager(*, annotate=True, tlm=True)

See EquationManager.start().

tlm_adjoint.manager.stop_manager(*, annotate=True, tlm=True)

See EquationManager.stop().

tlm_adjoint.manager.paused_manager(*, annotate=True, tlm=True)

See EquationManager.paused().

tlm_adjoint.manager.manager_disabled(*, annotate=True, tlm=True)

Decorator which can be used to disable processing of equations and derivation and solution of tangent-linear equations.

Parameters:
  • annotate – Whether to disable processing of equations.

  • tlm – Whether to disable derivation and solution of tangent-linear equations.

tlm_adjoint.manager.configure_tlm(*args, annotate=None, tlm=True)

See EquationManager.configure_tlm().

tlm_adjoint.manager.tlm_enabled()

See EquationManager.tlm_enabled().

tlm_adjoint.manager.var_tlm(x, *args)

See EquationManager.var_tlm().

tlm_adjoint.manager.compute_gradient(Js, M, *, callback=None, prune_forward=True, prune_adjoint=True, prune_replay=True, cache_adjoint_degree=None, store_adjoint=False, adj_ics=None)

See EquationManager.compute_gradient().

tlm_adjoint.manager.new_block()

See EquationManager.new_block().