SPH
|
Generating initial conditions of SPH particles. More...
#include "common/ForwardDecl.h"
#include "objects/containers/ArrayView.h"
#include "objects/geometry/Vector.h"
#include "objects/wrappers/Function.h"
#include "quantities/IMaterial.h"
Go to the source code of this file.
Classes | |
class | BodyView |
Non-owning view of particles belonging to the same body. More... | |
struct | PowerLawSfd |
Holds the information about a power-law size-frequency distributions. More... | |
class | InitialConditions |
Object for adding one or more bodies with given material into a Storage. More... | |
struct | InitialConditions::BodySetup |
Holds data needed to create a single body in addHeterogeneousBody function. More... | |
Functions | |
void | repelParticles (ArrayView< Vector > r, const Float radius) |
Displaces particles so that no two particles overlap. More... | |
Vector | moveToCenterOfMassSystem (ArrayView< const Float > m, ArrayView< Vector > r) |
Modifies particle positions so that their center of mass lies at the origin. More... | |
void | moveToCenterOfMassSystem (Storage &storage) |
Modifies particle positions and velocities so that the center of mass is at the origin and the total momentum is zero. More... | |
Modifies particle positions so that their center of mass lies at the origin.
Function can be also used for particle velocities, modifying them so that the total momentum is zero.
Definition at line 363 of file Initial.cpp.
void moveToCenterOfMassSystem | ( | Storage & | storage | ) |
Modifies particle positions and velocities so that the center of mass is at the origin and the total momentum is zero.
Definition at line 379 of file Initial.cpp.
Displaces particles so that no two particles overlap.
In case no particles overlap, function does nothing.
r | Positions of particles |
radius | Radius of the particles in units of smoothing length. |
Definition at line 335 of file Initial.cpp.