pub struct TensorTuple<T1, T2>(pub T1, pub T2)
where
T1: Tensor,
T2: Tensor;Expand description
A fixed-size nested collection of different tensors.
Tuple Fields§
§0: T1§1: T2Trait Implementations§
Source§impl<T1, T2> Add<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
impl<T1, T2> Add<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
Source§impl<T1, T2> Add for TensorTuple<T1, T2>
impl<T1, T2> Add for TensorTuple<T1, T2>
Source§impl<T1, T2> AddAssign<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
impl<T1, T2> AddAssign<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
Source§fn add_assign(&mut self, tensor_tuple: &Self)
fn add_assign(&mut self, tensor_tuple: &Self)
Performs the
+= operation. Read moreSource§impl<T1, T2> AddAssign for TensorTuple<T1, T2>
impl<T1, T2> AddAssign for TensorTuple<T1, T2>
Source§fn add_assign(&mut self, tensor_tuple: Self)
fn add_assign(&mut self, tensor_tuple: Self)
Performs the
+= operation. Read moreSource§impl<T1, T2> AssertEq for TensorTuple<T1, T2>
impl<T1, T2> AssertEq for TensorTuple<T1, T2>
fn eq(a: Self, b: TensorTuple<T1, T2>) -> Result<(), AssertionError>
fn eq_within_tols( tols: &Assert, a: Self, b: TensorTuple<T1, T2>, ) -> Result<(), AssertionError>
Source§impl<T1, T2> Clone for TensorTuple<T1, T2>
impl<T1, T2> Clone for TensorTuple<T1, T2>
Source§fn clone(&self) -> TensorTuple<T1, T2>
fn clone(&self) -> TensorTuple<T1, T2>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T1, T2> Debug for TensorTuple<T1, T2>
impl<T1, T2> Debug for TensorTuple<T1, T2>
Source§impl<T1, T2> Default for TensorTuple<T1, T2>
impl<T1, T2> Default for TensorTuple<T1, T2>
Source§impl<T1, T2> Display for TensorTuple<T1, T2>
impl<T1, T2> Display for TensorTuple<T1, T2>
Source§impl<T1, T2> Div<&f64> for TensorTuple<T1, T2>
impl<T1, T2> Div<&f64> for TensorTuple<T1, T2>
Source§type Output = TensorTuple<T1, T2>
type Output = TensorTuple<T1, T2>
The resulting type after applying the
/ operator.Source§impl<T0, T1, T4, T5> Div<TensorTuple<T0, T1>> for &TensorTuple<T4, T5>
impl<T0, T1, T4, T5> Div<TensorTuple<T0, T1>> for &TensorTuple<T4, T5>
Source§type Output = TensorTuple<T4, T5>
type Output = TensorTuple<T4, T5>
The resulting type after applying the
/ operator.Source§impl<T1, T2> Div<f64> for TensorTuple<T1, T2>
impl<T1, T2> Div<f64> for TensorTuple<T1, T2>
Source§type Output = TensorTuple<T1, T2>
type Output = TensorTuple<T1, T2>
The resulting type after applying the
/ operator.Source§impl<T1, T2> DivAssign<&f64> for TensorTuple<T1, T2>
impl<T1, T2> DivAssign<&f64> for TensorTuple<T1, T2>
Source§fn div_assign(&mut self, tensor_rank_0: &TensorRank0)
fn div_assign(&mut self, tensor_rank_0: &TensorRank0)
Performs the
/= operation. Read moreSource§impl<T1, T2> DivAssign<f64> for TensorTuple<T1, T2>
impl<T1, T2> DivAssign<f64> for TensorTuple<T1, T2>
Source§fn div_assign(&mut self, tensor_rank_0: TensorRank0)
fn div_assign(&mut self, tensor_rank_0: TensorRank0)
Performs the
/= operation. Read moreSource§impl<B1, B2, S1, S2, const D: usize> ElasticViscoplasticElements<TensorTuple<S1, S2>, D> for Blocks<B1, B2>where
B1: ElasticViscoplasticElements<S1, D>,
B2: ElasticViscoplasticElements<S2, D>,
S1: Tensor,
S2: Tensor,
impl<B1, B2, S1, S2, const D: usize> ElasticViscoplasticElements<TensorTuple<S1, S2>, D> for Blocks<B1, B2>where
B1: ElasticViscoplasticElements<S1, D>,
B2: ElasticViscoplasticElements<S2, D>,
S1: Tensor,
S2: Tensor,
fn initial_state(&self) -> TensorTuple<S1, S2>
fn nodal_forces_into( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &TensorTuple<S1, S2>, nodal_forces: &mut NodalForcesSolid<D>, ) -> Result<(), ElementModelError>
fn nodal_stiffnesses_into( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &TensorTuple<S1, S2>, nodal_stiffnesses: &mut NodalStiffnessesSolid<D>, ) -> Result<(), ElementModelError>
fn state_variables_evolution( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &TensorTuple<S1, S2>, ) -> Result<TensorTuple<S1, S2>, ElementModelError>
fn nodal_forces( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalForcesSolid<D>, ElementModelError>
fn nodal_stiffnesses( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &S, ) -> Result<NodalStiffnessesSolid<D>, ElementModelError>
Source§impl<'a, T1, T2> From<&'a TensorTuple<T1, T2>> for (&'a T1, &'a T2)
impl<'a, T1, T2> From<&'a TensorTuple<T1, T2>> for (&'a T1, &'a T2)
Source§fn from(tensor_tuple: &'a TensorTuple<T1, T2>) -> Self
fn from(tensor_tuple: &'a TensorTuple<T1, T2>) -> Self
Converts to this type from the input type.
Source§impl<T1, T2> From<(T1, T2)> for TensorTuple<T1, T2>
impl<T1, T2> From<(T1, T2)> for TensorTuple<T1, T2>
Source§impl<T1, T2> From<TensorTuple<T1, T2>> for (T1, T2)
impl<T1, T2> From<TensorTuple<T1, T2>> for (T1, T2)
Source§fn from(tensor_tuple: TensorTuple<T1, T2>) -> Self
fn from(tensor_tuple: TensorTuple<T1, T2>) -> Self
Converts to this type from the input type.
Source§impl<T1, T2> From<Vector> for TensorTuple<T1, T2>
impl<T1, T2> From<Vector> for TensorTuple<T1, T2>
Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Hessian for TensorTuple<TensorRank4<D, I, J, I, J>, TensorTuple<TensorRank4<D, K, L, I, J>, TensorTuple<TensorRank4<D, I, J, K, L>, TensorRank4<D, K, L, K, L>>>>
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Hessian for TensorTuple<TensorRank4<D, I, J, I, J>, TensorTuple<TensorRank4<D, K, L, I, J>, TensorTuple<TensorRank4<D, I, J, K, L>, TensorRank4<D, K, L, K, L>>>>
Source§fn entry(&self, row: usize, column: usize) -> TensorRank0
fn entry(&self, row: usize, column: usize) -> TensorRank0
The entry at the given (row, column) position.
Source§fn fill_into(self, square_matrix: &mut SquareMatrix)
fn fill_into(self, square_matrix: &mut SquareMatrix)
Fills the Hessian into a square matrix.
Source§fn retain_from(self, _retained: &[bool]) -> SquareMatrix
fn retain_from(self, _retained: &[bool]) -> SquareMatrix
Return only the retained indices.
Source§impl<B1, B2, S1, S2, const D: usize> HyperelasticViscoplasticElements<TensorTuple<S1, S2>, D> for Blocks<B1, B2>where
B1: HyperelasticViscoplasticElements<S1, D>,
B2: HyperelasticViscoplasticElements<S2, D>,
S1: Tensor,
S2: Tensor,
impl<B1, B2, S1, S2, const D: usize> HyperelasticViscoplasticElements<TensorTuple<S1, S2>, D> for Blocks<B1, B2>where
B1: HyperelasticViscoplasticElements<S1, D>,
B2: HyperelasticViscoplasticElements<S2, D>,
S1: Tensor,
S2: Tensor,
fn helmholtz_free_energy( &self, nodal_coordinates: &NodalCoordinates<D>, state_variables: &TensorTuple<S1, S2>, ) -> Result<Scalar, ElementModelError>
Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Jacobian for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Jacobian for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
Source§fn fill_into_chained(self, other: Vector, vector: &mut Vector)
fn fill_into_chained(self, other: Vector, vector: &mut Vector)
Fills the Jacobian chained with a vector into another vector.
Source§fn retain_from(self, _retained: &[bool]) -> Vector
fn retain_from(self, _retained: &[bool]) -> Vector
Return only the retained indices.
Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Mul<&TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>> for &Matrix
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Mul<&TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>> for &Matrix
Source§fn mul(
self,
tensor_tuple: &TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>,
) -> Self::Output
fn mul( self, tensor_tuple: &TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>, ) -> Self::Output
Performs the
* operation. Read moreSource§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Mul<&TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>> for &Vector
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Mul<&TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>> for &Vector
Source§fn mul(
self,
tensor_tuple: &TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>,
) -> Self::Output
fn mul( self, tensor_tuple: &TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>, ) -> Self::Output
Performs the
* operation. Read moreSource§impl<T1, T2> Mul<&f64> for TensorTuple<T1, T2>
impl<T1, T2> Mul<&f64> for TensorTuple<T1, T2>
Source§type Output = TensorTuple<T1, T2>
type Output = TensorTuple<T1, T2>
The resulting type after applying the
* operator.Source§impl<T1, T2> Mul<f64> for &TensorTuple<T1, T2>
impl<T1, T2> Mul<f64> for &TensorTuple<T1, T2>
Source§type Output = TensorTuple<T1, T2>
type Output = TensorTuple<T1, T2>
The resulting type after applying the
* operator.Source§impl<T1, T2> Mul<f64> for TensorTuple<T1, T2>
impl<T1, T2> Mul<f64> for TensorTuple<T1, T2>
Source§type Output = TensorTuple<T1, T2>
type Output = TensorTuple<T1, T2>
The resulting type after applying the
* operator.Source§impl<T1, T2> MulAssign<&f64> for TensorTuple<T1, T2>
impl<T1, T2> MulAssign<&f64> for TensorTuple<T1, T2>
Source§fn mul_assign(&mut self, tensor_rank_0: &TensorRank0)
fn mul_assign(&mut self, tensor_rank_0: &TensorRank0)
Performs the
*= operation. Read moreSource§impl<T1, T2> MulAssign<f64> for TensorTuple<T1, T2>
impl<T1, T2> MulAssign<f64> for TensorTuple<T1, T2>
Source§fn mul_assign(&mut self, tensor_rank_0: TensorRank0)
fn mul_assign(&mut self, tensor_rank_0: TensorRank0)
Performs the
*= operation. Read moreSource§impl<T1, T2> PartialEq for TensorTuple<T1, T2>
impl<T1, T2> PartialEq for TensorTuple<T1, T2>
Source§fn eq(&self, other: &TensorTuple<T1, T2>) -> bool
fn eq(&self, other: &TensorTuple<T1, T2>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Solution for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Solution for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
Source§fn decrement_from(&mut self, other: &Vector)
fn decrement_from(&mut self, other: &Vector)
Decrements the solution from another vector.
Source§fn decrement_from_chained(&mut self, other: &mut Vector, vector: Vector)
fn decrement_from_chained(&mut self, other: &mut Vector, vector: Vector)
Decrements the solution chained with a vector from another vector.
Source§fn decrement_from_retained(&mut self, _retained: &[bool], _other: &Vector)
fn decrement_from_retained(&mut self, _retained: &[bool], _other: &Vector)
Decrements the solution from another vector on retained entries.
Source§impl<T1, T2> Sub<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
impl<T1, T2> Sub<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Sub<&Vector> for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Sub<&Vector> for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
Source§type Output = TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
type Output = TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
The resulting type after applying the
- operator.Source§impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Sub<Vector> for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
impl<const D: usize, const I: usize, const J: usize, const K: usize, const L: usize> Sub<Vector> for TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
Source§type Output = TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
type Output = TensorTuple<TensorRank2<D, I, J>, TensorRank2<D, K, L>>
The resulting type after applying the
- operator.Source§impl<T1, T2> Sub for &TensorTuple<T1, T2>
impl<T1, T2> Sub for &TensorTuple<T1, T2>
Source§impl<T1, T2> Sub for TensorTuple<T1, T2>
impl<T1, T2> Sub for TensorTuple<T1, T2>
Source§impl<T1, T2> SubAssign<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
impl<T1, T2> SubAssign<&TensorTuple<T1, T2>> for TensorTuple<T1, T2>
Source§fn sub_assign(&mut self, tensor_tuple: &Self)
fn sub_assign(&mut self, tensor_tuple: &Self)
Performs the
-= operation. Read moreSource§impl<T1, T2> SubAssign for TensorTuple<T1, T2>
impl<T1, T2> SubAssign for TensorTuple<T1, T2>
Source§fn sub_assign(&mut self, tensor_tuple: Self)
fn sub_assign(&mut self, tensor_tuple: Self)
Performs the
-= operation. Read moreSource§impl<T1, T2> Sum for TensorTuple<T1, T2>
impl<T1, T2> Sum for TensorTuple<T1, T2>
Source§impl<T1, T2> Tensor for TensorTuple<T1, T2>
impl<T1, T2> Tensor for TensorTuple<T1, T2>
Source§fn full_contraction(&self, tensor_tuple: &Self) -> TensorRank0
fn full_contraction(&self, tensor_tuple: &Self) -> TensorRank0
Returns the full contraction with another tensor.
Source§fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>
fn iter_mut(&mut self) -> impl Iterator<Item = &mut Self::Item>
Returns an iterator that allows modifying each value. Read more
Source§fn norm_inf(&self) -> TensorRank0
fn norm_inf(&self) -> TensorRank0
Returns the infinity norm.
Source§fn norm_l1(&self) -> TensorRank0
fn norm_l1(&self) -> TensorRank0
Returns the L1 (Manhattan) norm.
Source§fn norm_p_sum(&self, p: TensorRank0) -> TensorRank0
fn norm_p_sum(&self, p: TensorRank0) -> TensorRank0
Returns the sum of p-th powers of absolute values (used internally by
norm_p).Source§fn error_count_zero(&self, tol_abs: Scalar, tol_rel: Scalar) -> Option<usize>
fn error_count_zero(&self, tol_abs: Scalar, tol_rel: Scalar) -> Option<usize>
Returns number of nonzero entries given absolute and relative tolerances, compared against zero.
Source§fn error_count(
&self,
other: &Self,
tol_abs: Scalar,
tol_rel: Scalar,
) -> Option<usize>
fn error_count( &self, other: &Self, tol_abs: Scalar, tol_rel: Scalar, ) -> Option<usize>
Returns number of different entries given absolute and relative tolerances.
Source§fn norm(&self) -> TensorRank0
fn norm(&self) -> TensorRank0
Returns the tensor norm.
Source§fn norm_p(&self, p: TensorRank0) -> TensorRank0
fn norm_p(&self, p: TensorRank0) -> TensorRank0
Returns the Minkowski (Lp) norm.
Source§fn norm_squared(&self) -> TensorRank0
fn norm_squared(&self) -> TensorRank0
Returns the tensor norm squared.
Source§fn normalized(self) -> Self
fn normalized(self) -> Self
Returns the tensor normalized.
Source§impl<C1, C2, Y1, Y2> Viscoplastic<TensorTuple<TensorTuple<TensorRank2<3, 2, 0>, Y1>, Y2>> for ElasticViscoplasticAdditiveViscoplastic<C1, C2, Y1, Y2>
impl<C1, C2, Y1, Y2> Viscoplastic<TensorTuple<TensorTuple<TensorRank2<3, 2, 0>, Y1>, Y2>> for ElasticViscoplasticAdditiveViscoplastic<C1, C2, Y1, Y2>
Source§fn initial_state(
&self,
) -> ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>
fn initial_state( &self, ) -> ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>
Returns the initial state of the variables.
Source§fn plastic_evolution(
&self,
mandel_stress: MandelStressElastic,
state_variables: &ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>,
) -> Result<ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>, ConstitutiveError>
fn plastic_evolution( &self, mandel_stress: MandelStressElastic, state_variables: &ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>, ) -> Result<ViscoplasticStateVariables<TensorTuple<ViscoplasticStateVariables<Y1>, Y2>>, ConstitutiveError>
Calculates and returns the plastic evolution. Read more
Source§fn rate_sensitivity(&self) -> Scalar
fn rate_sensitivity(&self) -> Scalar
Returns the rate_sensitivity parameter.
Source§fn reference_flow_rate(&self) -> Scalar
fn reference_flow_rate(&self) -> Scalar
Returns the reference flow rate.
Source§fn plastic_stretching_rate(
&self,
deviatoric_mandel_stress: MandelStressElastic,
yield_stress: Scalar,
) -> Result<StretchingRatePlastic, ConstitutiveError>
fn plastic_stretching_rate( &self, deviatoric_mandel_stress: MandelStressElastic, yield_stress: Scalar, ) -> Result<StretchingRatePlastic, ConstitutiveError>
Calculates and returns the rate of plastic stretching. Read more
impl<T1, T2> StructuralPartialEq for TensorTuple<T1, T2>
Auto Trait Implementations§
impl<T1, T2> Freeze for TensorTuple<T1, T2>
impl<T1, T2> RefUnwindSafe for TensorTuple<T1, T2>where
T1: RefUnwindSafe,
T2: RefUnwindSafe,
impl<T1, T2> Send for TensorTuple<T1, T2>
impl<T1, T2> Sync for TensorTuple<T1, T2>
impl<T1, T2> Unpin for TensorTuple<T1, T2>
impl<T1, T2> UnsafeUnpin for TensorTuple<T1, T2>where
T1: UnsafeUnpin,
T2: UnsafeUnpin,
impl<T1, T2> UnwindSafe for TensorTuple<T1, T2>where
T1: UnwindSafe,
T2: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T> AssertEq<&'a T> for T
impl<'a, T> AssertEq<&'a T> for T
fn eq(a: T, b: &'a T) -> Result<(), AssertionError>
fn eq_within_tols(tols: &Assert, a: T, b: &'a T) -> Result<(), AssertionError>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more