Fix: no power 1/3 in enstrophy norm
This commit is contained in:
parent
7a0eb20452
commit
d986f86243
@ -177,16 +177,16 @@ It can be made by specifying the parameter {\tt adaptive\_norm}.
|
|||||||
\begin{equation}
|
\begin{equation}
|
||||||
\|f\|:=\frac1{\mathcal N}\sqrt{\sum_k k^2|f_k|^2}
|
\|f\|:=\frac1{\mathcal N}\sqrt{\sum_k k^2|f_k|^2}
|
||||||
,\quad
|
,\quad
|
||||||
\mathcal N:=\left(\frac{\sqrt{\sum_k k^2|\hat u_k^{(n)}|^2}+\sqrt{\sum_k k^2|\hat U_k^{(n)}|^2}}{\sum_k k^2|\hat u_k^{(n)}|^2}\right)^{\frac13}
|
\mathcal N:=\frac{\sqrt{\sum_k k^2|\hat u_k^{(n)}|^2}+\sqrt{\sum_k k^2|\hat U_k^{(n)}|^2}}{\sum_k k^2|\hat u_k^{(n)}|^2}
|
||||||
.
|
.
|
||||||
\end{equation}
|
\end{equation}
|
||||||
Doing so controls the error of the enstrophy through
|
Doing so controls the error of the enstrophy through
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\mathcal N^2|\mathcal En(\hat u)-\mathcal En(\hat U)|\equiv|\|\hat u\|^2-\|\hat U\|^2|\leqslant \|\hat u-\hat U\|(\|\hat u\|+\|\hat U\|)
|
\frac1{\mathcal N^2}|\mathcal En(\hat u)-\mathcal En(\hat U)|\equiv|\|\hat u\|^2-\|\hat U\|^2|\leqslant \|\hat u-\hat U\|(\|\hat u\|+\|\hat U\|)
|
||||||
\end{equation}
|
\end{equation}
|
||||||
so
|
so
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
\mathcal N^2
|
\frac1{\mathcal N^2}
|
||||||
|\mathcal En(\hat u)-\mathcal En(\hat U)|\leqslant
|
|\mathcal En(\hat u)-\mathcal En(\hat U)|\leqslant
|
||||||
\|\hat u-\hat U\|\frac1{\mathcal N}\left(\sqrt{\sum_k k^2|\hat u_k|^2}+\sqrt{\sum_k k^2|\hat U_k|^2}\right)
|
\|\hat u-\hat U\|\frac1{\mathcal N}\left(\sqrt{\sum_k k^2|\hat u_k|^2}+\sqrt{\sum_k k^2|\hat U_k|^2}\right)
|
||||||
\end{equation}
|
\end{equation}
|
||||||
|
@ -820,7 +820,7 @@ int ns_step_rkf45(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
err=sqrt(err);
|
err=sqrt(err);
|
||||||
relative=pow((sqrt(sumu)+sqrt(sumU))/sumu, 1./3);
|
relative=(sqrt(sumu)+sqrt(sumU))/sumu;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers.edu\n", adaptive_norm);
|
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers.edu\n", adaptive_norm);
|
||||||
@ -966,7 +966,7 @@ int ns_step_rkbs32(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
err=sqrt(err);
|
err=sqrt(err);
|
||||||
relative=pow((sqrt(sumu)+sqrt(sumU))/sumu, 1./3);
|
relative=(sqrt(sumu)+sqrt(sumU))/sumu;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers,edu\n", adaptive_norm);
|
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers,edu\n", adaptive_norm);
|
||||||
@ -1143,7 +1143,7 @@ int ns_step_rkdp54(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
err=sqrt(err);
|
err=sqrt(err);
|
||||||
relative=pow((sqrt(sumu)+sqrt(sumU))/sumu, 1./3);
|
relative=(sqrt(sumu)+sqrt(sumU))/sumu;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers,edu\n", adaptive_norm);
|
fprintf(stderr,"bug: unknown norm: %u, contact ian.jauslin@rutgers,edu\n", adaptive_norm);
|
||||||
|
Loading…
Reference in New Issue
Block a user