PARALLEL module

Description

Module that enables parallel computation in Chrono.

This module implements parallel computing algorithms that can be used as a faster alternative to the default simulation algorithms in Chrono::Engine. This is achieved using OpenMP, CUDA, Thrust, etc.

For additional information, see:

Collaboration diagram for PARALLEL module:

Modules

 Physics objects
 
 Unilateral constraints
 
 Collision objects
 
 Solvers
 
 Math utilities
 

Classes

struct  chrono::shape_container
 Structure of arrays containing contact shape information. More...
 
struct  chrono::host_container
 Structure of arrays containing simulation data. More...
 
class  chrono::ChParallelDataManager
 Global data manager for Chrono::Parallel. More...
 
class  chrono::collision_measures
 Collision_measures. More...
 
class  chrono::solver_measures
 Solver measures. More...
 
class  chrono::measures_container
 Aggregate of collision and solver measures. More...
 
class  chrono::collision_settings
 Chrono::Parallel collision_settings. More...
 
class  chrono::solver_settings
 Chrono::Parallel solver_settings. More...
 
class  chrono::settings_container
 Aggregate of all settings for Chrono::Parallel. More...
 

Macros

#define Thrust_Inclusive_Scan_Sum(x, y)
 
#define Thrust_Sort_By_Key(x, y)   thrust::sort_by_key(THRUST_PAR x.begin(), x.end(), y.begin())
 
#define Run_Length_Encode(y, z, w)
 
#define Thrust_Inclusive_Scan(x)   thrust::inclusive_scan(THRUST_PAR x.begin(), x.end(), x.begin())
 
#define Thrust_Exclusive_Scan(x)   thrust::exclusive_scan(THRUST_PAR x.begin(), x.end(), x.begin())
 
#define Thrust_Fill(x, y)   thrust::fill(x.begin(), x.end(), y)
 
#define Thrust_Sort(x)   thrust::sort(THRUST_PAR x.begin(), x.end())
 
#define Thrust_Count(x, y)   thrust::count(THRUST_PAR x.begin(), x.end(), y)
 
#define Thrust_Sequence(x)   thrust::sequence(x.begin(), x.end())
 
#define Thrust_Equal(x, y)   thrust::equal(THRUST_PAR x.begin(), x.end(), y.begin())
 
#define Thrust_Max(x)   x[thrust::max_element(THRUST_PAR x.begin(), x.end()) - x.begin()]
 
#define Thrust_Min(x)   x[thrust::min_element(THRUST_PAR x.begin(), x.end()) - x.begin()]
 
#define Thrust_Total(x)   thrust::reduce(THRUST_PAR x.begin(), x.end())
 
#define Thrust_Unique(x)   thrust::unique(THRUST_PAR x.begin(), x.end()) - x.begin();
 
#define DBG(x)   printf(x);
 

Enumerations

enum  chrono::SolverType {
  chrono::SolverType::STEEPEST_DESCENT, chrono::SolverType::GRADIENT_DESCENT, chrono::SolverType::CONJUGATE_GRADIENT, chrono::SolverType::CONJUGATE_GRADIENT_SQUARED,
  chrono::SolverType::BICONJUGATE_GRADIENT, chrono::SolverType::BICONJUGATE_GRADIENT_STAB, chrono::SolverType::MINIMUM_RESIDUAL, chrono::SolverType::QUASI_MINIMUM_RESIDUAL,
  chrono::SolverType::APGD, chrono::SolverType::APGDREF, chrono::SolverType::JACOBI, chrono::SolverType::GAUSS_SEIDEL,
  chrono::SolverType::PDIP, chrono::SolverType::BB, chrono::SolverType::SPGQP
}
 Iterative solver type. More...
 
enum  chrono::SolverMode { chrono::SolverMode::NORMAL, chrono::SolverMode::SLIDING, chrono::SolverMode::SPINNING, chrono::SolverMode::BILATERAL }
 Enumeration for solver mode. More...
 
enum  chrono::CollisionSystemType { chrono::CollisionSystemType::COLLSYS_PARALLEL, chrono::CollisionSystemType::COLLSYS_BULLET_PARALLEL }
 Enumeration for the collision system type. More...
 
enum  chrono::NarrowPhaseType { chrono::NarrowPhaseType::NARROWPHASE_MPR, chrono::NarrowPhaseType::NARROWPHASE_R, chrono::NarrowPhaseType::NARROWPHASE_HYBRID_MPR }
 Enumeration of narrow-phase collision methods. More...
 
enum  chrono::SystemType { chrono::SystemType::SYSTEM_NSC, chrono::SystemType::SYSTEM_SMC }
 Enumeration for system type. More...
 
enum  chrono::BilateralType {
  chrono::BODY_BODY, chrono::SHAFT_SHAFT, chrono::SHAFT_SHAFT_SHAFT, chrono::SHAFT_BODY,
  chrono::SHAFT_SHAFT_BODY, chrono::UNKNOWN
}
 Enumeration for bilateral constraint types. More...
 
enum  chrono::LoggingLevel {
  chrono::LoggingLevel::LOG_NONE, chrono::LoggingLevel::LOG_INFO, chrono::LoggingLevel::LOG_TRACE, chrono::LoggingLevel::LOG_WARNING,
  chrono::LoggingLevel::LOG_ERROR
}
 Supported Logging Levels. More...
 

Functions

template<typename Enumeration >
auto chrono::as_integer (Enumeration const value) -> typename std::underlying_type< Enumeration >::type
 Explicit conversion of scoped enumeration to int (e.g. for streaming).
 

Macro Definition Documentation

◆ Run_Length_Encode

#define Run_Length_Encode (   y,
  z,
 
)
Value:
(thrust::reduce_by_key(THRUST_PAR y.begin(), y.end(), thrust::constant_iterator<uint>(1), z.begin(), w.begin()) \
.second) - \
w.begin()

◆ Thrust_Inclusive_Scan_Sum

#define Thrust_Inclusive_Scan_Sum (   x,
 
)
Value:
thrust::inclusive_scan(THRUST_PAR x.begin(), x.end(), x.begin()); \
y = x.back();

Enumeration Type Documentation

◆ BilateralType

Enumeration for bilateral constraint types.

Enumerator
BODY_BODY 

constraints between two rigid bodies

SHAFT_SHAFT 

constraints between two 1-D shaft elements

SHAFT_SHAFT_SHAFT 

constraints involving 3 1-D shaft elements

SHAFT_BODY 

constraints between a shaft and a rigid body

SHAFT_SHAFT_BODY 

constraints involving two shafts and one rigid body

UNKNOWN 

unknow constraint type

◆ CollisionSystemType

Enumeration for the collision system type.

Enumerator
COLLSYS_PARALLEL 

default collision system

COLLSYS_BULLET_PARALLEL 

Bullet-based collision system.

◆ LoggingLevel

enum chrono::LoggingLevel
strong

Supported Logging Levels.

Enumerator
LOG_NONE 

no logging

LOG_INFO 

info

LOG_TRACE 

tracing

LOG_WARNING 

warnings

LOG_ERROR 

errors

◆ NarrowPhaseType

Enumeration of narrow-phase collision methods.

Enumerator
NARROWPHASE_MPR 

Minkovski Portal Refinement.

NARROWPHASE_R 

analytical collision detection

NARROWPHASE_HYBRID_MPR 

analytical method with fallback on MPR

◆ SolverMode

enum chrono::SolverMode
strong

Enumeration for solver mode.

Enumerator
NORMAL 

solve only normal contact impulses

SLIDING 

solve for contact and sliding friction impulses

SPINNING 

solve for rolling resistance impulses

BILATERAL 

solve for bilateral Lagrange multipliers

◆ SolverType

enum chrono::SolverType
strong

Iterative solver type.

Enumerator
STEEPEST_DESCENT 

steepest descent

GRADIENT_DESCENT 

gradient descent

CONJUGATE_GRADIENT 

conjugate gradient

CONJUGATE_GRADIENT_SQUARED 

conjugate gradient squared

BICONJUGATE_GRADIENT 

BiCG.

BICONJUGATE_GRADIENT_STAB 

BiCGStab.

MINIMUM_RESIDUAL 

MINRES (minimum residual)

QUASI_MINIMUM_RESIDUAL 

Quasi MINRES.

APGD 

Accelerated Projected Gradient Descent.

APGDREF 

reference implementation for APGD

JACOBI 

Jacobi.

GAUSS_SEIDEL 

Gauss-Seidel.

PDIP 

Primal-Dual Interior Point.

BB 

Barzilai-Borwein.

SPGQP 

Spectral Projected Gradient (QP projection)

◆ SystemType

enum chrono::SystemType
strong

Enumeration for system type.

Used so that parts of the code that have been "flattened" can know what type of system is used.

Enumerator
SYSTEM_NSC 

system using non-smooth (complementarity) contact

SYSTEM_SMC 

system using smooth (penalty) contact