[][src]Struct shallow_water::sta2dfft::D2FFT

pub struct D2FFT {
    pub nx: usize,
    pub ny: usize,
    pub xfactors: [usize; 5],
    pub yfactors: [usize; 5],
    pub xtrig: Vec<f64>,
    pub ytrig: Vec<f64>,
}

Fields

nx: usizeny: usizexfactors: [usize; 5]yfactors: [usize; 5]xtrig: Vec<f64>ytrig: Vec<f64>

Implementations

impl D2FFT[src]

pub fn new(
    nx: usize,
    ny: usize,
    lx: f64,
    ly: f64,
    kx: &mut [f64],
    ky: &mut [f64]
) -> Self
[src]

This subroutine performs the initialisation work for all subsequent transform and derivative routines. It calls the initfft() routine from the supproting 1d FFT module for transforms in both x and y directions. The routine then defines the two wavenumber arrays, one in each direction.

pub fn ptospc(&self, rvar: ArrayViewMut2<'_, f64>, svar: ArrayViewMut2<'_, f64>)[src]

Performs a physical -> spectral transform of a variable rvar(ny,nx) periodic in x and y, and returns the result (transposed) in svar(nx,ny). *** Note rvar is destroyed on return. ***

pub fn spctop(&self, svar: ArrayViewMut2<'_, f64>, rvar: ArrayViewMut2<'_, f64>)[src]

Performs a spectral -> physical transform of a variable svar(nx,ny) periodic in x and y and returns the result (transposed) in rvar(ny,nx). *** Note svar is destroyed on return. ***

pub fn xderiv(
    &self,
    rkx: &[f64],
    var: ArrayView2<'_, f64>,
    der: ArrayViewMut2<'_, f64>
)
[src]

Computes der = d(var)/dx, spectrally, for a variable var(nx,ny) periodic in x and y. *** both var and der are spectral ***

pub fn yderiv(
    &self,
    rky: &[f64],
    var: ArrayView2<'_, f64>,
    der: ArrayViewMut2<'_, f64>
)
[src]

Computes der = d(var)/dy, spectrally, for a variable var(nx,ny) periodic in x and y. *** both var and der are spectral ***

Trait Implementations

impl Clone for D2FFT[src]

impl Debug for D2FFT[src]

impl<'de> Deserialize<'de> for D2FFT[src]

impl PartialEq<D2FFT> for D2FFT[src]

impl Serialize for D2FFT[src]

impl StructuralPartialEq for D2FFT[src]

Auto Trait Implementations

impl RefUnwindSafe for D2FFT

impl Send for D2FFT

impl Sync for D2FFT

impl Unpin for D2FFT

impl UnwindSafe for D2FFT

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.