#include <sph.h>
Public Member Functions | |
SPH (const int dimensions, const double xdim, const double ydim, const double zdim, const double h, const double velocity_of_sound, const double dt) | |
const SPH_Space & | get_space () const |
void | set_dt (const double dt) |
void | set_density (const double rho) |
void | set_viscosity (const double nu) |
void | set_gravity (const Particle::vector_t &g) |
void | set_velocity_of_sound (const double c) |
void | set_boundary_width (const double b) |
void | set_boundary_repulsive_force (const double f) |
bool | set_kernel (const std::string &name) |
void | reset () |
bool | next () |
bool | at_end () const |
const Particle & | get_particle () const |
void | insert_particle (const Particle::vector_t &p) |
void | start () |
double | get_time () const |
double | get_dt () const |
double | get_h () const |
int | get_dimensions () const |
double | get_boundary_width () const |
double | get_gravity_energy () |
double | get_pressure_energy () |
double | get_kinetic_energy () |
double | get_max_acceleration () |
double | get_density_deviation () |
void | update () |
bool | is_inner_point (const Particle::vector_t &p) |
double | get_implicit_surface (const Particle::vector_t &p) |
double | get_density (const Particle::vector_t &p) |
|
Constructs a SPH space. |
|
Last next() has returned false. |
|
Returns width of the boundary. |
|
Returns the density at position p. Invalidates iterator through particles. |
|
Returns the deviation sqrt( <(rho_i-rho_0)^2> )/rho_0 of the densities. |
|
Returns the number of dimensions. |
|
Returns current timestep in s. |
|
Returns current gravity energy in Joule. |
|
Returns the radius of the kernel (smoothing length) in m. |
|
A differentiable function that returns a value >0 iff position p is inside the fluid and <0 otherwise. |
|
Returns current kinetic energy in Joule. |
|
Returns the maximum acceleration of the particles in m/s^2. |
|
Returns a reference to current particle. |
|
Returns current pressure energy in Joule. |
|
Returns a reference to the SPH_Space used. |
|
Returns current simulated time in s. |
|
Insert particle at postion p. Calls reset(). Invalidates all references to particles. |
|
True iff position p is inside the fluid, i.e. iff get_implicit_surface()>0. Invalidates iterator through particles. |
|
Iterator set to next particle. Returns false if no next particle exists. |
|
Resets iterator through particles. |
|
Sets repulsive force of the boundary. |
|
Sets width of the boundary. |
|
Sets the initial density of the fluid. |
|
Sets timestep. |
|
Sets the gravity acceleration. |
|
Sets the kernel. Returns true if successful. |
|
Sets the velocity of sound. |
|
Sets the viscosity of the fluid. |
|
Must be called after all particles are inserted and before the first update(). |
|
Updates positions and velocities of all particles according to SPH. |