Module shared

Module shared 

Source
Expand description

Shared network analysis components.

This module contains the following elements:

Structs§

CurrentSource
This struct is used to create the type alias CurrentSources of EdgeValueInputs. It is usually not necessary to construct it directly. Please see the docstring of EdgeValueInputs for details.
EdgeValueAndType
This struct contains the edge values (resistance, current or voltage) specified by its field value_type. It is usually created from the Solution::resistances_and_indices method, but can also be constructuted manually if needed.
EdgeValueAndTypeMut
A variant of EdgeValueAndType which returns mutable references to the value(s).
FunctionArgs
A simple container for the values provided to EdgeValueInputs::Function or EdgeValueInputs::Function by the NetworkAnalysis::solve method. See EdgeValueAndTypeMut::iter_mut for an example on how to use it.
JacobianData
A struct containing information about the nonlinear equation system (both its general structure and the concrete values of its component). It is provided as an input to a user-supplied Jacobian calculation function,
Resistance
This struct is used to create the type alias Resistances of EdgeValueInputs. It is usually not necessary to construct it directly. Please see the docstring of EdgeValueInputs for details.
Solution
Solution created by successfull solve call
SolverConfig
Solver parameters used in the NetworkAnalysis::solve function.
VoltageSource
This struct is used to create the type alias VoltageSources of EdgeValueInputs. It is usually not necessary to construct it directly. Please see the docstring of EdgeValueInputs for details.

Enums§

EdgeValueInputs
Enum defining the edge input values for current / voltage excitations or resistances as either constants or via functions.
SolveError
An error returned from a failed call to solve.

Traits§

DeriveEdgeType
This trait describes how to convert the types CurrentSource, VoltageSource and Resistance into variants of Type. It is usually not necessary to implement it for your own types or to use its methods.
NetworkAnalysis
Trait which defines functionality shared between MeshAnalysis and NodalAnalysis.

Type Aliases§

CurrentSources
Type alias of EdgeValueInputs used for current sources. Please see the docstring of EdgeValueInputs for details.
Resistances
Type alias of EdgeValueInputs used for resistances. Please see the docstring of EdgeValueInputs for details.
VoltageSources
Type alias of EdgeValueInputs used for voltage sources. Please see the docstring of EdgeValueInputs for details.