pub struct GravitySource<T, D>{ /* private fields */ }Expand description
A source for the gravitational force.
This source implements the force density
$$
\rho \vec g,
$$
where $\rho: \Omega \rightarrow \mathbb{R}_{\geq 0}$ is a density function and $\vec g \in \mathbb{R}^d$
is the $d$-dimensional graviational acceleration vector.
In conjunction with ElementSourceAssembler,
the source corresponds to the weak form term
$$
\int_\Omega \rho \vec g \, : \, \vec w \, \d{\vec X},
$$
where $\vec w: \Omega \rightarrow \mathbb{R}^d$ is a test function.Implementations§
Source§impl<T, D> GravitySource<T, D>
impl<T, D> GravitySource<T, D>
pub fn from_acceleration(gravitational_acceleration: OVector<T, D>) -> Self
Trait Implementations§
Source§impl<T, D> Clone for GravitySource<T, D>
impl<T, D> Clone for GravitySource<T, D>
Source§fn clone(&self) -> GravitySource<T, D>
fn clone(&self) -> GravitySource<T, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, D> Debug for GravitySource<T, D>
impl<T, D> Debug for GravitySource<T, D>
Source§impl<T, D> Operator<T, D> for GravitySource<T, D>
impl<T, D> Operator<T, D> for GravitySource<T, D>
Source§type SolutionDim = D
type SolutionDim = D
Solution dimension is the same as the spatial dimension.
Source§type Parameters = Density<T>
type Parameters = Density<T>
Density at the quadrature point.
Source§impl<T, D> SourceFunction<T, D> for GravitySource<T, D>
impl<T, D> SourceFunction<T, D> for GravitySource<T, D>
fn evaluate( &self, _coords: &OPoint<T, D>, Density: &Self::Parameters, ) -> OVector<T, Self::SolutionDim>
Auto Trait Implementations§
impl<T, D> !Freeze for GravitySource<T, D>
impl<T, D> !RefUnwindSafe for GravitySource<T, D>
impl<T, D> !Send for GravitySource<T, D>
impl<T, D> !Sync for GravitySource<T, D>
impl<T, D> !Unpin for GravitySource<T, D>
impl<T, D> !UnwindSafe for GravitySource<T, D>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.