Skip to content

Commit 3c01fc9

Browse files
committed
SWE: more comments and update the docs
1 parent af734c2 commit 3c01fc9

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

examples/fluids/index.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ where the time derivative :math:`\bm{\dot q}` is defined by
377377
\bm{\dot q}(\bm q) = \sigma \bm q + \bm z
378378
379379
in terms of :math:`\bm z` from prior state and :math:`\sigma > 0`,
380-
both of which depend on the specific time integration scheme. We split the implicit and explicit terms as follows:
380+
both of which depend on the specific time integration scheme. We split the time
381+
integration scheme into implicit and explicit parts where the implicit terms is
382+
given in what follows.
381383

382384
.. math::
383385
:label: eq-swe-implicit-part
@@ -399,8 +401,8 @@ While for the explicit part we specify
399401
\bm G(t, \bm q) :=
400402
\left\{
401403
\begin{array}{l}
402-
G_1 (u_{\lambda}, u_{\theta}, h) = - u_{\lambda} \frac{\partial u_{\lambda}}{\partial \alpha} - u_{\theta} \frac{\partial u_{\lambda}}{\partial \beta} - f u_{\theta}\\
403-
G_2 (u_{\lambda}, u_{\theta}, h) = - u_{\lambda} \frac{\partial u_{\theta}}{\partial \alpha} - u_{\theta} \frac{\partial u_{\theta}}{\partial \beta} + f u_{\lambda}\\
404+
G_1 (u_{\lambda}, u_{\theta}, h) = - u_{\lambda} \frac{\partial u_{\lambda}}{\partial \alpha} - u_{\theta} \frac{\partial u_{\theta}}{\partial \alpha} + f u_{\theta}\\
405+
G_2 (u_{\lambda}, u_{\theta}, h) = - u_{\lambda} \frac{\partial u_{\lambda}}{\partial \beta} - u_{\theta} \frac{\partial u_{\theta}}{\partial \beta} - f u_{\lambda}\\
404406
G_3 (u_{\lambda}, u_{\theta}, h) = 0 .
405407
\end{array}
406408
\right.

examples/fluids/shallow-water/qfunctions/geostrophic.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,21 @@ CEED_QFUNCTION(SWExplicit)(void *ctx, CeedInt Q, const CeedScalar *const *in,
153153
// The Physics
154154
// Explicit spatial terms of G_1(t,q):
155155
// Explicit terms multiplying v
156-
// - (omega + f) * khat curl u - grad(|u|^2/2) // TODO: needs fix with weak form
157-
// -- grad(|u|^2/2) = u^T grad u
158-
// -- khat curl u = [-u_1, u_0]
156+
// - (omega + f) * khat curl u - grad(|u|^2/2)
157+
// -- omega khat curl u = 0 (u_3 = 0)
158+
// -- f khat curl u = f [-u_1, u_0]
159+
// -- grad(|u|^2/2) = (grad u)^T u
159160
v[0][i] = - wdetJ*(u[0]*du[0][0] + u[1]*du[1][0] - f*u[1]);
160161
// No explicit terms multiplying dv
161162
dv[0][0][i] = 0;
162163
dv[1][0][i] = 0;
163164

164165
// Explicit spatial terms of G_2(t,q):
165166
// Explicit terms multiplying v
166-
// - (omega + f) * khat curl u - grad(|u|^2/2) // TODO: needs fix with weak form
167-
// -- grad(|u|^2/2) = u^T grad u
168-
// -- khat curl u = [-u_1, u_0]
167+
// - (omega + f) * khat curl u - grad(|u|^2/2)
168+
// -- omega khat curl u = 0 (u_3 = 0)
169+
// -- f khat curl u = f [-u_1, u_0]
170+
// -- grad(|u|^2/2) = (grad u)^T u
169171
v[1][i] = - wdetJ*(u[0]*du[0][1] + u[1]*du[1][1] + f*u[0]);
170172
// No explicit terms multiplying dv
171173
dv[0][1][i] = 0;

0 commit comments

Comments
 (0)