CyRK.cy

Submodules

CyRK.cy.common module

class CyRK.cy.common.CyrkErrorCodes(*values)

Bases: IntEnum

ARGUMENT_ERROR = -10
ARGUMENT_NOT_SET = -9
ATTRIBUTE_ERROR = -7
BAD_CONFIG_DATA = -22
BAD_INITIAL_STEP_SIZE = -80
BOUNDS_ERROR = -8
CONVERGED = 20
CYSOLVER_INITIALIZATION_ERROR = -5
DENSE_BUILD_FAILED = -56
DENSE_OUTPUT_NOT_SAVED = -21
ERROR_IMPORTING_PYTHON_MODULE = -70
EVENT_SETUP_FAILED = -60
EVENT_TERMINATED = 2
GENERAL_ERROR = -1
INCOMPATIBLE_INPUT = -6
INITIALIZING = 10
INTEGRATION_NOT_SUCCESSFUL = -57
MAX_ITERATIONS_HIT = -51
MAX_STEPS_SYSARCH_EXCEEDED = -53
MAX_STEPS_USER_EXCEEDED = -52
MEMORY_ALLOCATION_ERROR = -40
NO_ERROR = 0
NUMBER_OF_EQUATIONS_IS_ZERO = -50
OPTIMIZE_CONVERGENCE_ERROR = -31
OPTIMIZE_SIGN_ERROR = -30
OTHER_ERROR = -99
PROPERTY_NOT_SET = -2
SETUP_NOT_CALLED = -20
STEP_SIZE_ERROR_ACCEPTANCE = -55
STEP_SIZE_ERROR_SPACING = -54
SUCCESSFUL_INTEGRATION = 1
UNINITIALIZED_CLASS = -4
UNSET_ERROR_CODE = -100
UNSUPPORTED_UNKNOWN_MODEL = -3
VECTOR_SIZE_EXCEEDS_LIMITS = -41

CyRK.cy.cysolver_api module

class CyRK.cy.cysolver_api.ODEMethod(*values)

Bases: IntEnum

BASE_METHOD = 1
DOP853 = 5
NO_METHOD_SET = 0
RK23 = 3
RK45 = 4
RK_BASE_METHOD = 2
class CyRK.cy.cysolver_api.WrapCySolverResult

Bases: object

Wrapper for the C++ class CySolverResult defined in “cysolution.cpp”

call(t)

Call the dense output interpolater and return y

call_vectorize(t_view)

Call the dense output interpolater and return y

error_code
event_terminate_index
event_terminated
finalize()
integration_method

Returns a string stating what integration method was used for this solution.

message
method

Alias for self.integration_method.

num_dy
num_events
num_y
print_diagnostics()
size
solve()
status
status_message
steps_taken
success
t
t_events
y
y_events

CyRK.cy.cysolver_test module

CyRK.cy.cysolver_test.cy_extra_output_tester()
CyRK.cy.cysolver_test.cytester(diffeq_number, t_span=None, y0=None, args=None, method='rk45', expected_size=0, max_num_steps=0, max_ram_MB=2000, dense_output=False, use_events=False, t_eval=None, rtol=0.001, atol=1e-06, rtol_array=None, atol_array=None, max_step=inf, first_step=0.0, solution_reuse=None, force_retain_solver=False, repeats=1)

CyRK.cy.events module

CyRK.cy.events_test module

CyRK.cy.events_test.build_event_wrapper_test()
CyRK.cy.events_test.run_cysolver_with_events(use_dense, t_eval, use_termination, capture_extra)

CyRK.cy.helpers module

CyRK.cy.prange_test module

CyRK.cy.prange_test.run_prange_common_args_test(num_threads=2)

Run a prange test where args are common across all runs.

CyRK.cy.prange_test.run_prange_test(num_threads=2)

Run a prange test where everything is built outside of the loop.

CyRK.cy.pyhelpers module

CyRK.cy.pyhelpers.find_ode_method_int(ode_method_name: str)[source]
CyRK.cy.pyhelpers.get_error_message(error_code: int)[source]

CyRK.cy.pysolver module

class CyRK.cy.pysolver.PySolver

Bases: WrapCySolverResult

set_problem_parameters(py_diffeq, time_span, y0, method='RK45', t_eval=None, dense_output=False, events=None, args=None, expected_size=0, num_extra=0, first_step=0.0, max_step=inf, rtol=0.001, atol=1e-06, max_num_steps=0, max_ram_MB=2000, pass_dy_as_arg=False, force_retain_solver=True)
set_pydiffeq(diffeq_func, args, num_y, num_dy, pass_dy_as_arg=False)
CyRK.cy.pysolver.pysolve_ivp(py_diffeq, time_span, y0, method='RK45', t_eval=None, dense_output=False, events=None, args=None, expected_size=0, num_extra=0, first_step=0.0, max_step=inf, rtol=0.001, atol=1e-06, max_num_steps=0, max_ram_MB=2000, pass_dy_as_arg=False, solution_reuse=None, force_retain_solver=True)

CyRK.cy.pysolver_cyhook module