Struct gmt_dos_clients_fem::DiscreteStateSpace

source ·
pub struct DiscreteStateSpace<'a, T: Solver + Default> {
    pub facesheet_nodes: Option<HashMap<u8, Vec<f64>>>,
    /* private fields */
}
Expand description

This structure is the state space model builder based on a builder pattern design

Fields§

§facesheet_nodes: Option<HashMap<u8, Vec<f64>>>

Implementations§

source§

impl<'a, T: Solver + Default> DiscreteStateSpace<'a, T>

source

pub fn set_facesheet_nodes(self) -> Result<Self, StateSpaceError>

source

pub fn fem_info(&self) -> &Self

Prints information about the FEM

source

pub fn sampling(self, sampling: f64) -> Self

Set the sampling rate on Hz of the discrete state space model

source

pub fn proportional_damping(self, zeta: f64) -> Self

Set the same proportional damping coefficients to all the modes

source

pub fn use_static_gain_compensation(self) -> Self

source

pub fn eigen_frequencies(self, eigen_frequencies: Vec<(usize, f64)>) -> Self

Overwrites some eigen frequencies

The overwritten frequencies are specified as (index,value) where index is the corresponding eigen mode index and value is the new eigen frequency in Hz

source

pub fn max_eigen_frequency(self, max_eigen_frequency: f64) -> Self

Truncates the eigen frequencies to and including max_eigen_frequency

The number of modes is set accordingly

source

pub fn truncate_hankel_singular_values( self, hankel_singular_values_threshold: f64 ) -> Self

Truncates the hankel singular values

source

pub fn hankel_frequency_lower_bound( self, hankel_frequency_lower_bound: f64 ) -> Self

Frequency lower bound for Hankel singular value truncation (default: 0Hz)

source

pub fn dump_eigen_frequencies<P: AsRef<Path>>(self, path: P) -> Self

Saves the eigen frequencies to a pickle data file

source

pub fn ins<U>(self) -> Self
where Vec<Option<Inputs>>: FemIo<U>, U: 'static + UniqueIdentifier + Send + Sync,

Sets the model input based on the input type

source

pub fn ins_with<U>(self, transform: DMatrixView<'a, f64>) -> Self
where Vec<Option<Inputs>>: FemIo<U>, U: 'static + UniqueIdentifier + Send + Sync,

source

pub fn ins_by_name<S: Into<String>>( self, names: Vec<S> ) -> Result<Self, StateSpaceError>

Sets the model inputs based on the FEM inputs nomenclature

source

pub fn ins_with_by_name<S: Into<String>>( self, names: Vec<S>, transforms: Vec<DMatrixView<'a, f64>> ) -> Result<Self, StateSpaceError>

source

pub fn outs<U>(self) -> Self
where Vec<Option<Outputs>>: FemIo<U>, U: 'static + UniqueIdentifier + Send + Sync,

Sets the model output based on the output type

source

pub fn outs_with<U>(self, transform: DMatrixView<'a, f64>) -> Self
where Vec<Option<Outputs>>: FemIo<U>, U: 'static + UniqueIdentifier + Send + Sync,

source

pub fn outs_by_name<S: Into<String>>( self, names: Vec<S> ) -> Result<Self, StateSpaceError>

Sets the model outputs based on the FEM outputs nomenclature

source

pub fn outs_with_by_name<S: Into<String>>( self, names: Vec<S>, transforms: Vec<DMatrixView<'a, f64>> ) -> Result<Self, StateSpaceError>

source

pub fn including_m1( self, sids: Option<Vec<u8>> ) -> Result<Self, StateSpaceError>

source

pub fn including_asms( self, sids: Option<Vec<u8>>, ins_transforms: Option<Vec<DMatrixView<'a, f64>>>, outs_transforms: Option<Vec<DMatrixView<'a, f64>>> ) -> Result<Self, StateSpaceError>

source

pub fn hankel_singular_value(w: f64, z: f64, b: &[f64], c: &[f64]) -> f64

Returns the Hankel singular value for a given eigen mode

source

pub fn hankel_singular_values(&self) -> Result<Vec<f64>, StateSpaceError>

Computes the Hankel singular values

source

pub fn reduced_hankel_singular_values( &mut self ) -> Result<Vec<f64>, StateSpaceError>

Computes the Hankel singular values for the FEM reduced to some inputs and some outputs

source

pub fn static_gain(&self) -> Option<DMatrix<f64>>

Returns the FEM static gain

source

pub fn build(self) -> Result<DiscreteModalSolver<T>, StateSpaceError>

Trait Implementations§

source§

impl<'a, T: Default + Solver + Default> Default for DiscreteStateSpace<'a, T>

source§

fn default() -> DiscreteStateSpace<'a, T>

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

impl<'a, T: Solver + Default> From<FEM> for DiscreteStateSpace<'a, T>

source§

fn from(fem: FEM) -> Self

Creates a state space model builder from a FEM structure

source§

impl<'a, S: Solver + Default> TryFrom<DiscreteStateSpace<'a, S>> for DiscreteModalSolver<S>

§

type Error = StateSpaceError

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

fn try_from(dss: DiscreteStateSpace<'a, S>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a, T> Freeze for DiscreteStateSpace<'a, T>

§

impl<'a, T> !RefUnwindSafe for DiscreteStateSpace<'a, T>

§

impl<'a, T> Send for DiscreteStateSpace<'a, T>

§

impl<'a, T> Sync for DiscreteStateSpace<'a, T>

§

impl<'a, T> Unpin for DiscreteStateSpace<'a, T>
where T: Unpin,

§

impl<'a, T> !UnwindSafe for DiscreteStateSpace<'a, T>

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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V