Skip to content

Public API

This page lists exported symbols of CTFlows.MultiPhase.


From CTFlows.MultiPhase

CTFlows.MultiPhase [Module]

CTFlows.MultiPhase Module
julia
MultiPhase

Multi-phase flow concatenation and sequential integration.

This module provides types and operators for concatenating flows with switching times and optional jumps, implementing exact sequential integration.

AnyMultiPhaseFlow [Struct]

CTFlows.MultiPhase.AnyMultiPhaseFlow Type
julia
struct MultiPhaseFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, D<:CTBase.Traits.AbstractDynamicsTrait, FS<:Tuple, ST<:(Vector{<:Real}), J<:(Vector)} <: CTFlows.Flows.AbstractFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, D<:CTBase.Traits.AbstractDynamicsTrait}

Type alias for any multi-phase flow.

See also: CTFlows.MultiPhase.MultiPhaseStateFlow, CTFlows.MultiPhase.MultiPhaseHamiltonianFlow.

MultiPhaseFlow [Struct]

CTFlows.MultiPhase.MultiPhaseFlow Type
julia
struct MultiPhaseFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, D<:CTBase.Traits.AbstractDynamicsTrait, FS<:Tuple, ST<:(Vector{<:Real}), J<:(Vector)} <: CTFlows.Flows.AbstractFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, D<:CTBase.Traits.AbstractDynamicsTrait}

Concrete multi-phase flow combining multiple flows of the same dynamics family with switching times and optional jumps.

The dynamics axis is encoded in D, following the same pattern as Flow:

  • D = StateDynamics → state multi-phase flow (alias MultiPhaseStateFlow)

  • D = HamiltonianDynamics → Hamiltonian multi-phase flow (alias MultiPhaseHamiltonianFlow)

flows is a heterogeneous tuple, lifting the previous homogeneous-S/I constraint: phases may wrap systems and integrators of different concrete types.

Type Parameters

  • TD <: TimeDependence: Time dependence trait (Autonomous or NonAutonomous)

  • VD <: VariableDependence: Variable dependence trait (Fixed or NonFixed)

  • D <: AbstractDynamicsTrait: Dynamics trait (StateDynamics or HamiltonianDynamics)

  • FS <: Tuple: Tuple of AbstractFlow{TD,VD,D} (heterogeneous allowed)

  • ST <: Vector{<:Real}: Type of the switching times vector

  • J <: Vector{<:Any}: Type of the jumps vector

Fields

  • flows::FS: Tuple of flows for each phase

  • switching_times::ST: Switching times between phases

  • jumps::J: Optional jump functions applied at switching times

See also: CTFlows.MultiPhase.MultiPhaseStateFlow, CTFlows.MultiPhase.MultiPhaseHamiltonianFlow, CTFlows.Flows.Flow.

MultiPhaseHamiltonianFlow [Struct]

CTFlows.MultiPhase.MultiPhaseHamiltonianFlow Type
julia
struct MultiPhaseFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, CTBase.Traits.HamiltonianDynamics, FS<:Tuple, ST<:(Vector{<:Real}), J<:(Vector)} <: CTFlows.Flows.AbstractFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, CTBase.Traits.HamiltonianDynamics}

Alias for Hamiltonian multi-phase flows: MultiPhaseFlow{TD,VD,HamiltonianDynamics,FS,ST,J}.

See also: CTFlows.MultiPhase.MultiPhaseFlow, CTFlows.MultiPhase.MultiPhaseStateFlow.

MultiPhaseStateFlow [Struct]

CTFlows.MultiPhase.MultiPhaseStateFlow Type
julia
struct MultiPhaseFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, CTBase.Traits.StateDynamics, FS<:Tuple, ST<:(Vector{<:Real}), J<:(Vector)} <: CTFlows.Flows.AbstractFlow{TD<:CTBase.Traits.TimeDependence, VD<:CTBase.Traits.VariableDependence, CTBase.Traits.StateDynamics}

Alias for state multi-phase flows: MultiPhaseFlow{TD,VD,StateDynamics,FS,ST,J}.

See also: CTFlows.MultiPhase.MultiPhaseFlow, CTFlows.MultiPhase.MultiPhaseHamiltonianFlow.

get_flow [Function]

CTFlows.MultiPhase.get_flow Function
julia
get_flow(
    mpf::CTFlows.MultiPhase.MultiPhaseFlow,
    i::Int64
) -> Any

Return the flow for a specific phase.

Arguments

  • mpf::MultiPhaseFlow: The multi-phase flow.

  • i::Int: Phase index (1-based).

Returns

  • AbstractFlow: The flow for phase i.

See also: CTFlows.MultiPhase.n_phases, CTFlows.MultiPhase.get_switching_time.

get_flows [Function]

CTFlows.MultiPhase.get_flows Function
julia
get_flows(f::CTFlows.Flows.AbstractFlow) -> Tuple

Get the flows from a single-phase flow as a 1-tuple.

julia
get_flows(mpf::CTFlows.MultiPhase.MultiPhaseFlow) -> Tuple

Get the flows tuple from a multi-phase flow.

get_jump [Function]

CTFlows.MultiPhase.get_jump Function
julia
get_jump(
    mpf::CTFlows.MultiPhase.MultiPhaseFlow,
    i::Int64
) -> Any

Return the jump function at a specific phase boundary.

Arguments

  • mpf::MultiPhaseFlow: The multi-phase flow.

  • i::Int: Phase index (1-based). Returns the jump applied after phase i.

Returns

  • Union{Nothing, Function, Tuple}: The jump function, or nothing if no jump is defined.

See also: CTFlows.MultiPhase.n_phases, CTFlows.MultiPhase.get_flow.

get_jumps [Function]

CTFlows.MultiPhase.get_jumps Function
julia
get_jumps(_::CTFlows.Flows.AbstractFlow) -> Vector

Get the jumps from a single-phase flow (empty vector).

julia
get_jumps(mpf::CTFlows.MultiPhase.MultiPhaseFlow) -> Vector

Get the jumps from a multi-phase flow.

get_switching_time [Function]

CTFlows.MultiPhase.get_switching_time Function
julia
get_switching_time(
    mpf::CTFlows.MultiPhase.MultiPhaseFlow,
    i::Int64
) -> Real

Return the switching time at a specific phase boundary.

Arguments

  • mpf::MultiPhaseFlow: The multi-phase flow.

  • i::Int: Phase index (1-based). Returns the switching time between phase i and i+1.

Returns

  • Real: The switching time.

See also: CTFlows.MultiPhase.n_phases, CTFlows.MultiPhase.get_flow.

get_switching_times [Function]

CTFlows.MultiPhase.get_switching_times Function
julia
get_switching_times(
    _::CTFlows.Flows.AbstractFlow
) -> Vector{<:Real}

Get the switching times from a single-phase flow (empty vector).

julia
get_switching_times(
    mpf::CTFlows.MultiPhase.MultiPhaseFlow
) -> Vector{<:Real}

Get the switching times from a multi-phase flow.

n_phases [Function]

CTFlows.MultiPhase.n_phases Function
julia
n_phases(mpf::CTFlows.MultiPhase.MultiPhaseFlow) -> Int64

Return the number of phases in a multi-phase flow.

Arguments

  • mpf::MultiPhaseFlow: The multi-phase flow.

Returns

  • Int: Number of phases.

See also: CTFlows.MultiPhase.get_flow, CTFlows.MultiPhase.get_switching_time.