You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For all mathematical vectors, arrays, matrices, and other multidimensional data we need to switch to the corresponding Eigen::VectorXd, Eigen::MatrixXd, Eigen::Vector3d, or similar object (depending on situation).
This applies to all multidimensional data that mathematical operations need to be performed on, and does not apply to lists of things. For now, continue using std::vector<> as a way to manage a dynamic sized list of objects. For example, the std::vector<chrono::ChBody> vector initialized in main should continue using an std::vector<>. Similarly, the velocity history vector which keeps track of the 6-dimensional velocity of the body at timestep t should continue using std::vector<Eigen::VectorXd> (where the size of X in the Eigen type vector is 6 and the std::vector index keeps track of the timestep t).
Note, Project Chrono has typedefs for many of the Eigen types. For consistency in this project use the bare Eigen type names instead of the typedefs included from Project Chrono when possible. For example, Eigen::MatrixXd should be used in place of chrono::ChMatrix (even though they are the same in the end).
Primarily, the reason for this change is efficiency. Eigen has many built in functions for mathematical operations on vectors and matrices that are incredibly efficient.
The text was updated successfully, but these errors were encountered:
Eigen::VectorXd
,Eigen::MatrixXd
,Eigen::Vector3d
, or similar object (depending on situation).std::vector<>
as a way to manage a dynamic sized list of objects. For example, thestd::vector<chrono::ChBody>
vector initialized in main should continue using anstd::vector<>
. Similarly, the velocity history vector which keeps track of the 6-dimensional velocity of the body at timestep t should continue usingstd::vector<Eigen::VectorXd>
(where the size of X in the Eigen type vector is 6 and the std::vector index keeps track of the timestep t).Eigen::MatrixXd
should be used in place ofchrono::ChMatrix
(even though they are the same in the end).The text was updated successfully, but these errors were encountered: