pub trait PropertyAD<N: Dim>: for<'a> From<&'a [f64]>where
DefaultAllocator: Allocator<N>,{
type Unit;
const REFERENCE: Quantity<f64, Self::Unit>;
// Required method
fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Quantity<D, Self::Unit>>;
// Provided methods
fn evaluate_gradient<E: Residual<N, DualSVec<f64, f64, P>>, const P: usize>(
&self,
eos: &E,
) -> FeosResult<Quantity<DualSVec<f64, f64, P>, Self::Unit>> { ... }
fn evaluate_parallel<E: Residual<N> + Sync>(
eos: &E,
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array1<bool>) { ... }
fn evaluate_parallel_derivatives<E: ParametersAD<N>, const P: usize>(
parameter_names: [String; P],
parameters: &[f64],
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array2<f64>, Array1<bool>)
where E::Lifted<DualSVec<f64, f64, P>>: Sync { ... }
fn evaluate_parallel_derivatives_params<E: ParametersAD<N>, const P: usize>(
parameter_names: [String; P],
parameters: ArrayView2<'_, f64>,
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array2<f64>, Array1<bool>) { ... }
}Expand description
Properties that can be rapidly evaluated in parallel together with their gradients with respect to model parameters
Required Associated Constants§
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn evaluate_gradient<E: Residual<N, DualSVec<f64, f64, P>>, const P: usize>(
&self,
eos: &E,
) -> FeosResult<Quantity<DualSVec<f64, f64, P>, Self::Unit>>
fn evaluate_gradient<E: Residual<N, DualSVec<f64, f64, P>>, const P: usize>( &self, eos: &E, ) -> FeosResult<Quantity<DualSVec<f64, f64, P>, Self::Unit>>
Evaluate the property for the first derivative w.r.t. model parameters.
This can be overridden if there is a more performant implementation than
the general implementation in evaluate.
Sourcefn evaluate_parallel<E: Residual<N> + Sync>(
eos: &E,
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array1<bool>)
fn evaluate_parallel<E: Residual<N> + Sync>( eos: &E, input: ArrayView2<'_, f64>, ) -> (Array1<f64>, Array1<bool>)
Evaluate the property for all inputs in parallel.
Return the property values and the success of the calculations.
Sourcefn evaluate_parallel_derivatives<E: ParametersAD<N>, const P: usize>(
parameter_names: [String; P],
parameters: &[f64],
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array2<f64>, Array1<bool>)
fn evaluate_parallel_derivatives<E: ParametersAD<N>, const P: usize>( parameter_names: [String; P], parameters: &[f64], input: ArrayView2<'_, f64>, ) -> (Array1<f64>, Array2<f64>, Array1<bool>)
Evaluate the property and its gradients for all inputs in parallel.
Return the property values, the gradients, and the success of the calculations.
Sourcefn evaluate_parallel_derivatives_params<E: ParametersAD<N>, const P: usize>(
parameter_names: [String; P],
parameters: ArrayView2<'_, f64>,
input: ArrayView2<'_, f64>,
) -> (Array1<f64>, Array2<f64>, Array1<bool>)
fn evaluate_parallel_derivatives_params<E: ParametersAD<N>, const P: usize>( parameter_names: [String; P], parameters: ArrayView2<'_, f64>, input: ArrayView2<'_, f64>, ) -> (Array1<f64>, Array2<f64>, Array1<bool>)
Evaluate the property and its gradients for all inputs and parameters in parallel.
Return the property values, the gradients, and the success of the calculations.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".