chrono学习(一)

我想用chrono进行沙土的仿真,首先学习demo_GPU_ballCosim.cpp,这个例子仿真了一些沙土的沉降过程。

首先,运行编辑完成的文件demo_GPU_ballCosim:

bash 复制代码
(base) eowyn@eowyn-MS-7D20:~/build_chrono/bin$ ./demo_GPU_ballCosim 

运行完得到一些数据,存放在DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat中:

bash 复制代码
Reading parameters: ../data/gpu/ballCosim.json
--- Parsing JSON ---
params.sphere_radius 1.000000
params.sphere_density 1.000000
...
params.step_size 0.000050
--------------------
Now run_mode == FRICTIONLESS, this run is particle settling phase.
After it is done, you will have a settled bed of granular material.
A checkpoint file will be generated in the output directory to store this state.
Next, edit the JSON file, change 'run_mode' from 0 (FRICTIONLESS) to 1 (ONE_STEP),
then run this demo again to proceed with the ball drop part of this demo.

622476 particles sampled!
Output frame 1 of 100
Output frame 2 of 100
Output frame 3 of 100
...
Output frame 101 of 100
Writing checkpoint data to file "DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat"

然后,根据运行文件中的提示,将/build_chrono/data/gpu/ballCosim.json文件中的'run_mode'变量从frictionless改成one_step. 然后,重新运行demo_GPU_ballCosim,将会展示沉降后的沙土。

bash 复制代码
(base) eowyn@eowyn-MS-7D20:~/build_chrono/bin$ ./demo_GPU_ballCosim 
Reading parameters: ../data/gpu/ballCosim.json
--- Parsing JSON ---
params.sphere_radius 1.000000
params.sphere_density 1.000000
...
params.step_size 0.000050
--------------------
Reading checkpoint data from file "DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat"...
1 meshes
Version: 3.3.0
NVIDIA Corporation : NVIDIA GeForce RTX 3060/PCIe/SSE2 (3.3.0 NVIDIA 470.199.02)
GLSL: 3.30 NVIDIA via Cg compiler
Initialize Viewer : GL_INVALID_ENUM
Output at    50 FPS
Rendering at 2000 FPS
Output frame 1 of 100
Output frame 2 of 100
...
Output frame 10 of 100
Time: 67.6678 seconds
相关推荐
晚风吹长发7 小时前
二分查找算法+题目详解
c++·算法·二分查找
罗义凯8 小时前
其中包含了三种排序算法的注释版本(冒泡排序、选择排序、插入排序),但当前只实现了数组的输入和输出功能。
数据结构·c++·算法
春蕾夏荷_7282977259 小时前
c++ easylogging 使用示例
c++·log·easylogging
syt_biancheng9 小时前
Day3算法训练(简写单词,dd爱框框,3-除2!)
开发语言·c++·算法·贪心算法
自然数e9 小时前
C++多线程【线程管控】之线程转移以及线程数量和ID
开发语言·c++·算法·多线程
Elias不吃糖11 小时前
epoll 事件全集、每个事件的含义、哪些事件在实际服务器中最常见、哪些会组合出现
linux·c++·event
AA陈超11 小时前
ASC学习笔记0017:返回此能力系统组件的所有属性列表
c++·笔记·学习·ue5·虚幻引擎
Unlyrical12 小时前
splice, io_uring_prep_splice 调用(无效参数)
linux·服务器·c++·unix
Lucis__13 小时前
STL设计模式探秘:容器适配器&仿函数
c++·容器·stl·仿函数
无敌最俊朗@13 小时前
C++ 对象布局之padding(填充字节)
开发语言·c++