From: Wolfgang Bangerth Date: Wed, 30 Mar 2016 21:03:34 +0000 (-0500) Subject: Fix signs of various terms. X-Git-Tag: v8.5.0-rc1~1152^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86a0c54779ff59aa099b970863e47795e5c20cf9;p=dealii.git Fix signs of various terms. This appears to be correct in the implementation, however. --- diff --git a/examples/step-25/doc/intro.dox b/examples/step-25/doc/intro.dox index 2921259f3d..92bfdd7bb8 100644 --- a/examples/step-25/doc/intro.dox +++ b/examples/step-25/doc/intro.dox @@ -109,7 +109,7 @@ sine-Gordon equation under consideration here, we have that F(u^n_l) &=& \left[ 1-k^2\theta^2\Delta \right] u^n_l - \left[ 1+k^2\theta(1-\theta)\Delta\right] u^{n-1} - k v^{n-1} + k^2\theta\sin\left[\theta u^n_l + (1-\theta) u^{n-1}\right],\\ - F'(u^n_l) &=& 1-k^2\theta^2\Delta - k^2\theta^2\cos\left[\theta u^n_l + F'(u^n_l) &=& 1-k^2\theta^2\Delta + k^2\theta^2\cos\left[\theta u^n_l + (1-\theta) u^{n-1}\right]. \f} Notice that while $F(u^n_l)$ is a function, $F'(u^n_l)$ is an operator. @@ -153,13 +153,13 @@ H^1(\Omega)$. Thus, the finite-dimensional version of the variational formulatio U^{n,l+1} = U^{n,l} + \delta U^{n,l}, \qquad U^{n,0} = U^{n-1}; \\ MV^n &=& MV^{n-1} - k \theta AU^n -k (1-\theta) AU^{n-1} - k S(u^n,u^{n-1}). @f} -Above, the matrix $F_h'(\cdot)$ and the vector $F_h(\cdot)$ denote the discrete versions of the gadgets discussed above, i.e. +Above, the matrix $F_h'(\cdot)$ and the vector $F_h(\cdot)$ denote the discrete versions of the gadgets discussed above, i.e., \f{eqnarray*} F_h(U^{n,l}) &=& \left[ M+k^2\theta^2A \right] U^{n,l} - \left[ M-k^2\theta(1-\theta)A \right] U^{n-1} - k MV^{n-1} + k^2\theta S(u^n_l, u^{n-1}),\\ F_h'(U^{n,l}) &=& M+k^2\theta^2A - - k^2\theta^2N(u^n_l,u^{n-1}) + + k^2\theta^2N(u^n_l,u^{n-1}) \f} Again, note that the first matrix equation above is, in fact, the definition of an iterative procedure, so it is solved multiple times @@ -177,7 +177,7 @@ What solvers can we use for the first equation? Let's look at the matrix we have to invert: @f[ (M+k^2\theta^2(A-N))_{ij} = - \int_\Omega (1-k^2\theta^2 \cos \alpha) + \int_\Omega (1+k^2\theta^2 \cos \alpha) \varphi_i\varphi_j \; dx+\int_\Omega \nabla\varphi_i\nabla\varphi_j \; dx, @f] for some $\alpha$ that depends on the present and previous solution. First, diff --git a/examples/step-25/step-25.cc b/examples/step-25/step-25.cc index cf76f0efc8..9ce719834d 100644 --- a/examples/step-25/step-25.cc +++ b/examples/step-25/step-25.cc @@ -1,6 +1,6 @@ /* --------------------------------------------------------------------- * - * Copyright (C) 2006 - 2015 by the deal.II authors + * Copyright (C) 2006 - 2016 by the deal.II authors * * This file is part of the deal.II library. * @@ -397,7 +397,7 @@ namespace Step25 // @sect4{SineGordonProblem::compute_nl_term} // This function computes the vector $S(\cdot,\cdot)$, which appears in the - // nonlinear term in the both equations of the split formulation. This + // nonlinear term in both equations of the split formulation. This // function not only simplifies the repeated computation of this term, but // it is also a fundamental part of the nonlinear iterative solver that we // use when the time stepping is implicit (i.e. $\theta\ne 0$). Moreover, we