Fix denomination: enstrophy -> alpha

This commit is contained in:
Ian Jauslin 2022-05-26 17:28:48 -04:00
parent aa66aadb74
commit 480ce57afa
4 changed files with 12 additions and 12 deletions

View File

@ -12,13 +12,13 @@ int g_test(
for(kx=-K1;kx<=K1;kx++){ for(kx=-K1;kx<=K1;kx++){
for (ky=-K2;ky<=K2;ky++){ for (ky=-K2;ky<=K2;ky++){
if(kx==2 && ky==-1){ if(kx==2 && ky==-1){
g[klookup(kx,ky,K1,K2)]=0.5+sqrt(3)/2*I; g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.5+sqrt(3)/2*I;
} }
else if(kx==-2 && ky==1){ else if(kx==-2 && ky==1){
g[klookup(kx,ky,K1,K2)]=0.5-sqrt(3)/2*I; g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.5-sqrt(3)/2*I;
} }
else{ else{
g[klookup(kx,ky,K1,K2)]=0.; g[klookup(kx,ky,2*K1+1,2*K2+1)]=0.;
} }
} }
} }

View File

@ -38,7 +38,7 @@ _Complex double* set_driving(unsigned int driving, nstrophy_parameters parameter
_Complex double* set_init(unsigned int init, nstrophy_parameters parameters); _Complex double* set_init(unsigned int init, nstrophy_parameters parameters);
#define COMMAND_UK 1 #define COMMAND_UK 1
#define COMMAND_ENSTROPHY 2 #define COMMAND_ALPHA 2
#define COMMAND_QUIET 3 #define COMMAND_QUIET 3
#define COMMAND_ENERGY 4 #define COMMAND_ENERGY 4
@ -89,8 +89,8 @@ int main (
else if (command==COMMAND_ENERGY){ else if (command==COMMAND_ENERGY){
energy(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, parameters.print_freq, nthreads); energy(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, parameters.print_freq, nthreads);
} }
else if(command==COMMAND_ENSTROPHY){ else if(command==COMMAND_ALPHA){
enstrophy(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, parameters.print_freq, nthreads); alpha(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, parameters.print_freq, nthreads);
} }
else if(command==COMMAND_QUIET){ else if(command==COMMAND_QUIET){
quiet(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, nthreads); quiet(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.nsteps, parameters.nu, parameters.delta, parameters.L, u0, g, nthreads);
@ -206,8 +206,8 @@ int read_args(
if(strcmp(argv[i], "uk")==0){ if(strcmp(argv[i], "uk")==0){
*command=COMMAND_UK; *command=COMMAND_UK;
} }
else if(strcmp(argv[i], "enstrophy")==0){ else if(strcmp(argv[i], "alpha")==0){
*command=COMMAND_ENSTROPHY; *command=COMMAND_ALPHA;
} }
else if(strcmp(argv[i], "quiet")==0){ else if(strcmp(argv[i], "quiet")==0){
*command=COMMAND_QUIET; *command=COMMAND_QUIET;

View File

@ -120,8 +120,8 @@ int energy(
return(0); return(0);
} }
// compute enstrophy as a function of time in the I-NS equation // compute alpha as a function of time in the I-NS equation
int enstrophy( int alpha(
int K1, int K1,
int K2, int K2,
int N1, int N1,

View File

@ -18,8 +18,8 @@ int uk( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double d
// compute the energy as a function of time // compute the energy as a function of time
int energy( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int print_freq, unsigned int nthreads); int energy( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int print_freq, unsigned int nthreads);
// compute enstrophy // compute alpha
int enstrophy( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int print_freq, unsigned int nthreads); int alpha( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int print_freq, unsigned int nthreads);
// compute solution as a function of time, but do not print anything (useful for debugging) // compute solution as a function of time, but do not print anything (useful for debugging)
int quiet( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int nthreads); int quiet( int K1, int K2, int N1, int N2, unsigned int nsteps, double nu, double delta, double L, _Complex double* u0, _Complex double* g, unsigned int nthreads);