Skip to content

Commit

Permalink
remove FDPS code from inc/pikg_vector.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
subarutaro committed Aug 1, 2020
1 parent 1e300f0 commit 50deaa8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions inc/pikg_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,14 @@ namespace PIKG{
}

const T & operator[](const int i) const {
assert(i>=0 && i<3);
if(0==i) return x;
if(1==i) return y;
if(2==i) return z;
std::cout<<"PS_ERROR: Vector invalid access. \n"<<"function: "<<__FUNCTION__<<", line: "<<__LINE__<<", file: "<<__FILE__<<std::endl;
std::cerr<<"Vector element="<<i<<" is not valid."<<std::endl;
#ifdef PARTICLE_SIMULATOR_MPI_PARALLEL
MPI_Abort(MPI_COMM_WORLD,-1);
#endif //PARTICLE_SIMULATOR_MPI_PARALLEL
exit(-1);
return x; //dummy for avoid warning
return z;
}

T & operator[](const int i){
assert(i<3);
assert(i>=0 && i<3);
if(0==i) return x;
if(1==i) return y;
return z;
Expand Down Expand Up @@ -282,10 +276,12 @@ namespace PIKG{
}

T& operator[](const int i){
assert(i>=0 && i<2);
if(0==i) return x;
return y;
}
const T & operator[](const int i) const {
assert(i>=0 && i<2);
if(0==i) return x;
return y;
}
Expand Down

0 comments on commit 50deaa8

Please sign in to comment.