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>
impl<'a, T: Solver + Default> DiscreteStateSpace<'a, T>
pub fn set_facesheet_nodes(self) -> Result<Self, StateSpaceError>
sourcepub fn sampling(self, sampling: f64) -> Self
pub fn sampling(self, sampling: f64) -> Self
Set the sampling rate on Hz of the discrete state space model
sourcepub fn proportional_damping(self, zeta: f64) -> Self
pub fn proportional_damping(self, zeta: f64) -> Self
Set the same proportional damping coefficients to all the modes
sourcepub fn use_static_gain_compensation(self) -> Self
pub fn use_static_gain_compensation(self) -> Self
sourcepub fn eigen_frequencies(self, eigen_frequencies: Vec<(usize, f64)>) -> Self
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
sourcepub fn max_eigen_frequency(self, max_eigen_frequency: f64) -> Self
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
sourcepub fn truncate_hankel_singular_values(
self,
hankel_singular_values_threshold: f64
) -> Self
pub fn truncate_hankel_singular_values( self, hankel_singular_values_threshold: f64 ) -> Self
Truncates the hankel singular values
sourcepub fn hankel_frequency_lower_bound(
self,
hankel_frequency_lower_bound: f64
) -> Self
pub fn hankel_frequency_lower_bound( self, hankel_frequency_lower_bound: f64 ) -> Self
Frequency lower bound for Hankel singular value truncation (default: 0Hz)
sourcepub fn dump_eigen_frequencies<P: AsRef<Path>>(self, path: P) -> Self
pub fn dump_eigen_frequencies<P: AsRef<Path>>(self, path: P) -> Self
Saves the eigen frequencies to a pickle data file
pub fn ins_with<U>(self, transform: DMatrixView<'a, f64>) -> Self
sourcepub fn ins_by_name<S: Into<String>>(
self,
names: Vec<S>
) -> Result<Self, StateSpaceError>
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
pub fn ins_with_by_name<S: Into<String>>( self, names: Vec<S>, transforms: Vec<DMatrixView<'a, f64>> ) -> Result<Self, StateSpaceError>
pub fn outs_with<U>(self, transform: DMatrixView<'a, f64>) -> Self
sourcepub fn outs_by_name<S: Into<String>>(
self,
names: Vec<S>
) -> Result<Self, StateSpaceError>
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
pub fn outs_with_by_name<S: Into<String>>( self, names: Vec<S>, transforms: Vec<DMatrixView<'a, f64>> ) -> Result<Self, StateSpaceError>
pub fn including_m1( self, sids: Option<Vec<u8>> ) -> Result<Self, StateSpaceError>
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>
sourcepub fn hankel_singular_value(w: f64, z: f64, b: &[f64], c: &[f64]) -> f64
pub fn hankel_singular_value(w: f64, z: f64, b: &[f64], c: &[f64]) -> f64
Returns the Hankel singular value for a given eigen mode
sourcepub fn hankel_singular_values(&self) -> Result<Vec<f64>, StateSpaceError>
pub fn hankel_singular_values(&self) -> Result<Vec<f64>, StateSpaceError>
Computes the Hankel singular values
sourcepub fn reduced_hankel_singular_values(
&mut self
) -> Result<Vec<f64>, StateSpaceError>
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
sourcepub fn static_gain(&self) -> Option<DMatrix<f64>>
pub fn static_gain(&self) -> Option<DMatrix<f64>>
Returns the FEM static gain
pub fn build(self) -> Result<DiscreteModalSolver<T>, StateSpaceError>
Trait Implementations§
source§impl<'a, T: Default + Solver + Default> Default for DiscreteStateSpace<'a, T>
impl<'a, T: Default + Solver + Default> Default for DiscreteStateSpace<'a, T>
source§fn default() -> DiscreteStateSpace<'a, T>
fn default() -> DiscreteStateSpace<'a, T>
source§impl<'a, S: Solver + Default> TryFrom<DiscreteStateSpace<'a, S>> for DiscreteModalSolver<S>
impl<'a, S: Solver + Default> TryFrom<DiscreteStateSpace<'a, S>> for DiscreteModalSolver<S>
§type Error = StateSpaceError
type Error = StateSpaceError
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> 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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.