![]() |
NuTo
Numerics Tool
|
handles the particle list More...
#include <ParticleHandler.h>
Public Member Functions | |
| ParticleHandler (int rNumParticles, Eigen::MatrixXd rParticleBoundingBox, double rVelocityRange, double rGrowthRate, int rSeed=0) | |
| constructor, builds rNumParticles equal particles More... | |
| ParticleHandler (Eigen::MatrixXd rSpheres, double rVelocityRange, double rRelativeGrowthRate, double rAbsoluteGrowthRate, int rSeed=0) | |
| constructor, uses rSpheres More... | |
| ParticleHandler (const std::string &rFileName, double rVelocityRange, double rRelativeGrowthRate, double rAbsoluteGrowthRate, int rSeed=0) | |
| constructor, builds particles from external file More... | |
| ~ParticleHandler () | |
| destructor, deletes all particles More... | |
| void | Sync (const double rTime) |
| updates all particles to the same time global time rTime More... | |
| double | GetKineticEnergy () const |
| getter for the kinetic energy of all particles More... | |
| double | GetVolume () const |
| getter for the volume of all particles More... | |
| void | ExportParticlesToVTU3D (std::string rOutputDirectory, int rTimeStep, double rGlobalTime, bool rFinal) const |
| writes a sphere visualization file More... | |
| void | ExportParticlesToVTU2D (std::string rOutputFile, double rZCoord) const |
| writes a sphere visualization file More... | |
| void | ExportParticlesToGmsh3D (std::string rOutputFile, Specimen &rSpecimen, double rMeshSize) const |
| writes a gmsh .geo file 3D More... | |
| void | ExportParticlesToGmsh2D (std::string rOutputFile, Specimen &rSpecimen, double rMeshSize, double rZCoord, double rMinRadius) const |
| writes a gmsh .geo file 3D More... | |
| void | ResetVelocities () |
| resets all velocities More... | |
| Eigen::MatrixXd | GetParticles (bool rInitialRadius=false) const |
| converts the particle list to a Nx4-matrix More... | |
| Eigen::MatrixXd | GetParticles2D (double rZCoord, double rMinRadius) const |
| cut spheres at a given z-coordinate to create circles (in 2D) More... | |
| void | ExportParticlesToFile (const std::string &rExportFileName, bool rInitialRadius) const |
| exports the particle list to a file More... | |
| CollidableParticleSphere * | GetParticle (const int rIndex) const |
| get a single particle from the particle list More... | |
| int | GetNumParticles () const |
| getter for the particle list size More... | |
| double | GetAbsoluteMininimalDistance (Specimen &rSpecimen) |
| calculates the minimal distance between all particles using sub boxes More... | |
| void | SetVisualizationFileName (const std::string &rVisualizationFileName) |
| optional: change the file name, default: "spheres_" More... | |
| Eigen::VectorXi | GetSubBoxDivisions (Specimen &rSpecimen, const int rParticlesPerBox) |
| calculates approximate sub box length, based on box size and the number of particles per sub box More... | |
handles the particle list
| NuTo::ParticleHandler::ParticleHandler | ( | int | rNumParticles, |
| Eigen::MatrixXd | rParticleBoundingBox, | ||
| double | rVelocityRange, | ||
| double | rGrowthRate, | ||
| int | rSeed = 0 |
||
| ) |
constructor, builds rNumParticles equal particles
| NuTo::ParticleHandler::ParticleHandler | ( | Eigen::MatrixXd | rSpheres, |
| double | rVelocityRange, | ||
| double | rRelativeGrowthRate, | ||
| double | rAbsoluteGrowthRate, | ||
| int | rSeed = 0 |
||
| ) |
constructor, uses rSpheres
| NuTo::ParticleHandler::ParticleHandler | ( | const std::string & | rFileName, |
| double | rVelocityRange, | ||
| double | rRelativeGrowthRate, | ||
| double | rAbsoluteGrowthRate, | ||
| int | rSeed = 0 |
||
| ) |
constructor, builds particles from external file
| NuTo::ParticleHandler::~ParticleHandler | ( | ) |
destructor, deletes all particles
| void NuTo::ParticleHandler::ExportParticlesToFile | ( | const std::string & | rExportFileName, |
| bool | rInitialRadius | ||
| ) | const |
exports the particle list to a file
| void NuTo::ParticleHandler::ExportParticlesToGmsh2D | ( | std::string | rOutputFile, |
| Specimen & | rSpecimen, | ||
| double | rMeshSize, | ||
| double | rZCoord, | ||
| double | rMinRadius | ||
| ) | const |
writes a gmsh .geo file 3D
| rOutputFile | .geo-file name |
| rSpecimen | specimen |
| rMeshSize | mesh size |
| rZCoord | z coordinate (where to cut) |
| rMinRadius | minimal radius of the circle |
| void NuTo::ParticleHandler::ExportParticlesToGmsh3D | ( | std::string | rOutputFile, |
| Specimen & | rSpecimen, | ||
| double | rMeshSize | ||
| ) | const |
writes a gmsh .geo file 3D
| rOutputFile | .geo-file name |
| rSpecimen | specimen |
| rMeshSize | mesh size |
| void NuTo::ParticleHandler::ExportParticlesToVTU2D | ( | std::string | rOutputFile, |
| double | rZCoord | ||
| ) | const |
writes a sphere visualization file
| rOutputFile | output file name |
| void NuTo::ParticleHandler::ExportParticlesToVTU3D | ( | std::string | rOutputDirectory, |
| int | rTimeStep, | ||
| double | rGlobalTime, | ||
| bool | rFinal | ||
| ) | const |
writes a sphere visualization file
| rOutputDirectory | workdir |
| rTimeStep | current timestep of the simulation |
| rGlobalTime | current global time != wall time |
| rFinal | false: use current radius, true: use initial radius |
| double NuTo::ParticleHandler::GetAbsoluteMininimalDistance | ( | Specimen & | rSpecimen | ) |
calculates the minimal distance between all particles using sub boxes
| double NuTo::ParticleHandler::GetKineticEnergy | ( | ) | const |
getter for the kinetic energy of all particles
| int NuTo::ParticleHandler::GetNumParticles | ( | ) | const |
getter for the particle list size
| NuTo::CollidableParticleSphere * NuTo::ParticleHandler::GetParticle | ( | const int | rIndex | ) | const |
get a single particle from the particle list
| Eigen::MatrixXd NuTo::ParticleHandler::GetParticles | ( | bool | rInitialRadius = false | ) | const |
converts the particle list to a Nx4-matrix
| Eigen::MatrixXd NuTo::ParticleHandler::GetParticles2D | ( | double | rZCoord, |
| double | rMinRadius | ||
| ) | const |
cut spheres at a given z-coordinate to create circles (in 2D)
| rZCoord | z coordinate (where to cut) |
| rMinRadius | minimal radius of the circle |
| Eigen::VectorXi NuTo::ParticleHandler::GetSubBoxDivisions | ( | Specimen & | rSpecimen, |
| const int | rParticlesPerBox | ||
| ) |
calculates approximate sub box length, based on box size and the number of particles per sub box
| double NuTo::ParticleHandler::GetVolume | ( | ) | const |
getter for the volume of all particles
| void NuTo::ParticleHandler::ResetVelocities | ( | ) |
resets all velocities
| void NuTo::ParticleHandler::SetVisualizationFileName | ( | const std::string & | rVisualizationFileName | ) |
optional: change the file name, default: "spheres_"
| void NuTo::ParticleHandler::Sync | ( | const double | rTime | ) |
updates all particles to the same time global time rTime
1.8.11