Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 750b6dcd authored by Andreas Adelmann's avatar Andreas Adelmann
Browse files

start with tracer particle class

parent f2b1a794
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ set (_SRCS
SDDSParser/version.cpp
OpalInputInterpreter.cpp
IpplInfoWrapper.cpp
TracerParticles.cpp
)
include_directories (
......@@ -69,6 +70,7 @@ set (HDRS
SDDSParser/skipper.hpp
SDDSParser/version_def.hpp
SDDSParser/version.hpp
TracerParticles.hpp
)
install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/Structure")
\ No newline at end of file
install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/Structure")
#include "Structure/TracerParticles.hpp"
#ifndef OPAL_TRACERPARTICLES_HH
#define OPAL_TRACERPARTICLES_HH
/**
* @file TracerPartiles.h
* @author Andreas Adelmann
* @date 27/4/2017
* @version
*
* @brief Holds a set of tracer particles on every core
*
* @section DESCRIPTION
*
* A set of non self interacting particles, that are
* subject of external fields. Every core holds them.
* At the moment they are never lost either and only one
* particle is stored.
*/
#include "Algorithms/PartBunch.h"
#include "Algorithms/Tracker.h"
#include "Algorithms/PartPusher.h"
#include "Structure/DataSink.h"
#include <vector>
#include <cassert>
class TracerParticles {
public:
TracerParticles() {
RefPartR_m.reserve(1);
RefPartP_m.reserve(1);
RefPartR_m[0] = Vector_t(0.0);
RefPartP_m[0] = Vector_t(0.0);
}
inline size_t size() const { return RefPartR_m.size();}
inline Vector_t getRefR() { return RefPartR_m[0]; }
inline Vector_t getRefP() { return RefPartP_m[0]; }
inline void setRefR(Vector_t r) { RefPartR_m[0] = r; }
inline void setRefP(Vector_t p) { RefPartP_m[0] = p; }
inline void operator = (const TracerParticles &p ) {
assert(p.size() != RefPartR_m.size());
for (auto i=0; i<1; i++) {
RefPartR_m[i] = p.RefPartR_m[i];
RefPartP_m[i] = p.RefPartP_m[i];
}
}
~TracerParticles() { }
private:
std::vector<Vector_t> RefPartR_m;
std::vector<Vector_t> RefPartP_m;
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment