Skip to main content

NetBodyForceVirialAndTorque

Trait NetBodyForceVirialAndTorque 

Source
pub trait NetBodyForceVirialAndTorque<B, S, X, C> {
    type Force: Wedge + Outer;

    // Required method
    fn net_body_force_virial_and_torque(
        &self,
        microstate: &Microstate<B, S, X, C>,
        body_index: usize,
    ) -> (Self::Force, <Self::Force as Outer>::Tensor, <Self::Force as Wedge>::Bivector);
}
Expand description

Sum all the forces, virials, and torques that act on a given body in a microstate.

See Rigid for an example.

The generic type names are:

Required Associated Types§

Source

type Force: Wedge + Outer

The type of the result force.

Required Methods§

Source

fn net_body_force_virial_and_torque( &self, microstate: &Microstate<B, S, X, C>, body_index: usize, ) -> (Self::Force, <Self::Force as Outer>::Tensor, <Self::Force as Wedge>::Bivector)

Compute the net force, virial, and torque on a body in the microstate.

microstate describes the configuration and body_index is the index of the body to compute.

Returns: TODO

Implementors§

Source§

impl<V, B, S, X, C, F, R> NetBodyForceVirialAndTorque<B, S, X, C> for Rigid<F>
where V: Vector + Wedge + Default + Outer, B: Transform<S> + Orientation<Rotation = R> + Position<Position = V>, S: Position<Position = V>, F: NetSiteForceVirialAndTorque<B, S, X, C, Force = V>, R: Rotate<V>, V::Bivector: Default + Add<Output = V::Bivector> + AddAssign, V::Tensor: Default + AddAssign + Sub<Output = V::Tensor>,

Source§

type Force = V