pub struct FEM {
pub model_description: String,
pub inputs: Vec<Option<Inputs>>,
pub outputs: Vec<Option<Outputs>>,
pub eigen_frequencies: Vec<f64>,
pub inputs_to_modal_forces: Vec<f64>,
pub modal_disp_to_outputs: Vec<f64>,
pub proportional_damping_vec: Vec<f64>,
pub static_gain: Option<Vec<f64>>,
pub n_io: (usize, usize),
/* private fields */
}
Expand description
GMT Finite Element Model
Fields§
§model_description: String
Model info
inputs: Vec<Option<Inputs>>
inputs properties
outputs: Vec<Option<Outputs>>
outputs properties
eigen_frequencies: Vec<f64>
mode shapes eigen frequencies [Hz]
inputs_to_modal_forces: Vec<f64>
inputs forces to modal forces matrix [n_modes,n_inputs]
(row wise)
modal_disp_to_outputs: Vec<f64>
mode shapes to outputs nodes [n_outputs,n_modes]
(row wise)
proportional_damping_vec: Vec<f64>
mode shapes damping coefficients
static_gain: Option<Vec<f64>>
§n_io: (usize, usize)
number of inputs and outputs before any model reduction
Implementations§
source§impl FEM
impl FEM
sourcepub fn from_zip_archive<P: AsRef<Path>>(path: P) -> Result<FEM>
pub fn from_zip_archive<P: AsRef<Path>>(path: P) -> Result<FEM>
Loads a FEM model, saved in a second order form, from a zip archive file
sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Loads a FEM model, saved in a second order form, from a zip archive file located in a directory given by the FEM_REPO
environment variable
The name of the zip file must be "modal_state_space_model_2ndOrder.zip
sourcepub fn eigen_frequencies_to_radians(&self) -> Vec<f64>
pub fn eigen_frequencies_to_radians(&self) -> Vec<f64>
Converts FEM eigen frequencies from Hz to radians
sourcepub fn keep_inputs(&mut self, id: &[usize]) -> &mut Self
pub fn keep_inputs(&mut self, id: &[usize]) -> &mut Self
Selects the inputs according to their natural ordering
sourcepub fn keep_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
pub fn keep_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
Selects the inputs according to their natural ordering and some properties matching
sourcepub fn keep_outputs(&mut self, id: &[usize]) -> &mut Self
pub fn keep_outputs(&mut self, id: &[usize]) -> &mut Self
Selects the outputs according to their natural ordering
sourcepub fn keep_outputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
pub fn keep_outputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
Selects the outputs according to their natural ordering and some properties matching
sourcepub fn filter_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
pub fn filter_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
Filters the inputs according to some properties matching
sourcepub fn remove_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
pub fn remove_inputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
Removes the inputs which properties do not match the predicate
sourcepub fn filter_outputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
pub fn filter_outputs_by<F>(&mut self, id: &[usize], pred: F) -> &mut Self
Filters the outputs according to some properties matching
sourcepub fn inputs2modes(&mut self) -> Vec<f64>
pub fn inputs2modes(&mut self) -> Vec<f64>
Returns the inputs 2 modes transformation matrix for the turned-on inputs
sourcepub fn input2modes(&self, id: usize) -> Option<Vec<f64>>
pub fn input2modes(&self, id: usize) -> Option<Vec<f64>>
Returns the inputs 2 modes transformation matrix for a given input
pub fn trim2input( &self, id: usize, matrix: &DMatrix<f64> ) -> Option<DMatrix<f64>>
sourcepub fn modes2outputs(&mut self) -> Vec<f64>
pub fn modes2outputs(&mut self) -> Vec<f64>
Returns the modes 2 outputs transformation matrix for the turned-on outputs
sourcepub fn modes2output(&self, id: usize) -> Option<Vec<f64>>
pub fn modes2output(&self, id: usize) -> Option<Vec<f64>>
Returns the modes 2 outputs transformation matrix for a given output
pub fn trim2output( &self, id: usize, matrix: &DMatrix<f64> ) -> Option<DMatrix<f64>>
sourcepub fn reduced_static_gain(&mut self) -> Option<DMatrix<f64>>
pub fn reduced_static_gain(&mut self) -> Option<DMatrix<f64>>
Return the static gain reduced to the turned-on inputs and outputs
sourcepub fn static_gain(&mut self) -> DMatrix<f64>
pub fn static_gain(&mut self) -> DMatrix<f64>
Returns the FEM static gain for the turned-on inputs and outputs
Trait Implementations§
source§impl<'de> Deserialize<'de> for FEM
impl<'de> Deserialize<'de> for FEM
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl RefUnwindSafe for FEM
impl Send for FEM
impl Sync for FEM
impl Unpin for FEM
impl UnwindSafe for FEM
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.