Skip to main content

SphericalTensor

Struct SphericalTensor 

Source
pub struct SphericalTensor {
    pub ii: f64,
}
Expand description

Isotropic diagonal tensor: represents ii * I where I is the 3×3 identity. Maps to Foam::SphericalTensor<scalar> (SphericalTensorI.H).

Fields§

§ii: f64

Implementations§

Source§

impl SphericalTensor

Source

pub const ZERO: Self

The zero tensor (ii = 0).

Source

pub const IDENTITY: Self

The identity tensor (ii = 1).

Source

pub fn new(ii: f64) -> Self

Construct from the single isotropic component ii (the tensor is ii*I).

Source

pub fn tr(self) -> f64

Trace = 3 * ii

Source

pub fn mag_sqr(self) -> f64

Frobenius norm squared = 3 * ii²

Source

pub fn mag(self) -> f64

Source

pub fn diag_sqr(self) -> f64

Diagonal norm squared (sum of squared diagonal entries = 3*ii²)

Source

pub fn det(self) -> f64

Determinant = ii³

Source

pub fn inv(self) -> Self

Inverse: SphericalTensor(1/ii)

Source

pub fn double_inner(self, rhs: Self) -> f64

Double inner-product with itself: 3 * ii²

Source

pub fn lerp(a: Self, b: Self, t: f64) -> Self

Linear interpolation

Trait Implementations§

Source§

impl Add for SphericalTensor

Source§

type Output = SphericalTensor

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl Add<SphericalTensor> for SymmTensor

Source§

type Output = SymmTensor

The resulting type after applying the + operator.
Source§

fn add(self, spt: SphericalTensor) -> Self

Performs the + operation. Read more
Source§

impl Add<SphericalTensor> for Tensor

Source§

type Output = Tensor

The resulting type after applying the + operator.
Source§

fn add(self, st: SphericalTensor) -> Self

Performs the + operation. Read more
Source§

impl Add<SymmTensor> for SphericalTensor

Source§

type Output = SymmTensor

The resulting type after applying the + operator.
Source§

fn add(self, st: SymmTensor) -> SymmTensor

Performs the + operation. Read more
Source§

impl Add<Tensor> for SphericalTensor

Source§

type Output = Tensor

The resulting type after applying the + operator.
Source§

fn add(self, t: Tensor) -> Tensor

Performs the + operation. Read more
Source§

impl Clone for SphericalTensor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SphericalTensor

Source§

impl Debug for SphericalTensor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SphericalTensor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Div<SphericalTensor> for f64

scalar / SphericalTensor — maps to C++ operator/(Cmpt, SphericalTensor)

Source§

type Output = SphericalTensor

The resulting type after applying the / operator.
Source§

fn div(self, st: SphericalTensor) -> SphericalTensor

Performs the / operation. Read more
Source§

impl Div<f64> for SphericalTensor

Source§

type Output = SphericalTensor

The resulting type after applying the / operator.
Source§

fn div(self, s: f64) -> Self

Performs the / operation. Read more
Source§

impl From<SphericalTensor> for SymmTensor

Source§

fn from(st: SphericalTensor) -> Self

Converts to this type from the input type.
Source§

impl From<SphericalTensor> for Tensor

Source§

fn from(st: SphericalTensor) -> Self

Converts to this type from the input type.
Source§

impl Mul<SphericalTensor> for f64

Source§

type Output = SphericalTensor

The resulting type after applying the * operator.
Source§

fn mul(self, st: SphericalTensor) -> SphericalTensor

Performs the * operation. Read more
Source§

impl Mul<SphericalTensor> for SymmTensor

Source§

type Output = SymmTensor

The resulting type after applying the * operator.
Source§

fn mul(self, spt: SphericalTensor) -> Self

Performs the * operation. Read more
Source§

impl Mul<SphericalTensor> for Tensor

Source§

type Output = Tensor

The resulting type after applying the * operator.
Source§

fn mul(self, st: SphericalTensor) -> Self

Performs the * operation. Read more
Source§

impl Mul<SymmTensor> for SphericalTensor

Source§

type Output = SymmTensor

The resulting type after applying the * operator.
Source§

fn mul(self, st: SymmTensor) -> SymmTensor

Performs the * operation. Read more
Source§

impl Mul<Tensor> for SphericalTensor

Source§

type Output = Tensor

The resulting type after applying the * operator.
Source§

fn mul(self, t: Tensor) -> Tensor

Performs the * operation. Read more
Source§

impl Mul<f64> for SphericalTensor

Source§

type Output = SphericalTensor

The resulting type after applying the * operator.
Source§

fn mul(self, s: f64) -> Self

Performs the * operation. Read more
Source§

impl Neg for SphericalTensor

Source§

type Output = SphericalTensor

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl PartialEq for SphericalTensor

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SphericalTensor

Source§

impl Sub for SphericalTensor

Source§

type Output = SphericalTensor

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl Sub<SphericalTensor> for SymmTensor

Source§

type Output = SymmTensor

The resulting type after applying the - operator.
Source§

fn sub(self, spt: SphericalTensor) -> Self

Performs the - operation. Read more
Source§

impl Sub<SphericalTensor> for Tensor

Source§

type Output = Tensor

The resulting type after applying the - operator.
Source§

fn sub(self, st: SphericalTensor) -> Self

Performs the - operation. Read more
Source§

impl Sub<SymmTensor> for SphericalTensor

Source§

type Output = SymmTensor

The resulting type after applying the - operator.
Source§

fn sub(self, st: SymmTensor) -> SymmTensor

Performs the - operation. Read more
Source§

impl Sub<Tensor> for SphericalTensor

Source§

type Output = Tensor

The resulting type after applying the - operator.
Source§

fn sub(self, t: Tensor) -> Tensor

Performs the - operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.