qtruss/material.rs
1//! Describes an element material.
2
3#[derive(Clone, Copy, Debug)]
4/// An element material.
5pub struct Material {
6 /// Modulus of elasticity
7 pub e: f64,
8 /// Density
9 pub density: f64,
10 /// Lower bound on internal stress (tension positive)
11 pub minstress: Option<f64>,
12 /// Upper bound on internal stress (tension positive)
13 pub maxstress: Option<f64>,
14}
15
16impl Material {
17 /// Constructs a new material.
18 pub fn new(
19 e: f64,
20 density: f64,
21 minstress: Option<f64>,
22 maxstress: Option<f64>,
23 ) -> Self {
24 Self {
25 e,
26 density,
27 minstress,
28 maxstress,
29 }
30 }
31}