cosapp.core.numerics.solve.jacobian

Classes

AbstractJacobianEvaluation()

Abstract base class for Jacobian evaluation.

FfdJacobianEvaluation(eps, partial_jac, ...)

Forward finite-difference Jacobian evaluation.

JacobianStats(partial_updates, ...)

Statistics of a Jacobian evaluation.

class cosapp.core.numerics.solve.jacobian.AbstractJacobianEvaluation[source]

Bases: HasOptions

Abstract base class for Jacobian evaluation.

bind_residue_function(f, args)[source]

Binds the residue function and its arguments.

abstract get_stats() JacobianStats[source]

Gets Jacobian evaluation statistics.

property log_level: LogLevel

Gets the log level.

abstract reset_stats() None[source]

Resets Jacobian evaluation statistics.

setup(size: int) None[source]

Performs setup of the evaluation method.

teardown() None[source]

Performs clean-up of the evaluation method.

unbind_residue_function()[source]

Unbinds the residue function and its arguments.

class cosapp.core.numerics.solve.jacobian.FfdJacobianEvaluation(eps: float = 1.52587890625e-05, partial_jac: bool = True, p_jac_tries: int = 10, execution_policy=ExecutionPolicy(workers_count=1, execution_type=<ExecutionType.SINGLE_THREAD: 0>, start_method=<WorkerStartMethod.FORK: WorkerStartMethodDetails(context_type=<class 'multiprocessing.context.ForkContext'>, worker_type=<class 'cosapp.core.execution.worker.ForkWorker'>)>))[source]

Bases: AbstractJacobianEvaluation

Forward finite-difference Jacobian evaluation.

get_stats() JacobianStats[source]

Gets Jacobian evaluation statistics.

reset_stats() None[source]

Resets Jacobian evaluation statistics.

setup(size: int) None[source]

Performs setup of the evaluation method.

teardown() None[source]

Performs clean-up of the evaluation method.

class cosapp.core.numerics.solve.jacobian.JacobianStats(partial_updates: int, broyden_updates: int, full_updates: int)[source]

Bases: NamedTuple

Statistics of a Jacobian evaluation.

broyden_updates: int

Alias for field number 1

full_updates: int

Alias for field number 2

partial_updates: int

Alias for field number 0

cosapp.core.numerics.solve.jacobian.object__getstate__(self, /)

Helper for pickle.