Main Page | Class Hierarchy | Class List | File List | Class Members

sph_space.h

00001 /***************************************************************************
00002                           sph_space.h  -  description
00003                              -------------------
00004     begin                : Thu Jan 16 2003
00005     copyright            : (C) 2003 by Moritz Franosch
00006     email                : mail@Franosch.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef SPH_SPACE_H
00019 #define SPH_SPACE_H
00020 
00021 #include "space.h"
00022 
00023 
00028 class SPH_Space : public Space {
00029 
00030 private:
00031 
00032   int step; // step of integration method
00033 
00038   void ensure_boundary_condition(Particle& particle);
00039 
00040 public: 
00041 
00047   SPH_Space(const double length_x, const double length_y, const double length_z, 
00048             const double diameter);
00049 
00052   const Particle::vector_t& get_particle_position() const {
00053     return get_particle().get_position();
00054   }
00055 
00058   const Particle::vector_t& get_neighbor_position() const {
00059     return get_neighbor_particle().get_position();
00060   }
00061 
00064   const Particle::vector_t& get_particle_velocity() const {
00065     return get_particle().get_velocity();
00066   }
00067 
00070   const Particle::vector_t& get_neighbor_velocity() const {
00071     return get_neighbor_particle().get_velocity();
00072   }
00073 
00076   double get_particle_mass() const {
00077     return get_particle().get_mass();
00078   }
00079 
00082   double get_neighbor_mass() const {
00083     return get_neighbor_particle().get_mass();
00084   }
00085 
00088   void set_particle_mass(const double m);
00089 
00092   double get_particle_density() const {
00093     return get_particle().get_density();
00094   }
00095 
00098   void set_particle_density(const double rho);
00099 
00102   double get_neighbor_density() const {
00103     return get_neighbor_particle().get_density();
00104   }
00105 
00108   void set_particle_drho(const double& drho);
00109 
00112   void set_particle_acceleration(const Particle::vector_t& a);
00113 
00125   double update_particles(const double dt);
00126 
00127 };
00128 
00129 
00130 #endif // SPH_SPACE_H

Generated on Fri Apr 22 11:06:42 2005 for partsim.kdevelop by doxygen 1.3.6