Skip to main content

ElementLoad

Struct ElementLoad 

Source
pub struct ElementLoad {
    pub beam_uniform: [f64; 2],
    pub body: [f64; 2],
    pub edge_traction: [[f64; 2]; 4],
    pub edge_pressure: [f64; 4],
}
Expand description

The load on a 2D element: an additive accumulator with one field group per load kind, so that the sum of every pattern’s load on an element (each scaled by its factor) is just a field-wise sum. Uniform + Body is simply both fields set. Which kinds an element accepts is decided by ElementOps::accepts_load, checked by Domain::validate before any load is accumulated.

Component frames differ by kind: beam_uniform is in the element’s local axes (local x is the member axis), as in OpenSees’s -beamUniform; body, edge_traction and edge_pressure are in global axes (pressure along the inward normal).

Fields§

§beam_uniform: [f64; 2]

Beam-columns: uniform load (force/length) [wx, wy], wx along the member axis and wy transverse in local +y.

§body: [f64; 2]

Continuum elements: body force per unit volume [bx, by].

§edge_traction: [[f64; 2]; 4]

Continuum elements: traction [tx, ty] per unit edge length on edge k, which joins local node k to k + 1.

§edge_pressure: [f64; 4]

Continuum elements: pressure on edge k, positive acting into the element along the inward normal.

Implementations§

Source§

impl ElementLoad

Source

pub fn uniform(wx: f64, wy: f64) -> Self

A uniform beam load (the former ElementLoad::Uniform { wx, wy }).

Source

pub fn body(bx: f64, by: f64) -> Self

A body force per unit volume in global axes.

Source

pub fn edge_traction(edge: usize, tx: f64, ty: f64) -> Self

A global-axes traction per unit length on edge edge (0..4).

Source

pub fn edge_pressure(edge: usize, pressure: f64) -> Self

A pressure on edge edge (0..4), positive into the element.

Source

pub fn has_beam(&self) -> bool

Whether any beam-load field is nonzero.

Source

pub fn has_body(&self) -> bool

Whether the body force is nonzero.

Source

pub fn has_edge_from(&self, edges: usize) -> bool

Whether any edge >= edges carries a traction or pressure.

Source

pub fn has_edge(&self) -> bool

Whether any edge carries a traction or pressure.

Trait Implementations§

Source§

impl Add for ElementLoad

Source§

fn add(self, other: ElementLoad) -> ElementLoad

Field-wise sum — several loads on one element accumulate, as in OpenSees.

Source§

type Output = ElementLoad

The resulting type after applying the + operator.
Source§

impl Clone for ElementLoad

Source§

fn clone(&self) -> ElementLoad

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ElementLoad

Source§

impl Debug for ElementLoad

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ElementLoad

Source§

fn default() -> ElementLoad

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

impl ElementLoadComponents for ElementLoad

Component layout: [wx, wy, bx, by, t0x, t0y, p0, t1x, t1y, p1, t2x, t2y, p2, t3x, t3y, p3] (beam uniform, body force, then traction and pressure per edge).

Source§

const COUNT: usize = 16

Number of components (ElementLoad: 2, ElementLoad3: 3); the bound a recorder’s component index is checked against.
Source§

fn component(&self, index: usize) -> f64

Component index (ElementLoad: 0 = wx, 1 = wy; ElementLoad3: 0..3 = wx, wy, wz); 0.0 past the last.
Source§

impl Mul<f64> for ElementLoad

Source§

type Output = ElementLoad

The resulting type after applying the * operator.
Source§

fn mul(self, factor: f64) -> ElementLoad

Performs the * operation. Read more
Source§

impl PartialEq for ElementLoad

Source§

fn eq(&self, other: &ElementLoad) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ElementLoad

Auto Trait Implementations§

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
§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

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
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

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

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

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

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.