[][src]Struct nphysics3d::object::FEMVolume

pub struct FEMVolume<N: RealField> { /* fields omitted */ }

A deformable volume using FEM to simulate linear elasticity.

The volume is described by a set of tetrahedral elements. This implements an isoparametric approach where the interpolations are linear.

Methods

impl<N: RealField> FEMVolume<N>[src]

pub fn new(
    vertices: &[Point3<N>],
    tetrahedrons: &[Point4<usize>],
    pos: &Isometry3<N>,
    scale: &Vector3<N>,
    density: N,
    young_modulus: N,
    poisson_ratio: N,
    damping_coeffs: (N, N)
) -> Self
[src]

Initializes a new deformable volume from its tetrahedral elements.

pub fn user_data(&self) -> Option<&(dyn Any + Send + Sync)>[src]

Retrieves a reference to the user-defined user-data attached to this object.

pub fn user_data_mut(&mut self) -> Option<&mut (dyn Any + Send + Sync)>[src]

Retrieves a mutable reference to the user-defined user-data attached to this object.

pub fn set_user_data(
    &mut self,
    data: Option<Box<dyn Any + Send + Sync>>
) -> Option<Box<dyn Any + Send + Sync>>
[src]

Sets the user-defined data attached to this object.

pub fn take_user_data(&mut self) -> Option<Box<dyn Any + Send + Sync>>[src]

Replace by None the user-defined data attached to this object and returns the old value.

pub fn positions(&self) -> &DVector<N>[src]

The position of this body in generalized coordinates.

pub fn positions_mut(&mut self) -> &mut DVector<N>[src]

The position of this body in generalized coordinates.

pub fn velocities(&self) -> &DVector<N>[src]

The velocity of this body in generalized coordinates.

pub fn velocities_mut(&mut self) -> &mut DVector<N>[src]

The mutable velocity of this body in generalized coordinates.

pub fn set_plasticity(&mut self, strain_threshold: N, creep: N, max_force: N)[src]

Sets the plastic properties of this deformable volume.

Note that large plasticity creep coefficient can yield to significant instability.

pub fn set_young_modulus(&mut self, young_modulus: N)[src]

Sets the young modulus of this deformable surface.

pub fn set_poisson_ratio(&mut self, poisson_ratio: N)[src]

Sets the poisson ratio of this deformable surface.

pub fn boundary(&self) -> Vec<(Point3<usize>, usize)>[src]

Returns the triangles at the boundary of this volume.

Each element of the returned Vec is a tuple containing the 3 indices of the triangle vertices, and the index of the corresponding tetrahedral element.

pub fn boundary_mesh(&self) -> (TriMesh<N>, Vec<usize>, Vec<usize>)[src]

Returns a triangle mesh at the boundary of this volume as well as a mapping between the mesh vertices and this volume degrees of freedom and the mapping between the mesh triangles and this volume body parts (the tetrahedral elements).

The output is (triangle mesh, deformation indices, element to body part map).

pub fn boundary_collider_desc(&mut self) -> DeformableColliderDesc<N>[src]

Computes the DeformableColliderDesc that can generate a collider covering the boundary surface of this FEM volume.

As a side-effect, this will rearrange the degrees-of-freedom (DOF) of this FEM surface so that all the DOFs linked to the boundary collider are located at the beginning of the array of DOFs of this surface.

pub fn renumber_dofs(&mut self, deformation_indices: &[usize])[src]

Renumber degrees of freedom so that the deformation_indices[i]-th DOF becomes the i-th one.

pub fn cube(
    pos: &Isometry3<N>,
    extents: &Vector3<N>,
    nx: usize,
    ny: usize,
    nz: usize,
    density: N,
    young_modulus: N,
    poisson_ratio: N,
    damping_coeffs: (N, N)
) -> Self
[src]

Constructs an axis-aligned cube with regular subdivisions along each axis.

The cube is subdivided nx (resp. ny and nz) times along the x (resp. y and z) axis.

pub fn set_node_kinematic(&mut self, i: usize, is_kinematic: bool)[src]

Restrict the specified node acceleration to always be zero so it can be controlled manually by the user at the velocity level.

pub fn clear_kinematic_nodes(&mut self)[src]

Mark all nodes as non-kinematic.

Trait Implementations

impl<N: RealField> Body<N> for FEMVolume<N>[src]

fn update_dynamics(&mut self, dt: N)[src]

Update the dynamics property of this deformable volume.

Auto Trait Implementations

impl<N> !RefUnwindSafe for FEMVolume<N>

impl<N> Send for FEMVolume<N> where
    N: Scalar

impl<N> Sync for FEMVolume<N> where
    N: Scalar

impl<N> Unpin for FEMVolume<N> where
    N: Scalar + Unpin

impl<N> !UnwindSafe for FEMVolume<N>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,