50 for(
int i = 0; i <
bins_m; i++) {
85 nBin_m[ii] -= countLost[ii];
94 nBin_m[ii] = newPartNum[ii];
162 os <<
"-----------------------------------------" <<
endl;
163 os <<
" CREATE BINNED GAUSS DISTRIBUTION DONE " <<
endl;
169 for(
int i = 0; i <
bins_m; i++) {
171 for(
int j = 0; j <
sBins_m; j++)
172 msum += gsl_histogram_get(
h_m.get(), i *
sBins_m + j);
173 os <<
"Bin # " << i <<
" val " << msum <<
endl;
179 os <<
"No bin is emitted !" <<
endl;
Tps< T > sqrt(const Tps< T > &x)
Square root.
bool reduce(Communicate &, InputIterator, InputIterator, OutputIterator, const ReduceOp &, bool *IncludeVal=0)
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
Inform & endl(Inform &inf)
constexpr double c
The velocity of light in m/s.
std::vector< std::vector< double > > tmppart_m
std::unique_ptr< double[]> xbinmax_m
std::unique_ptr< double[]> xbinmin_m
PartBins(int bins, int sbins)
std::unique_ptr< size_t[]> nDelBin_m
size_t getTotalNumPerBin(int b)
How many particles are in the bin b.
void resetPartInBin_cyc(size_t newPartNum[], int binID)
std::vector< bool > isEmitted_m
void setBinEmitted(int bin)
void updatePartInBin_cyc(size_t countLost[])
Inform & print(Inform &os)
std::unique_ptr< bool[]> binsEmitted_m
bool getPart(size_t n, int bin, std::vector< double > &p)
size_t getTotalNum()
How many particles are in all the bins.
std::unique_ptr< size_t[]> nBin_m
std::unique_ptr< gsl_histogram > h_m