Add command to print the enstrophy of the initial condition

This commit is contained in:
2025-10-14 12:20:43 -04:00
parent afe0498f21
commit 8fa9e7f556
5 changed files with 36 additions and 1 deletions

View File

@@ -297,6 +297,25 @@ int enstrophy(
return(0);
}
// compute enstrophy, alpha for the initial condition (useful for debugging)
int enstrophy_print_init(
int K1,
int K2,
double L,
_Complex double* u0,
_Complex double* g
){
double alpha, enstrophy, energy;
alpha=compute_alpha(u0, K1, K2, g, L);
enstrophy=compute_enstrophy(u0, K1, K2, L);
energy=compute_energy(u0, K1, K2);
// print
printf("% .15e % .15e % .15e\n", alpha, energy, enstrophy);
return(0);
}
// compute solution as a function of time, but do not print anything (useful for debugging)
int quiet(
int K1,