Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ranluxint.h File Reference
#include "wcpplib/cfortran/ftypes.h"

Go to the source code of this file.

Macros

#define RANLUX_INSTEAD_OF_RNDM
 

Functions

void myiniteranlux (void)
 
void mysaveranlux (void)
 
void myextractranlux (fint *ivec)
 
void ranlux (ffloat *rvec, fint *len)
 
ffloat sranlux (void)
 
void lspois (ffloat *amu, fint *n, fint *ierror)
 
ffloat lranor (ffloat *arg1, ffloat *arg2)
 
void hisran (ffloat *y, fint *n, ffloat *xlo, ffloat *xwid, ffloat *xran)
 
ffloat flande (ffloat *x)
 
void INITE_RANLUX (void)
 
void SAVE_RANLUX (void)
 
void EXTRACT_RANLUX (fint *ivec)
 
void RANLUX (ffloat *vec, fint len)
 
ffloat SRANLUX (void)
 
ffloat LRANOR (ffloat *arg1, ffloat *arg2)
 
void LSPOIS (ffloat *amu, fint &n, fint &ierror)
 
void HISRAN (ffloat *y, fint n, ffloat xlo, ffloat xwid, ffloat &xran)
 
ffloat FLANDE (ffloat *x)
 

Macro Definition Documentation

◆ RANLUX_INSTEAD_OF_RNDM

#define RANLUX_INSTEAD_OF_RNDM

Definition at line 37 of file ranluxint.h.

Function Documentation

◆ EXTRACT_RANLUX()

void EXTRACT_RANLUX ( fint *  ivec)
inline

Definition at line 211 of file ranluxint.h.

211 {
212#ifdef FORT_UNDERSCORES_02
213 myextractranlux__(ivec);
214#elif FORT_UNDERSCORES_01
215 myextractranlux_(ivec);
216#elif FORT_UNDERSCORES_11
217 _myextractranlux_(ivec);
218#else
219 myextractranlux(ivec);
220#endif
221}
void myextractranlux(fint *ivec)

◆ flande()

ffloat flande ( ffloat *  x)

Referenced by FLANDE().

◆ FLANDE()

ffloat FLANDE ( ffloat *  x)
inline

Definition at line 403 of file ranluxint.h.

403 {
404#ifdef FORT_UNDERSCORES_02
405 return flande__(x);
406#elif FORT_UNDERSCORES_01
407 return flande_(x);
408#elif FORT_UNDERSCORES_11
409 return _flande_(x);
410#else
411 return flande(x);
412#endif
413}
ffloat flande(ffloat *x)

◆ hisran()

void hisran ( ffloat *  y,
fint *  n,
ffloat *  xlo,
ffloat *  xwid,
ffloat *  xran 
)

Referenced by HISRAN().

◆ HISRAN()

void HISRAN ( ffloat *  y,
fint  n,
ffloat  xlo,
ffloat  xwid,
ffloat &  xran 
)
inline

Definition at line 391 of file ranluxint.h.

391 {
392#ifdef FORT_UNDERSCORES_02
393 hisran__(y, &n, &xlo, &xwid, &xran);
394#elif FORT_UNDERSCORES_01
395 hisran_(y, &n, &xlo, &xwid, &xran);
396#elif FORT_UNDERSCORES_11
397 _hisran_(y, &n, &xlo, &xwid, &xran);
398#else
399 hisran(y, &n, &xlo, &xwid, &xran);
400#endif
401}
void hisran(ffloat *y, fint *n, ffloat *xlo, ffloat *xwid, ffloat *xran)

◆ INITE_RANLUX()

void INITE_RANLUX ( void  )
inline

Definition at line 187 of file ranluxint.h.

187 {
188#ifdef FORT_UNDERSCORES_02
189 myiniteranlux__();
190#elif FORT_UNDERSCORES_01
191 myiniteranlux_();
192#elif FORT_UNDERSCORES_11
193 _myiniteranlux_();
194#else
196#endif
197}
void myiniteranlux(void)

◆ lranor()

ffloat lranor ( ffloat *  arg1,
ffloat *  arg2 
)

Referenced by LRANOR().

◆ LRANOR()

ffloat LRANOR ( ffloat *  arg1,
ffloat *  arg2 
)
inline

Definition at line 367 of file ranluxint.h.

367 {
368#ifdef FORT_UNDERSCORES_02
369 return lranor__(arg1, arg2);
370#elif FORT_UNDERSCORES_01
371 return lranor_(arg1, arg2);
372#elif FORT_UNDERSCORES_11
373 return _lranor_(arg1, arg2);
374#else
375 return lranor(arg1, arg2);
376#endif
377}
ffloat lranor(ffloat *arg1, ffloat *arg2)

◆ LSPOIS()

void LSPOIS ( ffloat *  amu,
fint &  n,
fint &  ierror 
)
inline

Definition at line 379 of file ranluxint.h.

379 {
380#ifdef FORT_UNDERSCORES_02
381 lspois__(amu, &n, &ierror);
382#elif FORT_UNDERSCORES_01
383 lspois_(amu, &n, &ierror);
384#elif FORT_UNDERSCORES_11
385 _lspois_(amu, &n, &ierror);
386#else
387 lspois(amu, &n, &ierror);
388#endif
389}
void lspois(ffloat *amu, fint *n, fint *ierror)

◆ lspois()

void lspois ( ffloat *  amu,
fint *  n,
fint *  ierror 
)

Referenced by LSPOIS().

◆ myextractranlux()

void myextractranlux ( fint *  ivec)

Referenced by EXTRACT_RANLUX().

◆ myiniteranlux()

void myiniteranlux ( void  )

Referenced by INITE_RANLUX().

◆ mysaveranlux()

void mysaveranlux ( void  )

Referenced by SAVE_RANLUX().

◆ ranlux()

void ranlux ( ffloat *  rvec,
fint *  len 
)

Referenced by RANLUX().

◆ RANLUX()

void RANLUX ( ffloat *  vec,
fint  len 
)
inline

Definition at line 223 of file ranluxint.h.

223 {
224#ifdef FORT_UNDERSCORES_02
225 ranlux__(vec, &len);
226#elif FORT_UNDERSCORES_01
227 ranlux_(vec, &len);
228#elif FORT_UNDERSCORES_11
229 _ranlux_(vec, &len);
230#else
231 ranlux(vec, &len);
232#endif
233#ifdef PRINT_RANLUX
234 if (step_of_print_ranlux > 1) {
235 int n;
236 for (n = 0; n < len; n++) {
237 long rest = num_ranlux % step_of_print_ranlux;
238 if (rest == 0) {
239 int qp = mcout.precision();
240 mcout.precision(FLT_DIG);
241 mcout << "RANLUX: num_ranlux=" << num_ranlux << " r=" << vec[n] << '\n';
242 mcout.precision(qp);
243 }
244 num_ranlux++;
245 }
246 } else {
247 mcout << "RANLUX: len = " << len << '\n';
248 indn.n += 2;
249 int n;
250 int qp = mcout.precision();
251 mcout.precision(FLT_DIG);
252 for (n = 0; n < len; n++) {
253 mcout << "n=" << n << "num_ranlux=" << num_ranlux++
254 << " vec[n]=" << vec[n] << '\n';
255 }
256 mcout.precision(qp);
257 indn.n -= 2;
258 }
259#endif
260}
Definition: vec.h:248
indentation indn
Definition: prstream.cpp:13
#define mcout
Definition: prstream.h:133
void ranlux(ffloat *rvec, fint *len)

◆ SAVE_RANLUX()

void SAVE_RANLUX ( void  )
inline

Definition at line 199 of file ranluxint.h.

199 {
200#ifdef FORT_UNDERSCORES_02
201 mysaveranlux__();
202#elif FORT_UNDERSCORES_01
203 mysaveranlux_();
204#elif FORT_UNDERSCORES_11
205 _mysaveranlux_();
206#else
207 mysaveranlux();
208#endif
209}
void mysaveranlux(void)

◆ sranlux()

ffloat sranlux ( void  )

Referenced by SRANLUX().

◆ SRANLUX()

ffloat SRANLUX ( void  )
inline

Definition at line 262 of file ranluxint.h.

262 {
263#ifndef PRINT_RANLUX
264
265#ifdef FORT_UNDERSCORES_02
266 return sranlux__();
267#elif FORT_UNDERSCORES_01
268 return sranlux_();
269#elif FORT_UNDERSCORES_11
270 return _sranlux_();
271#else
272 return sranlux();
273#endif
274
275#else // PRINT_RANLUX
276
277#ifdef FORT_UNDERSCORES_02
278 float r = sranlux__();
279#elif FORT_UNDERSCORES_01
280 float r = sranlux_();
281#elif FORT_UNDERSCORES_11
282 float r = _sranlux_();
283#else
284 float r = sranlux();
285#endif
286 long rest = 0;
287 if (step_of_print_ranlux > 1) {
288 rest = num_ranlux % step_of_print_ranlux;
289 }
290 if (rest == 0) {
291 int qp = mcout.precision();
292 mcout.precision(FLT_DIG);
293 mcout << "SRANLUX: num_ranlux=" << num_ranlux << " r=" << r << '\n';
294 mcout.precision(qp);
295 }
296 num_ranlux++;
297 return r;
298
299#endif
300}
ffloat sranlux(void)

Referenced by Heed::ElElasticScat::fill_hist_low_scat(), Heed::AtomicSecondaryProducts::get_channel(), Heed::PairProd::get_eloss(), Heed::HeedParticle::physics(), Heed::HeedParticle_BGM::physics(), Heed::HeedPhoton::physics(), Heed::HeedDeltaElectron::physics_after_new_speed(), Heed::HeedDeltaElectron::physics_mrange(), pois(), vec::random_conic_vec(), vec::random_round_vec(), vec::random_sfer_vec(), and rnorm_improved().