Skip to content

Commit

Permalink
Change particle_particle_contact_info from class to struct
Browse files Browse the repository at this point in the history
  • Loading branch information
acdaigneault committed Aug 8, 2024
1 parent 9520099 commit c8067c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
31 changes: 3 additions & 28 deletions include/dem/particle_particle_contact_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,11 @@ using namespace dealii;
* namely everything related to tangential overlaps
*/
template <int dim>
class particle_particle_contact_info
struct particle_particle_contact_info
{
public:
/** @brief Constructor for cases where the two particle iterators are known.
* This constructor is used everywhere in the regular DEM and unresolved
* CFD-DEM code
*
* @param particle_one The iterator of particle one
* @param particle_two The iterator of particle two
*/

inline particle_particle_contact_info(
Particles::ParticleIterator<dim> &particle_one,
Particles::ParticleIterator<dim> &particle_two)
: particle_one(particle_one)
, particle_two(particle_two)
{}

/** @brief Dummy constructor for cases where the two particle iterators are unknown.
* This constructor is only used in the resolved CFD-DEM and should be
* deprecated eventually.
*/

inline particle_particle_contact_info()
{}


Tensor<1, 3> tangential_overlap;
Particles::ParticleIterator<dim> particle_one;
Particles::ParticleIterator<dim> particle_two;
Tensor<1, 3> tangential_overlap;
};

#endif /* particle_particle_contact_info_struct_h */
#endif
5 changes: 3 additions & 2 deletions source/dem/particle_particle_fine_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ particle_particle_fine_search(

particle_one_contact_list.emplace(
particle_two_id,
particle_particle_contact_info<dim>(particle_one,
particle_two));
particle_particle_contact_info<dim>{particle_one,
particle_two,
Tensor<1, 3>()});
}
}
}
Expand Down

0 comments on commit c8067c4

Please sign in to comment.