diff --git a/particle.h b/particle.h index 3fa782b1303e03af472cafd07cef342df850694a..51294f369699c664d69a938a812fe515a6fc23f6 100644 --- a/particle.h +++ b/particle.h @@ -57,8 +57,8 @@ namespace PARTICLE{ const float& zdimin, const bool& hasjumpedin=false, const bool& simdiffin=false) : - m_x(xin), m_y(yin), m_z(zin), m_rx(rxin), - m_ry(ryin),m_rz(rzin),m_steplength(steplengthin), + m_x(xin), m_y(yin), m_z(zin), m_rx(rxin),m_ry(ryin),m_rz(rzin),m_rx_init(rxin), + m_ry_init(ryin),m_rz_init(rzin),m_steplength(steplengthin), m_xdim(xdimin),m_ydim(ydimin),m_zdim(zdimin), m_has_jumped(hasjumpedin),m_simdiff(false){} Particle(){} @@ -74,18 +74,23 @@ namespace PARTICLE{ const float& zdimin=2, const bool& hasjumpedin=false, const bool& simdiffin=false){ + m_x=xin; m_y=yin; m_z=zin; m_rx=rxin; m_ry=ryin; m_rz=rzin; + m_rx_init=rxin; + m_ry_init=ryin; + m_rz_init=rzin; m_steplength=steplengthin; m_xdim=xdimin; m_ydim=ydimin; m_zdim=zdimin; m_has_jumped=hasjumpedin; m_simdiff=simdiffin; + } diff --git a/sausages.cc b/sausages.cc index 5745ffcfbc6caeebf24522c792cc2acbf90822bc..ac4a961eb5d7c205e50e1195b26a33923d571a96 100644 --- a/sausages.cc +++ b/sausages.cc @@ -56,7 +56,7 @@ int main ( int argc, char **argv ){ chunks.push_back(tmppair); } - for(int chunkno=0;chunkno < chunks.size();chunkno++){ + for(unsigned int chunkno=0;chunkno < chunks.size();chunkno++){ for(int i=chunks[chunkno].first;i<=chunks[chunkno].second;i++){ out(coord(i,0,0),coord(i,1,0),coord(i,2,0))=chunkno+1; }