-
Many of the Chrono classes now have members that are fixed-size vectorizable Eigen types. These classes overload their
operator new
to generate 16-byte-aligned pointers (using an Eigen-provided macro). - This takes care of situations where one must dynamically create objects of such classes; for more details, see the Eigen documentation.
-
If you need to create STL containers of such classes, you should use a custom allocator that always allocates aligned memory (such as the Eigen-provided
Eigen:aligned_allocator
); for more details, see the Eigen documentation. -
Finally, this requirement for aligned memory allocation has implications on creation of shared pointers. Indeed,
std::make_shared
usesplacement new
instead ofoperator new
. To address this issue and preserve encapsulation (as much as possible), Chrono provides custom replacement functions formake_shared
, available in thechrono_types
namespace. These functions will automatically infer if they can safely fallback onstd::make_shared
or else create a shared pointer with an alternative mechanism that ensures use of aligned memory.
As such, user code should always usechrono_types::make_shared
as inauto my_body = chrono_types::make_shared<ChBody>();std::shared_ptr< T > make_shared(Args &&... args)Replacement for make_shared guaranteed to use operator new rather than placement new in order to avoi...Definition ChTypes.h:66
Chrono modules
-
Examples of the core features and capabilities of the Chrono library.
Chrono IRRLICHT module tutorials
Examples using run-time visualization with the Irrlicht module.
-
Examples of MBS dynamics in Chrono.
-
Examples of FEA in Chrono.
Chrono VEHICLE module tutorials
Examples of modeling and simulating ground vehicles in Chrono.
-
Examples of fluid-solid interaction problems using the FSI module.
Chrono POSTPROCESS module tutorials
Examples of producing postprocessing data (e.g. POVray or GNUplot output).
Chrono MULTICORE module tutorials
Examples of using the Multicore module.
-
Examples of granular dynamics problems using the GPU module.
Chrono PYTHON module tutorials
Examples of parsing Python programs.
Chrono MATLAB module tutorials
Examples of Matlab inter-operation.
Chrono socket communication tutorials
Examples of cosimulation with Simulink.
Chrono CASCADE module tutorials
Examples of loading CAD models.
Chrono OPENGL module tutorials
Examples of run-time visualization with the OpenGL module.
Chrono SENSOR module tutorials
Examples of modeling and simulating sensor for robots and autonomous vehicles in Chrono.
Chrono SYNCHRONO module tutorials
Examples of distributed simulation of autonomous vehicles and robots.
-
Examples of generating (exporting) and using (importing) Chrono FMUs.
-
Examples of integrating an external ROS-based autonomy stack in Chrono.
Other tools
-
Learn how to use PyChrono
-
Learn how to use Chrono::SolidWorks
Chrono training materials
-
Set of tutorial slides for Chrono release 3.0.0
Documentation guides
-
Guidelines on writing technical documentation for Chrono (for developers of new modules/features).