Struct nphysics2d::object::FEMSurface [−][src]
Expand description
A deformable surface using FEM to simulate linear elasticity.
The surface is described by a set of triangle elements. This implements an isoparametric approach where the interpolations are linear.
Implementations
Retrieves a reference to the user-defined user-data attached to this object.
Retrieves a mutable reference to the user-defined user-data attached to this object.
Sets the user-defined data attached to this object.
Replace by None
the user-defined data attached to this object and returns the old value.
The position of this body in generalized coordinates.
The velocity of this body in generalized coordinates.
The mutable velocity of this body in generalized coordinates.
Sets the plastic properties of this deformable surface.
Note that large plasticity creep coefficient can yield to significant instability.
Sets the young modulus of this deformable surface.
Sets the poisson ratio of this deformable surface.
Returns the triangles at the boundary of this surface.
Each element of the returned Vec
is a tuple containing the 3 indices of the triangle
vertices, and the index of the corresponding triangle element.
Returns a triangle mesh at the boundary of this surface as well as a mapping between the mesh vertices and this surface degrees of freedom and the mapping between the mesh triangles and this surface body parts (the triangle elements).
The output is (triangle mesh, deformation indices, element to body part map).
Computes the DeformableColliderDesc
that can generate a collider covering the boundary polyline of this FEM surface.
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.
Renumber degrees of freedom so that the deformation_indices[i]
-th DOF becomes the i
-th one.
Restrict the specified node acceleration to always be zero so it can be controlled manually by the user at the velocity level.
Mark all nodes as non-kinematic.
Trait Implementations
Update the dynamics property of this deformable surface.
Update the dynamics property of this deformable surface.
Whether this body is affected by gravity.
Enable or disable gravity for this body.
If this is a deformable body, returns its deformed positions.
If this is a deformable body, returns a mutable reference to its deformed positions.
Updates the kinematics, e.g., positions and jacobians, of this body.
Reset the timestep-specific dynamic information of this body.
Clear all the update flags of this body.
The flags tracking what modifications were applied to a body.
Applies a generalized displacement to this body.
The status of this body.
Set the status of this body.
Information regarding activation and deactivation (sleeping) of this body.
The generalized accelerations at each degree of freedom of this body.
The generalized velocities of this body.
The companion ID of this body.
Set the companion ID of this body (may be reinitialized by nphysics).
The mutable generalized velocities of this body.
Integrate the position of this body.
Force the activation of this body with the given level of energy.
Put this body to sleep.
Sets the energy bellow which this body is put to sleep. Read more
Transform the given point expressed in material coordinates to world-space.
Transform the given point expressed in material coordinates to world-space.
Transform the given point expressed in material coordinates to world-space.
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<'_, N>>,
out_vel: Option<&mut N>
)
fn fill_constraint_geometry(
&self,
part: &dyn BodyPart<N>,
_: usize,
center: &Point<N>,
force_dir: &ForceDirection<N>,
j_id: usize,
wj_id: usize,
jacobians: &mut [N],
inv_r: &mut N,
ext_vels: Option<&DVectorSlice<'_, N>>,
out_vel: Option<&mut N>
)
Fills all the jacobians (and the jacobians multiplied by the inverse augmented mass matrix) for a
constraint applying a force at the point center
(relative to the body part’s center of mass) and
the direction dir
. Read more
Returns true
if this bodies contains internal constraints that need to be solved.
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<'_, N>,
_: &IntegrationParameters<N>
)
fn setup_internal_velocity_constraints(
&mut self,
_: &DVectorSlice<'_, N>,
_: &IntegrationParameters<N>
)
Initializes the internal velocity constraints of a body.
For warmstarting the solver, modifies the delta velocity applied by the internal constraints of this body.
Execute one step for the iterative resolution of this body’s internal velocity constraints.
Execute one step for the iterative resolution of this body’s internal position constraints.
Gets the velocity of the given point of this body.
Apply a force at a given local point of a part of this body.
Apply a force at the center of mass of a part of this body.
Apply a local force at the center of mass of a part of this body.
Apply a force at a given point of a part of this body.
Apply a local force at a given point of a part of this body.
Apply a local force at a given local point of a part of this body.
Update whether this body needs to be waken up after a user-interaction.
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
fn add_local_inertia_and_com(
&mut self,
_part_index: usize,
_com: Point<N>,
_inertia: Inertia<N>
)
Add the given inertia to the local inertia of this body part.
The number of degrees of freedom (DOF) of this body, taking its status into account. Read more
The velocity of the specified body part, taking this body status into account. Read more
Whether or not the status of this body is dynamic.
Whether or not the status of this body is kinematic.
Auto Trait Implementations
impl<N> !RefUnwindSafe for FEMSurface<N>
impl<N> Send for FEMSurface<N>
impl<N> Sync for FEMSurface<N>
impl<N> Unpin for FEMSurface<N> where
N: Unpin,
impl<N> !UnwindSafe for FEMSurface<N>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.