pub trait NetBodyForceAndVirial<B, S, X, C> {
type Force: Outer;
// Required method
fn net_body_force_and_virial(
&self,
microstate: &Microstate<B, S, X, C>,
body_index: usize,
) -> (Self::Force, <Self::Force as Outer>::Tensor);
}Expand description
Sum all the forces and virials that act on a given body in a microstate.
See Rigid for an example.
The generic type names are:
B: TheBody::propertiestype.S: TheSite::propertiestype.C: Theboundarycondition type.
Required Associated Types§
Required Methods§
Sourcefn net_body_force_and_virial(
&self,
microstate: &Microstate<B, S, X, C>,
body_index: usize,
) -> (Self::Force, <Self::Force as Outer>::Tensor)
fn net_body_force_and_virial( &self, microstate: &Microstate<B, S, X, C>, body_index: usize, ) -> (Self::Force, <Self::Force as Outer>::Tensor)
Compute the net force and virial on a body in the microstate.
microstate describes the configuration and body_index is the index
of the body to compute.
Returns: TODO