Tutorials
Dynamic objects of classes with fixed-size vectorizable Eigen object members
  • 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 uses placement new instead of operator new. To address this issue and preserve encapsulation (as much as possible), Chrono provides custom replacement functions for make_shared, available in the chrono_types namespace. These functions will automatically infer if they can safely fallback on std::make_shared or else create a shared pointer with an alternative mechanism that ensures use of aligned memory.
    As such, user code should always use chrono_types::make_shared as in
    auto my_body = chrono_types::make_shared<ChBody>();

Chrono modules

Other tools

Chrono training materials

Documentation guides

  • Documentation tutorials

    Guidelines on writing technical documentation for Chrono (for developers of new modules/features).

virtual int ComputeConvexDecomposition()
Perform the convex decomposition.
Definition: ChCConvexDecomposition.cpp:516
Constant function: y = C
Definition: ChFunction_Const.h:26
virtual void AddBody(std::shared_ptr< ChBody > body)
Attach a body to this assembly.
Definition: ChAssembly.cpp:103
void SetTimestepper(std::shared_ptr< ChTimestepper > mstepper)
Set the timestepper object to be used for time integration.
Definition: ChSystem.h:133
Sine function y = sin (phase + w*x ) where w=2*PI*freq.
Definition: ChFunction_Sine.h:27
Interface base class for scalar functions of the type: y= f(x)
Definition: ChFunction_Base.h:45
void Set_y0(double m_y0)
The value for x=0;.
Definition: ChFunction_Ramp.h:48
bool InsertFunct(std::shared_ptr< ChFunction > myfx, double duration, double weight=1, bool c0=false, bool c1=false, bool c2=false, int position=-1)
Insert function after the fx with defined "position" index in list.
Definition: ChFunction_Sequence.cpp:108
void Remove(std::shared_ptr< ChPhysicsItem > item)
Remove arbitrary ChPhysicsItem that was added to the assembly.
Definition: ChAssembly.cpp:223
std::string GetChronoDataFile(const std::string &filename)
Obtain the complete path to the specified filename, given relative to the Chrono data directory (thre...
Definition: ChGlobal.cpp:95
Namespace with classes for collision detection.
Definition: ChCCollisionInfo.cpp:16
Eigen::Matrix< T, N, 1 > ChVectorN
Column vector with fixed size (known at compile time).
Definition: ChMatrix.h:72
bool IsObject(const T &root)
Tell if "root" has sub values (i.e.
Definition: ChArchiveExplorer.h:108
Operation between functions:
Definition: ChFunction_Operation.h:31
static void drawGrid(irr::video::IVideoDriver *driver, double ustep=0.1, double vstep=0.1, int nu=20, int nv=20, ChCoordsys<> mpos=CSYSNORM, irr::video::SColor mcol=irr::video::SColor(50, 80, 110, 110), bool use_Zbuffer=false)
Easy-to-use function to draw grids in 3D space, with given orientation, color and spacing.
Definition: ChIrrTools.cpp:695
MINimum RESidual method.
Material data for a surface for use with non-smooth (complementarity) contact method.
Definition: ChMaterialSurfaceNSC.h:25
const std::vector< std::shared_ptr< ChLinkBase > > & Get_linklist() const
Get the list of links.
Definition: ChAssembly.h:101
Base class for 1D integrand T=f(x) to be used in ChQuadrature.
Definition: ChQuadrature.h:83
Easy-to-use class for quick creation of rigid bodies with a cylindrical shape.
Definition: ChBodyEasy.h:78
As ChIntegrable1D, but for 2D integrand T=f(x,y) to be used in ChQuadrature.
Definition: ChQuadrature.h:95
A triangle mesh with connectivity info: vertices can be shared between faces.
Definition: ChTriangleMeshConnected.h:30
static void SetDefaultSuggestedMargin(double mmargin)
Using this function BEFORE you start creating collision shapes, it will make all following collision ...
Definition: ChCCollisionModel.cpp:40
Geometric object representing an sequence of other ChLine objects, The ChLine objects are assumed to ...
Definition: ChLinePath.h:27
Easy-to-use class for quick creation of rigid bodies with a box shape.
Definition: ChBodyEasy.h:101
void Setup()
Scans all the seq.of functions and setup the timings and continuity offsets, to satisfy all constrain...
Definition: ChFunction_Sequence.cpp:203
static void fillIrrlichtMeshFromCascade(scene::IMesh *pMesh, const TopoDS_Shape &mshape, double deflection=1, bool relative_deflection=false, double angulardeflection=0.5, video::SColor clr=video::SColor(255, 255, 255, 255))
Function to use to convert a OpenCASCADE shape into a Irrlicht mesh, so that it can be used for visua...
Definition: ChIrrCascadeMeshTools.h:138
static void add_typical_Camera(irr::IrrlichtDevice *device, irr::core::vector3df mpos=irr::core::vector3df(0, 0, -8), irr::core::vector3df mtarg=irr::core::vector3df(0, 0, 0))
A very basic and simple function which is just a shortcut to avoid lot of typing when someone wants t...
Definition: ChIrrWizard.cpp:53
COORDSYS:
Definition: ChCoordsys.h:38
void SetSolverForceTolerance(double tolerance)
Set a solver tolerance threshold at force level (default: not specified).
Definition: ChSystem.h:211
Type
Available types of solvers.
Definition: ChSolver.h:36
Class for exceptions for throw() catch() mechanism.
Definition: ChException.h:25
Class for referencing a ChLine that can be visualized in some way.
Definition: ChLineShape.h:25
void SetParameters(unsigned int mMaxHullCount=256, unsigned int mMaxMergeHullCount=256, unsigned int mMaxHullVertices=64, float mConcavity=0.2f, float mSmallClusterThreshold=0.0f, float mFuseTolerance=1e-9)
Set the parameters for this convex decomposition algorithm.
Definition: ChCConvexDecomposition.cpp:491
virtual void Update(bool update_assets=true) override
Updates all the auxiliary data and children of bodies, forces, links, given their current state.
Definition: ChSystem.cpp:559
Sparse left-looking rank-revealing QR factorization.
void SetContactsDrawMode(ChIrrTools::eCh_ContactsDrawMode mm)
Set the draw mode for contacts.
Definition: ChIrrAppInterface.h:112
const std::vector< std::shared_ptr< fea::ChMesh > > & Get_meshlist() const
Get the list of meshes.
Definition: ChAssembly.h:103
Class for a Python parser.
Definition: ChPython.h:27
void ShowHierarchy(ChStreamOutAscii &m_file, int level=0)
Writes the hierarchy of contained bodies, markers, etc.
Definition: ChAssembly.cpp:1115
std::shared_ptr< ChTimestepper > GetTimestepper() const
Get the timestepper currently used for time integration.
Definition: ChSystem.h:136
void AssetUpdateAll()
For all items in a ChSystem, this function sets up the Irrlicht nodes corresponding to the geometric ...
Definition: ChIrrApp.cpp:49
void Run(const char *program)
Execute a program.
Definition: ChPython.cpp:46
ChApiIrr irr::scene::ISceneNode * addChBodySceneNode_easyBox(ChSystem *asystem, irr::scene::ISceneManager *amanager, double mmass=1.0, const ChVector<> &position=ChVector<>(0, 0, 0), const ChQuaternion<> &rotation=ChQuaternion<>(1, 0, 0, 0), const ChVector<> &size=ChVector<>(1, 1, 1), irr::scene::ISceneNode *aparent=0, irr::s32 mid=-1)
Easy-to-use function which creates a ChBodySceneNode representing a box, ready to use for collisions ...
This is a specialized class for BINARY output on system's file,.
Definition: ChStream.h:776
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > ChMatrixDynamic
Dense matrix with dynamic size (i.e., with size a run-time variable, unknown at compile time).
Definition: ChMatrix.h:47
ChLog & GetLog()
Global function to get the current ChLog object.
Definition: ChLog.cpp:39
Linear function (like a straight ramp): y = y0 + x * speed
Definition: ChFunction_Ramp.h:27
Interface for functions that uses a callback to return a Y value, as a ZOH (zero order hold) block.
Definition: ChFunction_Setpoint.h:108
Geometric object representing a segment in 3D space with two end points.
Definition: ChLineSegment.h:26
bool DoStaticLinear()
Solve the position of static equilibrium (and the reactions).
Definition: ChSystem.cpp:1379
Class for lotting data with GNUplot.
Definition: ChGnuPlot.h:56
virtual void Reset(void)
Access directly the wrapped J.W.Ratcliff convex decomposition object although it shouldn't be necessa...
Definition: ChCConvexDecomposition.cpp:312
void SetTimestep(double val)
Set/Get the time step for time integration.
Definition: ChIrrAppInterface.cpp:532
void RebindExternalPointer(void *mptr, size_t ID)
Use the following to declare object IDs that must not be de-serialized but rather be 'rebind' to alre...
Definition: ChArchive.h:1144
virtual void AddLink(std::shared_ptr< ChLinkBase > link)
Attach a link to this assembly.
Definition: ChAssembly.cpp:125
Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > ChMatrixRef
Reference to a dense matrix expression, with double coefficients.
Definition: ChMatrix.h:86
Loads acting on a single ChLoadable item.
Definition: ChLoad.h:203
Definition of a 3x3 fixed size matrix to represent 3D rotations and inertia tensors.
Definition: ChMatrix33.h:31
Class for wrapping the HACD convex decomposition code revisited by John Ratcliff.
Definition: ChCConvexDecomposition.h:280
static void add_typical_Logo(irr::IrrlichtDevice *device, const std::string &mlogofilename=GetChronoDataFile("logo_chronoengine_alpha.png"))
A very basic and simple function which is just a shortcut to avoid lot of typing when someone wants t...
Definition: ChIrrWizard.cpp:20
static void add_typical_Sky(irr::IrrlichtDevice *device, const std::string &mtexturedir=GetChronoDataFile("skybox/"))
A very basic and simple function which is just a shortcut to avoid lot of typing when someone wants t...
Definition: ChIrrWizard.cpp:40
Class for state of time-integrable objects.
Definition: ChState.h:34
void AssetBind(std::shared_ptr< ChPhysicsItem > mitem)
Shortcut to add and bind a ChIrrNodeAsset to an item, if it has not been added previously.
Definition: ChIrrApp.cpp:37
This is a specialized class for BINARY input from wrapped std::istream,.
Definition: ChStream.h:701
This is a specialized class for BINARY input on system's file,.
Definition: ChStream.h:802
void TransformLocalToParent(const ChFrameMoving< Real > &local, ChFrameMoving< Real > &parent) const
This function transforms a frame from 'this' local coordinate system to parent frame coordinate syste...
Definition: ChFrameMoving.h:409
void SetStepManage(bool val)
If set to true, you can use DoStep() in the simulation loop to advance the simulation by one timestep...
Definition: ChIrrAppInterface.h:84
Special MBD 3x4 matrix [Fp(q)], as in [Fp(q)] * [Fm(q)]' = [A(q)].
Definition: ChMatrixMBD.h:48
Special MBD 3x4 matrix [Gw(q)], as in absolute angular speed conversion.
Definition: ChMatrixMBD.h:148
Namespace with classes for the POSTPROCESS module.
Definition: ChApiPostProcess.h:54
Repeat function: y = __/__/__/
Definition: ChFunction_Repeat.h:36
static void add_typical_Lights(irr::IrrlichtDevice *device, irr::core::vector3df pos1=irr::core::vector3df(30.f, 100.f, 30.f), irr::core::vector3df pos2=irr::core::vector3df(30.f, 80.f, -30.f), double rad1=290, double rad2=190, irr::video::SColorf col1=irr::video::SColorf(0.7f, 0.7f, 0.7f, 1.0f), irr::video::SColorf col2=irr::video::SColorf(0.7f, 0.8f, 0.8f, 1.0f))
A very basic and simple function which is just a shortcut to avoid lot of typing when someone wants t...
Definition: ChIrrWizard.cpp:25
static void drawCircle(irr::video::IVideoDriver *driver, double radius, ChCoordsys<> mpos=CSYSNORM, irr::video::SColor mcol=irr::video::SColor(255, 0, 0, 0), int mresolution=36, bool use_Zbuffer=false)
Easy-to-use function to draw a circle line in 3D space, with given color.
Definition: ChIrrTools.cpp:625
bool GetString(const char *variable, std::string &return_val)
Retrieve a value of an existing string variable.
Definition: ChPython.cpp:174
virtual bool AddTriangleMesh(const geometry::ChTriangleMesh &tm)
Add a triangle mesh soup, by passing an entire ChTriangleMesh object.
Definition: ChCConvexDecomposition.cpp:483
Base class for assets that carry basic informations about the surface color for visualization assets.
Definition: ChColorAsset.h:28
Eigen::Map< Eigen::Matrix< Real, 3, 1 > > eigen()
View this 3d vector as an Eigen vector.
Definition: ChVector.h:69
Class for referencing a triangle mesh shape that can be visualized in some way.
Definition: ChTriangleMeshShape.h:28
void BuildBeam(std::shared_ptr< ChMesh > mesh, std::shared_ptr< ChBeamSectionAdvanced > sect, const int N, const ChVector<> A, const ChVector<> B, const ChVector<> Ydir)
Add beam FEM elements to the mesh to create a segment beam from point A to point B,...
Definition: ChBuilderBeam.cpp:25
irr::scene::ILightSceneNode * AddLightWithShadow(irr::core::vector3df pos, irr::core::vector3df aim, double radius, double mnear, double mfar, double angle, irr::u32 resolution=512, irr::video::SColorf color=irr::video::SColorf(1.f, 1.f, 1.f, 1.f), bool directional=false, bool clipborder=true)
Add a point light that cast shadow (using soft shadows/shadow maps) Note that the quality of the shad...
Definition: ChIrrAppInterface.h:209
ChFrame: a class for coordinate systems in 3D space.
Definition: ChFrame.h:42
Class to add some GUI to Irrlicht+ChronoEngine applications.
Definition: ChIrrApp.h:29
Utility class for creating complex beams using ChElementBeamEuler elements, for example subdivides a ...
Definition: ChBuilderBeam.h:39
ChQuaternion< double > Q_from_AngAxis(double angle, const ChVector< double > &axis)
Get the quaternion from an angle of rotation and an axis, defined in abs coords.
Definition: ChQuaternion.cpp:100
Eigen::SparseMatrix< double, Eigen::RowMajor, int > ChSparseMatrix
Sparse matrix representation.
Definition: ChMatrix.h:119
Class for a box shape that can be visualized in some way.
Definition: ChBoxShape.h:24
Class of loaders for ChLoadableUVW objects (which support volume loads) of atomic type,...
Definition: ChLoaderUVW.h:153
const ChApi ChQuaternion< double > QUNIT
Constant unit quaternion: {1, 0, 0, 0} , corresponds to no rotation (diagonal rotation matrix)
A helper class to provide some basic mechanism of C++ reflection (introspection).
Definition: ChArchiveExplorer.h:29
virtual void EndScene()
Call this to end the scene draw at the end of each animation frame.
Definition: ChIrrAppInterface.cpp:578
bool FetchValue(P &val, const T &root, const std::string &property_name)
Search a property in "root" and directly assign it to "vl".
Definition: ChArchiveExplorer.h:58
Namespace with classes for the Irrlicht module.
Definition: ChApiIrr.h:48
Definition: ChRealtimeStep.h:36
Accelerated Projected Gradient Descent.
virtual void Setup() override
Counts the number of bodies and links.
Definition: ChSystem.cpp:492
Projected SOR (Successive Over-Relaxation)
void SetMaxPenetrationRecoverySpeed(double mval)
For the default stepper, you can limit the speed of exiting from penetration situations.
Definition: ChSystem.h:163
Class for referencing a sphere shape that can be visualized in some way.
Definition: ChSphereShape.h:24
virtual void WriteConvexHullsAsWavefrontObj(ChStreamOutAscii &mstream)
Save the computed convex hulls as a Wavefront file using the '.obj' fileformat, with each hull as a s...
Definition: ChCConvexDecomposition.cpp:413
A single object of this class must be instantiated before using all classes related to sockets,...
Definition: ChSocketFramework.h:28
Class for cosimulation interface.
Definition: ChCosimulation.h:38
void start()
Start the timer.
Definition: ChTimer.h:143
static void drawChFunction(irr::IrrlichtDevice *mdevice, ChFunction *fx, double xmin=0, double xmax=1, double ymin=-1, double ymax=1, int mx=10, int my=290, int sx=300, int sy=100)
Definition: ChIrrTools.cpp:535
void Q_from_AngY(Real angleY)
Set the quaternion from an angle of rotation about Y axis.
Definition: ChQuaternion.h:327
virtual double Get_y(double x) const override
Return the y value of the function, at position x.
Definition: ChFunction_Ramp.h:43
static void drawSegment(irr::video::IVideoDriver *driver, ChVector<> mstart, ChVector<> mend, irr::video::SColor mcol=irr::video::SColor(255, 0, 0, 0), bool use_Zbuffer=false)
Easy-to-use function to draw segment lines in 3D space, with given color.
Definition: ChIrrTools.cpp:594
Class for passing basic data about contact pairs.
Definition: ChCCollisionInfo.h:27
Namespace for classes which represent basic geometric objects.
Definition: ChBasisToolsBspline.h:24
double GetChTime() const
Gets the simulation time of this object.
Definition: ChObject.h:63
This is a base class for serializing into archives.
Definition: ChArchive.h:789
Easy-to-use class for quick creation of rigid bodies with a triangle mesh shape, that has a REF csys ...
Definition: ChBodyEasy.h:183
This is a class for deserializing from XML archives.
Definition: ChArchiveXML.h:298
std::shared_ptr< ChPhysicsItem > Search(const char *name)
Search an item (body, link or other ChPhysics items) by name.
Definition: ChAssembly.cpp:304
const std::vector< std::shared_ptr< ChPhysicsItem > > & Get_otherphysicslist() const
Get the list of physics items that are not in the body or link lists.
Definition: ChAssembly.h:105
Class for wrapping the NvConvexDecomposition code by John W.
Definition: ChCConvexDecomposition.h:187
#define CHNVP(...)
Use this macro to mark a value, ex myarchive << CHNVP (myvalue, "mnemonic name") or,...
Definition: ChArchive.h:327
static ChVector< Real > TransformParentToLocal(const ChVector< Real > &parent, const ChVector< Real > &origin, const ChMatrix33< Real > &alignment)
This function transforms a point from the parent coordinate system to a local coordinate system,...
Definition: ChTransform.h:55
const std::vector< std::shared_ptr< ChBody > > & Get_bodylist() const
Get the list of bodies.
Definition: ChAssembly.h:99
void SetParameters(float mskinWidth, unsigned int mdecompositionDepth, unsigned int mmaxHullVertices, float mconcavityThresholdPercent, float mmergeThresholdPercent, float mvolumeSplitThresholdPercent, bool museInitialIslandGeneration, bool museIslandGeneration)
Set the parameters for this convex decomposition algorithm.
Definition: ChCConvexDecomposition.cpp:340
int DoStepDynamics(double m_step)
Advances the dynamical simulation for a single step, of length m_step.
Definition: ChSystem.cpp:1247
virtual double Get_y(double x) const override
Return the y value of the function, at position x.
Definition: ChFunction_Sine.cpp:29
void Set(Real x, Real y, Real z)
Set the three values of the vector at once.
Definition: ChVector.h:722
double SuggestSimulationStep(double max_step=0.02, double min_step=std::numeric_limits< double >::epsilon())
Call this function INSIDE the simulation loop, just ONCE per loop, to get the suggested time for the ...
Definition: ChRealtimeStep.h:58
std::vector< ChValue * > & FetchValues(T &root, const std::string &value_name)
Search one or more values in "root" and return reference to a vector with results.
Definition: ChArchiveExplorer.h:87
Class for setting a color (used by ChVisualization)
Definition: ChColor.h:25
static void drawPolyline(irr::video::IVideoDriver *driver, std::vector< ChVector<> > &mpoints, irr::video::SColor mcol=irr::video::SColor(255, 0, 0, 0), bool use_Zbuffer=false)
Easy-to-use function to draw a polyline in 3D space, given the array of points as a std::vector.
Definition: ChIrrTools.cpp:610
virtual void Reset(void)
Reset the input mesh data.
Definition: ChCConvexDecomposition.cpp:462
struct chrono::Shape Shape
Structure of data for sending a collision shape to a rank.
virtual int ComputeConvexDecomposition()
Perform the convex decomposition.
Definition: ChCConvexDecomposition.cpp:361
static void SetDefaultEffectiveCurvatureRadius(double eff_radius)
Set the default effective radius of curvature (for SMC contact).
Definition: ChCCollisionInfo.cpp:62
This is a base class for serializing from archives.
Definition: ChArchive.h:1114
static ChVector< Real > TransformLocalToParent(const ChVector< Real > &local, const ChVector< Real > &origin, const ChMatrix33< Real > &alignment)
This function transforms a point from the local reference frame to the parent reference frame.
Definition: ChTransform.h:79
Definition of general purpose 3d vector variables, such as points in 3D.
Definition: ChVector.h:35
This is a specialized class for BINARY output to wrapped std::ostream,.
Definition: ChStream.h:686
const std::string & GetChronoOutputPath()
Obtain the path to the output directory for Chrono demos.
Definition: ChGlobal.cpp:110
bool DoStaticNonlinear(int nsteps=10, bool verbose=false)
Solve the position of static equilibrium (and the reactions).
Definition: ChSystem.cpp:1430
static void alignIrrlichtNodeToChronoCsys(irr::scene::ISceneNode *mnode, const ChCoordsys<> &mcoords)
Function to align an Irrlicht object to a Chrono coordsys.
Definition: ChIrrTools.cpp:30
virtual double Get_y_dxdx(double x) const override
Return the ddy/dxdx double derivative of the function, at position x.
Definition: ChFunction_Sine.cpp:37
virtual void DoStep()
Call this important function inside a cycle like while(application.GetDevice()->run()) {....
Definition: ChIrrAppInterface.cpp:590
static void FromTetGenFile(std::shared_ptr< ChMesh > mesh, const char *filename_node, const char *filename_ele, std::shared_ptr< ChContinuumMaterial > my_material, ChVector<> pos_transform=VNULL, ChMatrix33<> rot_transform=ChMatrix33<>(1))
Load tetrahedrons from .node and .ele files as saved by TetGen.
Definition: ChMeshFileLoader.cpp:42
Base class for assets that define basic textures.
Definition: ChTexture.h:25
This is a class for serializing from binary archives.
Definition: ChArchiveBinary.h:118
Physical system.
Definition: ChSystem.h:68
virtual void SetSolverType(ChSolver::Type type)
Choose the solver type, to be used for the simultaneous solution of the constraints in dynamical simu...
Definition: ChSystem.cpp:149
Base interface class for convex decomposition.
Definition: ChCConvexDecomposition.h:33
void Q_from_AngZ(Real angleZ)
Set the quaternion from an angle of rotation about Z axis.
Definition: ChQuaternion.h:330
bool DoFrameDynamics(double m_endtime)
Performs integration until the m_endtime is exactly reached, but current time step may be automatical...
Definition: ChSystem.cpp:1601
virtual void RemoveBody(std::shared_ptr< ChBody > body)
Remove a body from this assembly.
Definition: ChAssembly.cpp:115
Class for a physical system in which contact is modeled using a smooth (penalty-based) method.
Definition: ChSystemSMC.h:31
void Add(std::shared_ptr< ChPhysicsItem > item)
Attach an arbitrary ChPhysicsItem (e.g.
Definition: ChAssembly.cpp:190
virtual bool GetConvexHullResult(unsigned int hullIndex, geometry::ChTriangleMesh &convextrimesh)=0
Get the n-th computed convex hull, by filling a ChTriangleMesh object that is passed as a parameter.
This is a specialized class for ASCII input on system's file,.
Definition: ChStream.h:817
Sparse supernodal LU factorization.
Special MBD 3x4 matrix [Fm(q)], as in [Fp(q)] * [Fm(q)]' = [A(q)].
Definition: ChMatrixMBD.h:71
std::shared_ptr< ChBody > & GetBody()
Returns reference to the shared pointer which references the rigid body wrapped by this scene node.
Definition: ChBodySceneNode.h:93
Recorder function:
Definition: ChFunction_Recorder.h:54
This is a class for serializing to XML file format.
Definition: ChArchiveXML.h:39
void Set_ang(double m_ang)
The angular coefficient.
Definition: ChFunction_Ramp.h:52
Markers are auxiliary reference frames which belong to rigid bodies and move together with them.
Definition: ChMarker.h:38
Class for defining a videocamera point of view with basic settings.
Definition: ChCamera.h:26
Class for exceptions that are thrown by TCP socket connections, used for example when connecting with...
Definition: ChExceptionSocket.h:33
void SetSolverMaxIterations(int max_iters)
Set the maximum number of iterations, if using an iterative solver.
Definition: ChSystem.cpp:123
ChFrameMoving: a class for coordinate systems in 3D space.
Definition: ChFrameMoving.h:38
ChVector< Real > TransformParentToLocal(const ChVector< Real > &parent) const
This function transforms a point from the parent coordinate system to a local coordinate system,...
Definition: ChCoordsys.h:249
ChVector vpA
coll.point on A, in abs coords
Definition: ChCCollisionInfo.h:31
void SetFloat(const char *variable, const double val)
Set a value of a floating point variable.
Definition: ChPython.cpp:104
Real & x()
Access to components.
Definition: ChVector.h:49
virtual double Get_y_dx(double x) const override
Return the dy/dx derivative of the function, at position x.
Definition: ChFunction_Ramp.h:44
void AssetUpdate(std::shared_ptr< ChPhysicsItem > mitem)
This function sets up the Irrlicht nodes corresponding to the geometric assets that are found in the ...
Definition: ChIrrApp.cpp:45
ChSystem * GetSystem() const
Get the pointer to the parent ChSystem()
Definition: ChPhysicsItem.h:58
Class for rigid bodies with an auxiliary reference frame.
Definition: ChBodyAuxRef.h:33
static void FromAbaqusFile(std::shared_ptr< ChMesh > mesh, const char *filename, std::shared_ptr< ChContinuumMaterial > my_material, std::map< std::string, std::vector< std::shared_ptr< ChNodeFEAbase > > > &node_sets, ChVector<> pos_transform=VNULL, ChMatrix33<> rot_transform=ChMatrix33<>(1), bool discard_unused_nodes=true)
Load tetrahedrons, if any, saved in a .inp file for Abaqus.
Definition: ChMeshFileLoader.cpp:199
double ChRandom()
Returns random value in (0..1) interval with Park-Miller method.
Definition: ChMathematics.cpp:53
static void drawSpring(irr::video::IVideoDriver *driver, double radius, ChVector<> start, ChVector<> end, irr::video::SColor mcol=irr::video::SColor(255, 0, 0, 0), int mresolution=65, double turns=5, bool use_Zbuffer=false)
Easy-to-use function to draw a spring in 3D space, with given color.
Definition: ChIrrTools.cpp:652
This is a class for deserializing from JSON archives.
Definition: ChArchiveJSON.h:298
ChCoordsys< Real > & GetCoord()
Return both current rotation and translation as a coordsystem object, with vector and quaternion.
Definition: ChFrame.h:201
virtual double Get_y_dx(double x) const override
Return the dy/dx derivative of the function, at position x.
Definition: ChFunction_Sine.cpp:33
virtual void SetSolver(std::shared_ptr< ChSolver > newsolver)
Attach a solver (derived from ChSolver) for use by this system.
Definition: ChSystem.cpp:205
Class defining quaternion objects, that is four-dimensional numbers, also known as Euler parameters.
Definition: ChQuaternion.h:44
Base class for composite material for a contact pair.
Definition: ChMaterialSurface.h:54
Class for a load acting on a single ChLoadable item, via ChLoader objects.
Definition: ChLoad.h:149
Class to add some GUI to Irrlicht + ChronoEngine applications.
Definition: ChIrrAppInterface.h:40
static void SetDefaultSuggestedEnvelope(double menv)
Using this function BEFORE you start creating collision shapes, it will make all following collision ...
Definition: ChCCollisionModel.cpp:36
void stop()
Stops the timer.
Definition: ChTimer.h:148
Utility class for creating complex beams using ChElementCableANCF elements, for example subdivides a ...
Definition: ChBuilderBeam.h:88
Constant acceleration function:
Definition: ChFunction_ConstAcc.h:31
Class for referencing a Wavefront/Alias .obj file containing a shape that can be visualized in some w...
Definition: ChObjShapeFile.h:22
void AssetBindAll()
Shortcut to add and bind a ChIrrNodeAsset to all items in a ChSystem.
Definition: ChIrrApp.cpp:41
Namespace with classes for the cosimulation module.
Definition: ChApiCosimulation.h:52
bool GetFloat(const char *variable, double &return_val)
Retrieve a value of an existing floating point variable.
Definition: ChPython.cpp:78
void BuildBeam(std::shared_ptr< ChMesh > mesh, std::shared_ptr< ChBeamSectionCable > sect, const int N, const ChVector<> A, const ChVector<> B)
Adds beam FEM elements to the mesh to create a segment beam from point A to point B,...
Definition: ChBuilderBeam.cpp:257
Eigen::Matrix< T, Eigen::Dynamic, 1, Eigen::ColMajor > ChVectorDynamic
Column vector with dynamic size (i.e., with size a run-time variable, unknown at compile time).
Definition: ChMatrix.h:62
virtual void BeginScene(bool backBuffer=true, bool zBuffer=true, irr::video::SColor color=irr::video::SColor(255, 0, 0, 0))
Call this to clean the canvas at the beginning of each animation frame.
Definition: ChIrrAppInterface.cpp:559
This is a class for serializing to binary archives.
Definition: ChArchiveBinary.h:25
virtual double Get_y_dx(double x) const override
Return the dy/dx derivative of the function, at position x.
Definition: ChFunction_Sequence.cpp:263
bool GetInteger(const char *variable, int &return_val)
Retrieve a value of an existing integer variable.
Definition: ChPython.cpp:113
Loads acting on multiple ChLoadable items.
Definition: ChLoad.h:251
Irrlicht scene node for a body.
Definition: ChBodySceneNode.h:35
void AddShadowAll()
Shortcut to enable shadow maps for all items in scene.
Definition: ChIrrApp.cpp:61
Main namespace for the Chrono package.
Definition: ChAsset.cpp:18
A basic triangle mesh: just a list of triangles (no edge connectivity info).
Definition: ChTriangleMeshSoup.h:26
void SetGrid(bool dashed=true, double linewidth=1.0, ChColor mcolor=ChColor(0, 0, 0))
Shortcut to add the command that turns on the grid.
Definition: ChGnuPlot.h:279
void SetTimestepperType(ChTimestepper::Type type)
Set the method for time integration (time stepper type).
Definition: ChSystem.cpp:279
Class for rigid bodies.
Definition: ChBody.h:46
void UnbindExternalPointer(void *mptr, size_t ID)
Use the following to declare pointer(s) that must not be de-serialized but rather be 'unbind' and be ...
Definition: ChArchive.h:836
ChMatrix33< Real > & GetA()
Return the current rotation as a 3x3 matrix.
Definition: ChFrame.h:213
const std::string & GetChronoDataPath()
Obtain the current path to the Chrono data directory (thread safe)
Definition: ChGlobal.cpp:89
int ChMin(int a, int b)
Minimum between two values.
Definition: ChMathematics.h:74
#define CH_ENUM_MAPPER_BEGIN(__enum_type)
Three macros to simplify the use of enum mapper.
Definition: ChArchive.h:707
ChApiIrr void fillChTrimeshFromIrlichtMesh(geometry::ChTriangleMesh *chTrimesh, irr::scene::IMesh *pMesh)
This function is based on a modified version of the irrlicht_bullet demo, see http://www....
ASCII 'LOG' ARCHIVES (only output, for debugging etc.)
Definition: ChArchiveAsciiDump.h:27
Special MBD 3x4 matrix [Gl(q)], as in local angular speed conversion.
Definition: ChMatrixMBD.h:95
void ImportSolidWorksSystem(const char *solidworks_py_file, ChSystemNSC &msystem)
Load a .py file as it is saved by the SolidWorks add-in exporter.
Definition: ChPython.cpp:228
This is a specialized class for ASCII output on system's file,.
Definition: ChStream.h:789
Class of loaders for ChLoadableU objects (which support line loads), for loads of distributed type,...
Definition: ChLoaderU.h:47
std::shared_ptr< ChContactContainer > GetContactContainer()
Get the contact container.
Definition: ChSystem.h:256
Geometric object representing an arc or a circle in 3D space.
Definition: ChLineArc.h:27
void Q_from_AngAxis(Real angle, const ChVector< Real > &axis)
Set the quaternion from an angle of rotation and an axis, defined in absolute coords.
Definition: ChQuaternion.h:1110
void Set_G_acc(const ChVector<> &m_acc)
Sets the G (gravity) acceleration vector, affecting all the bodies in the system.
Definition: ChSystem.h:224
virtual void DrawAll()
Call this important function inside a loop like while(application.GetDevice()->run()) {....
Definition: ChIrrAppInterface.cpp:699
CUDA_HOST_DEVICE CH_PARALLEL_API quaternion Q_from_AngAxis(const real &angle, const real3 &axis)
Definition: real4.cpp:153
virtual double Get_y(double x) const override
Return the y value of the function, at position x.
Definition: ChFunction_Sequence.cpp:251
Namespace for FEA classes.
Definition: ChChrono.h:52
Class for a physical system in which contact is modeled using a non-smooth (complementarity-based) me...
Definition: ChSystemNSC.h:29
virtual unsigned int GetHullCount()=0
Get the number of computed hulls after the convex decomposition.
void SetTryRealtime(bool val)
If set to true, the function DoStep() will try to use a timestep that is the same as that used to ref...
Definition: ChIrrAppInterface.h:92
virtual double Get_y_dxdx(double x) const override
Return the ddy/dxdx double derivative of the function, at position x.
Definition: ChFunction_Sequence.cpp:275
virtual bool WriteConvexHullsAsChullsFile(ChStreamOutAscii &mstream)
Write the convex decomposition to a ".chulls" file, where each hull is a sequence of x y z coords.
Definition: ChCConvexDecomposition.cpp:79
int ChMax(int a, int b)
Maximum between two values.
Definition: ChMathematics.h:62
void SetUserEventReceiver(irr::IEventReceiver *mreceiver)
Use this function to hook a custom event receiver to the application.
Definition: ChIrrAppInterface.h:133
void ConcatenatePreTransformation(const ChFrameMoving< Real > &T)
Apply a transformation (rotation and translation) represented by another ChFrameMoving T.
Definition: ChFrameMoving.h:329
Eigen::Matrix< T, M, N, Eigen::RowMajor > ChMatrixNM
Dense matrix with fixed size (known at compile time).
Definition: ChMatrix.h:52
Class for incremental form of state of time-integrable objects.
Definition: ChState.h:125
Utility class to easily convert a Chrono vector into an Irrlicht vector3df.
Definition: ChIrrTools.h:33
virtual void RemoveLink(std::shared_ptr< ChLinkBase > link)
Remove a link from this assembly.
Definition: ChAssembly.cpp:135
ChVector< Real > TransformLocalToParent(const ChVector< Real > &local) const
This function transforms a point from the local coordinate system to the parent coordinate system.
Definition: ChCoordsys.h:241
Sequence function: y = sequence_of_functions(f1(y), f2(y), f3(y)) All other function types can be ins...
Definition: ChFunction_Sequence.h:68
Sigma function: y = polynomial smooth ramp
Definition: ChFunction_Sigma.h:27
std::vector< std::shared_ptr< ChNodeFEAxyzrot > > & GetLastBeamNodes()
Access the list of nodes used by the last built beam.
Definition: ChBuilderBeam.h:83
virtual bool AddTriangleMesh(const geometry::ChTriangleMesh &tm)
Add a triangle mesh soup, by passing an entire ChTriangleMesh object.
Definition: ChCConvexDecomposition.cpp:332
Class to be used as a callback interface for some user defined action to be taken each time a contact...
Definition: ChContactContainer.h:56
Real Length() const
Compute the euclidean norm of the vector, that is its length or magnitude.
Definition: ChVector.h:814
This is a class for serializing to JSON.
Definition: ChArchiveJSON.h:36