Working Version with Population update and T+ interactions.

This commit is contained in:
Christian
2019-05-08 13:03:10 +02:00
parent 2f764c4812
commit 0f2a5625a2
63 changed files with 1353 additions and 646 deletions
+12 -10
View File
@@ -10,17 +10,18 @@
#define find_species_h
#include <vector>
#include "particle.hpp"
template <typename T>
inline typename std::vector<T*>::iterator find_SpeciesItr(std::vector<T*> Vec, species Species) {
inline typename std::vector<T*>::iterator find_SpeciesItr(std::vector<T*> *Vec, species Species) {
typename std::vector<T*>::iterator Itr;
if (Vec.size() == 0) {
Itr = Vec.end();
if (Vec->size() == 0) {
Itr = Vec->end();
} else {
Itr = Vec.begin();
while (Itr != Vec.end() ) {
Itr = Vec->begin();
while (Itr != Vec->end() ) {
if ((*Itr)->get_Species() == Species) {
break;
}
@@ -31,13 +32,13 @@ inline typename std::vector<T*>::iterator find_SpeciesItr(std::vector<T*> Vec, s
}
template <typename T>
inline typename std::vector<T*>::const_iterator find_SpeciesConstItr(const std::vector<T*> Vec, species Species) {
inline typename std::vector<T*>::const_iterator find_SpeciesConstItr(const std::vector<T*> *Vec, species Species) {
typename std::vector<T*>::const_iterator Itr;
if (Vec.size() == 0) {
Itr = Vec.end();
if (Vec->size() == 0) {
Itr = Vec->cend();
} else {
Itr = Vec.cbegin();
while (Itr != Vec.cend() ) {
Itr = Vec->cbegin();
while (Itr != Vec->cend() ) {
if ( (*Itr)->get_Species() == Species) {
break;
}
@@ -47,4 +48,5 @@ inline typename std::vector<T*>::const_iterator find_SpeciesConstItr(const std::
return (Itr);
}
#endif /* find_species_h */