pub struct Vs30Point {
pub lon: f64,
pub lat: f64,
pub vs30: f64,
pub dl: Option<f64>,
pub xvf: Option<u8>,
}
Expand description
Input point definition for which GMPE will be calculated.
Fields§
§lon: f64
Longitude in decimal degrees. Example: 142.23567
lat: f64
Latitude in decimal degrees. Example: 50.35927
vs30: f64
Average shear-wave velocity (Vs, in m/s) in the top 30 meters of soil.
dl: Option<f64>
Depth (in meters) to the subsurface layer where Vs reaches 1400 m/s at the site.
xvf: Option<u8>
Binary variable (0 or 1) indicating the site’s position relative to the volcanic front (specific to Japan).
Implementations§
Source§impl Vs30Point
impl Vs30Point
Sourcepub fn new(
lon: f64,
lat: f64,
vs30: f64,
dl: Option<f64>,
xvf: Option<u8>,
) -> Self
pub fn new( lon: f64, lat: f64, vs30: f64, dl: Option<f64>, xvf: Option<u8>, ) -> Self
Create a new Vs30Point instance.
§Arguments
lon
- Longitude in decimal degrees.lat
- Latitude in decimal degrees.vs30
- Average Vs in the top 30 meters.dl
- Depth to Vs=1400 m/s layer (optional).xvf
- Binary volcanic front position indicator (optional).
§Example
use ground_motion_lib::gmm::Vs30Point;
let vs30_point = Vs30Point::new(142.523, 52.913, 300., Some(250.), Some(1));
println!("Point is {vs30_point:?}");
Sourcepub fn get_gm<T: GroundMotionModeling>(
&self,
gmpe: &T,
eq: &Earthquake,
) -> GmpePoint
pub fn get_gm<T: GroundMotionModeling>( &self, gmpe: &T, eq: &Earthquake, ) -> GmpePoint
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Vs30Point
impl<'de> Deserialize<'de> for Vs30Point
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Vs30Point
impl RefUnwindSafe for Vs30Point
impl Send for Vs30Point
impl Sync for Vs30Point
impl Unpin for Vs30Point
impl UnwindSafe for Vs30Point
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
Mutably borrows from an owned value. Read more
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>
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 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>
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