Skip to main content

Module scalar

Module scalar 

Source
Expand description

Scalar types and traits.

This module defines the Scalar trait that all floating-point types used in DiffSol must implement. It aggregates requirements from nalgebra, faer, and num_traits to ensure compatibility with linear algebra operations.

Implementations are provided for f32 and f64. GPU scalar types are available via ScalarCuda (requires cuda feature).

Structs§

Scale
A wrapper for scalar values used when scaling vectors and matrices.

Traits§

FaerScalar
A Scalar that also satisfies faer’s numeric field requirements.
NalgebraScalar
A Scalar that also satisfies nalgebra’s numeric field requirements.
Scalar
A scalar type suitable for numerical computations in ODE solvers.

Functions§

scale
Create a Scale wrapper from a scalar value.

Type Aliases§

IndexType
The index type used throughout DiffSol for indexing vectors and matrices.