Go to the source code of this file.
Define Documentation
#define CHECK_NAN |
( |
|
XIN | ) |
c_nan(XIN, __func__, __LINE__,__FILE__) |
Function Documentation
void allocate_field |
( |
struct Field * |
fldi | ) |
|
Allocate a field structure according to the code current configuration This routine allows one to add extra fields to the code very easily.
- Parameters:
-
*fldi,: | pointer to a field structure to initialize |
float big_endian |
( |
float |
in_number | ) |
|
Determines if the machine is little-endian. If so, it will force the data to be big-endian.
- Parameters:
-
in_number | floating point number to be converted in big endian |
void deallocate_field |
( |
struct Field * |
fldi | ) |
|
Deallocate a field structure created by allocate_field
double energy |
( |
const double complex |
q[] | ) |
|
Compute the energy of a given field.
- Parameters:
-
q | complex array containing the field for which we want the total energy |
void finish_common |
( |
void |
| ) |
|
double get_c_time |
( |
void |
| ) |
|
Return the localtime in seconds. Use different implementation depending on the avaiable libraries
void init_common |
( |
void |
| ) |
|
Init all global variables, aligning them in memory
void projector |
( |
double complex |
qx[], |
|
|
double complex |
qy[], |
|
|
double complex |
qz[] |
|
) |
| |
Remove the divergence from a 3D field using the projector operator: q=q-k.q/k^2
- Parameters:
-
qx,: | x component of the field |
qy,: | y component of the field |
qz,: | z component of the field |
Customized random number generator Allow one to have consistant random numbers generators on different architectures.
double randm_normal |
( |
void |
| ) |
|
Normal distribution Algorithm by D.E. Knut, 1997, The Art of Computer Programmin, Addison-Wesley.
void reduce |
( |
double * |
var, |
|
|
const int |
op |
|
) |
| |
Reduce a variable over all the avaiable processes Can add a value on all the process, find a maximum or a minimum.
NOTE: This routine makes sense only when MPI_SUPPORT is set. If not, this routine does nothing.
- Parameters:
-
*var,: | variable to be reduced |
op,: | operation needed to be done. Can be set to: 1= Sum over all the processes 2= Find the maximum over all the processes 3= Find the minimum over all the processes |
Variable Documentation
inverse of k2t Wavevector, function of time when SHEAR is present. set to 0 wheh k2t=0 to avoid singularity
k squared Wavevector, function of time when SHEAR is present.
Time dependant x Wavevector. Different from kx only when SHEAR is present.
Temporary complex array (alias of real wr**)
Temporary complex array (alias of real wr**)
Temporary complex array (alias of real wr**)
Temporary real array (alias of complex w**)
Temporary real array (alias of complex w**)
Temporary real array (alias of complex w**)