Expand description
Shared network analysis components.
This module contains the following elements:
NetworkAnalysis
, a trait implemented for bothMeshAnalysis
andNodalAnalysis
which specifies a common interface for both construction and solving as well as the correspondingSolveError
.SolverConfig
, a struct which defines the solver parameters for the underlying Newton-Raphson algorithm.EdgeValueInputs
, an enum defining either constant or variable resistances, edge current / voltage sources as well as three aliasesResistances
,CurrentSources
andVoltageSources
.
Structs§
- Current
Source - This struct is used to create the type alias
CurrentSources
ofEdgeValueInputs
. It is usually not necessary to construct it directly. Please see the docstring ofEdgeValueInputs
for details. - Edge
Value AndType - This struct contains the edge
values
(resistance, current or voltage) specified by its fieldvalue_type
. It is usually created from theSolution::resistances_and_indices
method, but can also be constructuted manually if needed. - Edge
Value AndType Mut - A variant of
EdgeValueAndType
which returns mutable references to the value(s). - Function
Args - A simple container for the values provided to
EdgeValueInputs::Function
orEdgeValueInputs::Function
by theNetworkAnalysis::solve
method. SeeEdgeValueAndTypeMut::iter_mut
for an example on how to use it. - Jacobian
Data - 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
ofEdgeValueInputs
. It is usually not necessary to construct it directly. Please see the docstring ofEdgeValueInputs
for details. - Solution
- Solution created by successfull
solve
call - Solver
Config - Solver parameters used in the
NetworkAnalysis::solve
function. - Voltage
Source - This struct is used to create the type alias
VoltageSources
ofEdgeValueInputs
. It is usually not necessary to construct it directly. Please see the docstring ofEdgeValueInputs
for details.
Enums§
- Edge
Value Inputs - Enum defining the edge input values for current / voltage excitations or resistances as either constants or via functions.
- Solve
Error - An error returned from a failed call to
solve
.
Traits§
- Derive
Edge Type - This trait describes how to convert the types
CurrentSource
,VoltageSource
andResistance
into variants ofType
. It is usually not necessary to implement it for your own types or to use its methods. - Network
Analysis - Trait which defines functionality shared between
MeshAnalysis
andNodalAnalysis
.
Type Aliases§
- Current
Sources - Type alias of
EdgeValueInputs
used for current sources. Please see the docstring ofEdgeValueInputs
for details. - Resistances
- Type alias of
EdgeValueInputs
used for resistances. Please see the docstring ofEdgeValueInputs
for details. - Voltage
Sources - Type alias of
EdgeValueInputs
used for voltage sources. Please see the docstring ofEdgeValueInputs
for details.