Simple non-owning view of a container.
#define SPH_ASSERT(x,...)
Generic wrappers of lambdas, functors and other callables.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Base class for all particle materials.
Vector moveToCenterOfMassSystem(ArrayView< const Float > m, ArrayView< Vector > r)
Modifies particle positions so that their center of mass lies at the origin.
void repelParticles(ArrayView< Vector > r, const Float radius)
Displaces particles so that no two particles overlap.
constexpr INLINE Float pow(const Float v)
Power for floats.
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Basic vector algebra. Computations are accelerated using SIMD.
Object providing safe access to continuous memory of data.
Non-owning view of particles belonging to the same body.
RotationOrigin
Predefined types of center point.
@ CENTER_OF_MASS
Rotate the body around its center of mass.
@ FRAME_ORIGIN
Add angular velocity with respect to origin of coordinates.
BodyView(Storage &storage, const Size bodyIndex)
BodyView & addRotation(const Vector &omega, const RotationOrigin origin)
Adds an angular velocity to all particles of the body.
BodyView & addVelocity(const Vector &v)
Adds a velocity vector to all particles of the body.
BodyView & displace(const Vector &dr)
Moves the particles of the body in given direction.
Base class for generating vertices with specific distribution.
Base class for computational domains.
Material settings and functions specific for one material.
Object for adding one or more bodies with given material into a Storage.
BodyView addMonolithicBody(Storage &storage, const BodySettings &body)
Creates a monolithic body by filling given domain with particles.
InitialConditions(const RunSettings &settings)
Creates new initial conditions.
BodyView addHeterogeneousBody(Storage &storage, const BodySetup &environment, ArrayView< const BodySetup > bodies)
Creates particles composed of different materials.
void addRubblePileBody(Storage &storage, const IDomain &domain, const PowerLawSfd &sfd, const BodySettings &bodySettings)
Creates a rubble-pile body, composing of monolithic spheres.
Object representing a 1D interval of real numbers.
INLINE Float lower() const
Returns lower bound of the interval.
INLINE Float upper() const
Returns upper bound of the interval.
Container storing all quantities used within the simulations.
Holds data needed to create a single body in addHeterogeneousBody function.
SharedPtr< IDomain > domain
SharedPtr< IMaterial > material
BodySetup()
Creates a body with undefined domain and material.
Shared data used when creating all bodies in the simulation.
Object with deleted copy constructor and copy operator.
Holds the information about a power-law size-frequency distributions.
Interval interval
Minimal and maximal value of the SFD.
INLINE Float operator()(const Float x) const
Generates a new value of the SFD by transforming given value from interval [0, 1].