Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian@jauslin.org>2022-05-27 14:31:19 -0400
committerIan Jauslin <ian@jauslin.org>2022-05-27 14:31:19 -0400
commit6b96c2d9461d59662705da766d13318b3cb0da2d (patch)
treeeeb0513c8b4af1d29fd4ff3dd8b51f48c06ec5bd /src/navier-stokes.c
parentf9d9d481545d4769c3cc73d3c7b516725213f85a (diff)
Replace energy command with eea
Diffstat (limited to 'src/navier-stokes.c')
-rw-r--r--src/navier-stokes.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/navier-stokes.c b/src/navier-stokes.c
index 5082989..7c4ecb3 100644
--- a/src/navier-stokes.c
+++ b/src/navier-stokes.c
@@ -69,55 +69,6 @@ int uk(
return(0);
}
-// 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
-){
- _Complex double* u;
- _Complex double* tmp1;
- _Complex double* tmp2;
- _Complex double* tmp3;
- unsigned int t;
- fft_vect fft1;
- fft_vect fft2;
- fft_vect ifft;
- double energy;
- double avg;
-
- ns_init_tmps(&u, &tmp1, &tmp2, &tmp3, &fft1, &fft2, &ifft, K1, K2, N1, N2, nthreads);
- // copy initial condition
- copy_u(u, u0, K1, K2);
-
- // init running average
- avg=0;
-
- // iterate
- for(t=0;t<nsteps;t++){
- ins_step(u, K1, K2, N1, N2, nu, delta, L, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
-
- if(t%print_freq==0){
- energy=compute_energy(u, K1, K2);
-
- fprintf(stderr,"%d % .8e % .8e\n",t,t*delta, energy);
- printf("%8d % .15e % .15e\n",t,t*delta,energy);
- }
- }
-
- ns_free_tmps(u, tmp1, tmp2, tmp3, fft1, fft2, ifft);
- return(0);
-}
-
// compute energy, enstrophy, alpha as a function of time in the I-NS equation
int eea(
int K1,