chrono::host_container Struct Reference

## Description

Structure of arrays containing simulation data.

#include <ChDataManager.h>

## Public Attributes

custom_vector< real3ct_force
Contact forces per contact.

custom_vector< real3ct_torque
Contact torques per contact.

custom_vector< real3ct_body_force
Total contact force on bodies.

custom_vector< real3ct_body_torque
Total contact torque on these bodies.

custom_vector< vec3 > shear_neigh
Neighbor list of contacting bodies and shapes.

custom_vector< real3shear_disp
Accumulated shear displacement for each neighbor.

custom_vector< real > contact_relvel_init
Initial relative normal velocity manitude per contact pair.

custom_vector< real > contact_duration
Accumulated contact duration, per contact pair.

custom_vector< int > ct_body_map
Mapping from all bodies in the system to bodies involved in a contact. More...

custom_vector< real3fric_rigid_rigid
This vector holds the friction information (composite material) as a triplet: x - Sliding friction, y - Rolling friction, z - Spinning Friction. More...

custom_vector< real > coh_rigid_rigid
Holds the cohesion value (composite material) for each contact. More...

custom_vector< real4compliance_rigid_rigid
Precomputed compliance (composite material) values for all contacts. More...

custom_vector< real2modulus_rigid_rigid
E_eff and G_eff.

custom_vector< real > cr_rigid_rigid
cr_eff (effective coefficient of restitution)

custom_vector< real4smc_rigid_rigid
kn, kt, gn, gt

custom_vector< real3pos_rigid

custom_vector< quaternionrot_rigid

custom_vector< char > active_rigid

custom_vector< char > collide_rigid

custom_vector< real > mass_rigid

custom_vector< real3pos_3dof

custom_vector< real3sorted_pos_3dof

custom_vector< real3vel_3dof

custom_vector< real3sorted_vel_3dof

custom_vector< int > bilateral_type
Bilateral constraint type (all supported constraints)

custom_vector< int > bilateral_mapping
Keeps track of active bilateral constraints.

custom_vector< real > shaft_rot
shaft rotation angles

custom_vector< real > shaft_inr
shaft inverse inertias

custom_vector< char > shaft_active
shaft active (not sleeping nor fixed) flags

custom_vector< float > sliding_friction
sliding coefficients of friction

custom_vector< float > cohesion
constant cohesion forces

CompressedMatrix< real > Nshur
This matrix, if used will hold D^TxM^-1xD in sparse form.

CompressedMatrix< real > D
The D Matrix hold the Jacobian for the entire system.

CompressedMatrix< real > D_T
D_T is the transpose of the D matrix, note that D_T is actually computed first and D is taken as the transpose. More...

CompressedMatrix< real > M
Mass matrix; if holding the full inertia tensor, M is block diagonal.

CompressedMatrix< real > M_inv
M_inv is the inverse mass matrix; if holding the full inertia tensor, M_inv is block diagonal.

CompressedMatrix< real > M_invD
M_invD holds M_inv multiplied by D. More...

DynamicVector< real > R_full
The right hand side of the system.

DynamicVector< real > R
The rhs of the system, changes during solve.

DynamicVector< real > b
Correction terms.

DynamicVector< real > s

DynamicVector< real > M_invk
Result of M_inv multiplied by vector of forces.

DynamicVector< real > v
This vector holds the velocities for all objects.

DynamicVector< real > hf
This vector holds h*forces, h is time step.

DynamicVector< real > gamma
Contact impulses. More...

DynamicVector< real > E
Compliance matrix elements. More...

DynamicVector< real > Fc
Contact forces (NSC)

## ◆ coh_rigid_rigid

 custom_vector chrono::host_container::coh_rigid_rigid

Holds the cohesion value (composite material) for each contact.

Similar to friction this is precomputed for all contacts in parallel. Used for NSC only.

## ◆ compliance_rigid_rigid

 custom_vector chrono::host_container::compliance_rigid_rigid

Precomputed compliance (composite material) values for all contacts.

Used for NSC only.

## ◆ ct_body_map

 custom_vector chrono::host_container::ct_body_map

Mapping from all bodies in the system to bodies involved in a contact.

For bodies that are currently not in contact, the mapping entry is -1. Otherwise, the mapping holds the appropriate index in the vectors above.

## ◆ D_T

 CompressedMatrix chrono::host_container::D_T

D_T is the transpose of the D matrix, note that D_T is actually computed first and D is taken as the transpose.

This is due to the way that blaze handles sparse matrix allocation, it is easier to do it on a per row basis.

## ◆ E

 DynamicVector chrono::host_container::E

Compliance matrix elements.

Note that E is a diagonal matrix and hence stored in a vector.

## ◆ fric_rigid_rigid

 custom_vector chrono::host_container::fric_rigid_rigid

This vector holds the friction information (composite material) as a triplet: x - Sliding friction, y - Rolling friction, z - Spinning Friction.

This is precomputed at every timestep for all contacts in parallel. Improves performance and reduces conditionals later on.

## ◆ gamma

 DynamicVector chrono::host_container::gamma

Contact impulses.

These are the unknowns solved for in the NSC formulation. Depending on the selected SolverMode, gamma is organized as follows (N is the number of rigid contacts):

• NORMAL [size(gamma) = N]
n1 n2 ... nN
• SLIDING [size(gamma) = 3N]
n1 n2 ... nN | u1 v1 u2 v2 ... uN vN
• SPINNING [size(gamma) = 6N]
n1 n2 ... nN | u1 v1 u2 v2 ... uN vN | tn1 tu1 tv1 tn2 tu2 tv2 ... tnN tuN tvN

If there are any bilateral constraints, the corresponding impulses are stored at the end of gamma.

## ◆ M_invD

 CompressedMatrix chrono::host_container::M_invD

M_invD holds M_inv multiplied by D.

This is done as a preprocessing step so that later, when the full matrix vector product is needed it can be performed in two steps, first R = Minv_D*x, and then D_T*R where R is just a temporary variable used here for illustrative purposes. In reality the entire operation happens inline without a temp variable.

The documentation for this struct was generated from the following file:
• /builds/uwsbel/chrono/src/chrono_multicore/ChDataManager.h