diff --git a/cpp/particles/p2p_cylinder_collisions.hpp b/cpp/particles/p2p_cylinder_collisions.hpp index bcc2b3e7b8f9ce56a083ded5c27a3c75116b3415..46763ddd0f7d69c1e3eded08837d332c24f4d7d8 100644 --- a/cpp/particles/p2p_cylinder_collisions.hpp +++ b/cpp/particles/p2p_cylinder_collisions.hpp @@ -20,20 +20,20 @@ * Contact: Cristian.Lalescu@ds.mpg.de * * * ******************************************************************************/ -#ifndef P2P_CYLINDER_COLLISIONS_HPP -#define P2P_CYLINDER_COLLISIONS_HPP +#ifndef P2P_CYLINDER_GHOST_COLLISIONS_HPP +#define P2P_CYLINDER_GHOST_COLLISIONS_HPP #include <cstring> template <class real_number, class partsize_t> -class p2p_cylinder_collisions{ +class p2p_cylinder_ghost_collisions{ long int collision_counter; public: - p2p_cylinder_collisions() : collision_counter(0){} + p2p_cylinder_ghost_collisions() : collision_counter(0){} // Copy constructor use a counter set to zero - p2p_cylinder_collisions(const p2p_cylinder_collisions&) : collision_counter(0){} + p2p_cylinder_ghost_collisions(const p2p_cylinder_ghost_collisions&) : collision_counter(0){} template <int size_particle_rhs> void init_result_array(real_number /*rhs*/[], const partsize_t /*nbParticles*/) const{ @@ -47,29 +47,31 @@ public: void compute_interaction(const real_number /*pos_part1*/[], real_number /*rhs_part1*/[], const real_number /*pos_part2*/[], real_number /*rhs_part2*/[], const real_number /*dist_pow2*/, const real_number /*cutoff*/, - const real_number /*xshift_coef*/, const real_number /*yshift_coef*/, const real_number /*zshift_coef*/) const{ - // TODO check the orientation, etc.... - if(check the test here){ + const real_number /*xshift_coef*/, const real_number /*yshift_coef*/, const real_number /*zshift_coef*/){ + bool cylinders_overlap = false; + + /* TODO: check if cylinders overlap or not, set `cylinders_overlap` accordingly */ + + if(cylinders_overlap) collision_counter += 1; - } } - void merge(const p2p_cylinder_collisions& other){ + void merge(const p2p_cylinder_ghost_collisions& other){ collision_counter += other.collision_counter; } constexpr static bool isEnable() { - return false; + return true; } long int get_collision_counter() const{ return collision_counter; } - void reset_collision_counter() const{ + void reset_collision_counter(){ collision_counter = 0; } }; -#endif // P2P_CYLINDER_COLLISIONS_HPP +#endif // P2P_CYLINDER_GHOST_COLLISIONS_HPP