-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split local particle index from rest of particle data (#3583)
First baby steps to split the front end code from the parallel code. Changes: - Move things related to the local particle index into separate files - Cleaned up/move some of the bond code
- Loading branch information
Showing
27 changed files
with
389 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "exclusions.hpp" | ||
|
||
#ifdef EXCLUSIONS | ||
void add_exclusion(Particle *part, int part2) { | ||
for (int i = 0; i < part->el.n; i++) | ||
if (part->el.e[i] == part2) | ||
return; | ||
|
||
part->el.push_back(part2); | ||
} | ||
|
||
void delete_exclusion(Particle *part, int part2) { | ||
IntList &el = part->el; | ||
|
||
if (!el.empty()) { | ||
el.erase(std::remove(el.begin(), el.end(), part2), el.end()); | ||
}; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef ESPRESSO_EXCLUSIONS_HPP | ||
#define ESPRESSO_EXCLUSIONS_HPP | ||
|
||
#include "Particle.hpp" | ||
|
||
#ifdef EXCLUSIONS | ||
/** Determine if the non-bonded interactions between @p p1 and @p p2 should be | ||
* calculated. | ||
*/ | ||
inline bool do_nonbonded(Particle const &p1, Particle const &p2) { | ||
/* check for particle 2 in particle 1's exclusion list. The exclusion list is | ||
* symmetric, so this is sufficient. */ | ||
return std::none_of(p1.el.begin(), p1.el.end(), | ||
[&p2](int id) { return p2.p.identity == id; }); | ||
} | ||
|
||
/** Remove exclusion from particle if possible */ | ||
void delete_exclusion(Particle *part, int part2); | ||
|
||
/** Insert an exclusion if not already set */ | ||
void add_exclusion(Particle *part, int part2); | ||
#endif | ||
#endif // ESPRESSO_EXCLUSIONS_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.