Description

Collaboration diagram for Utilities:

Classes

struct  chrono::gpu::ChGpuSimulationParameters
 Structure with Chrono::Gpu simulation parameters. More...
 
class  chrono::gpu::ChGpuVisualization
 Run-time visualization support for Chrono::Gpu systems. More...
 

Functions

void chrono::gpu::ShowJSONUsage ()
 Print scheme for JSON file with simulation settings.
 
void chrono::gpu::InvalidArg (string arg)
 Flag an invalid simulation parameter.
 
bool chrono::gpu::ParseJSON (const std::string &json_file, ChGpuSimulationParameters &params, bool verbose=true)
 Parse the specified JSON file with simulation settings. More...
 
template<typename Real >
std::vector< ChVector< Real > > chrono::gpu::MeshSphericalDecomposition (std::string objfilename, ChVector< Real > scaling, ChVector< Real > offset, Real sphere_radius)
 Decompose a given triangle mesh surface into a minimally-overlapping collection of spheres. More...
 

Function Documentation

◆ MeshSphericalDecomposition()

template<typename Real >
std::vector<ChVector<Real> > chrono::gpu::MeshSphericalDecomposition ( std::string  objfilename,
ChVector< Real >  scaling,
ChVector< Real >  offset,
Real  sphere_radius 
)

Decompose a given triangle mesh surface into a minimally-overlapping collection of spheres.

The mesh must be stored in OBJ format and must consist of only triangles. Returns the number of spheres added as a result of the decomposition.

Parameters
objfilenameOBJ mesh file path
scalingScaling vector to apply to the mesh before decomposition
offsetDisplacement to apply to the mesh before decomposition
sphere_radiusRadius to use for all spheres in the decomposition

◆ ParseJSON()

bool chrono::gpu::ParseJSON ( const std::string &  json_file,
ChGpuSimulationParameters params,
bool  verbose = true 
)

Parse the specified JSON file with simulation settings.

Returns true on successful parameter load. Returns false and prints error on invalid argument.