From 21ba85d9421bb3c6fa41a3a13c44fc922d553f49 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 21 May 2021 12:20:39 -0400 Subject: [PATCH] step-78: Fix some minor typos. --- examples/step-78/doc/intro.dox | 10 +++++----- examples/step-78/doc/results.dox | 2 +- examples/step-78/step-78.cc | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/step-78/doc/intro.dox b/examples/step-78/doc/intro.dox index 087e5c93fd..38f53274aa 100644 --- a/examples/step-78/doc/intro.dox +++ b/examples/step-78/doc/intro.dox @@ -66,8 +66,8 @@ In practice, for us to use a finite element method to solve this, we are going to need to bound $\Omega$. Since this equation describes prices, and it doesn't make sense to talk about prices being negative, we will set the lower bound of $\Omega$ to be 0. Then, for an upper bound, we will choose a very large number, -one that $S$ is not very likely to ever get to. We will call this $S_\text{max}$ -. So, $\Omega=[0,S_\text{max}]$. +one that $S$ is not very likely to ever get to. We will call this $S_\text{max}$. +So, $\Omega=[0,S_\text{max}]$. Second, after truncating the domain, we need to ask what boundary values we should pose at this now finite boundary. To take care of this, we use "put-call" @@ -101,7 +101,7 @@ what solving these equations is all about. This means that this is not an equation that is posed going forward in time, but in fact going *backward* in time. Thus it makes sense to solve this problem in reverse by making the change of variables $\tau=T-t$ where now $\tau$ -denotes "time before the strike time $T$". +denotes the time before the strike time $T$. With all of this, we finally end up with the following problem: @f{align*}{ @@ -229,8 +229,8 @@ applicable, we arrive at the following for (2): @f} But, because the matrix $\textbf{B}$ involves an advective term, we will choose $\theta=0$ there -- in other words, we use an explicit Euler method to treat -advection. Conversely, since the matrix $\textbf{D}$ involves the diffusive term -, we will choose $\theta=1/2$ there -- i.e., we treat diffusion using the second +advection. Conversely, since the matrix $\textbf{D}$ involves the diffusive term, +we will choose $\theta=1/2$ there -- i.e., we treat diffusion using the second order Crank-Nicolson method. So, we arrive at the following: diff --git a/examples/step-78/doc/results.dox b/examples/step-78/doc/results.dox index db4bb2d2ad..7e86bcbec3 100644 --- a/examples/step-78/doc/results.dox +++ b/examples/step-78/doc/results.dox @@ -46,7 +46,7 @@ n cells H1 L2 @endcode What is more interesting is the output of the convergence tables. They are -outputted into the console, as well into a LaTex file. The convergence tables +outputted into the console, as well into a LaTeX file. The convergence tables are shown above. Here, you can see that the the solution has a convergence rate of $\mathcal{O}(h)$ with respect to the $H^1$-norm, and the solution has a convergence rate of $\mathcal{O}(h^2)$ with respect to the $L^2$-norm. diff --git a/examples/step-78/step-78.cc b/examples/step-78/step-78.cc index 431e50cbe5..bb2cd42b49 100644 --- a/examples/step-78/step-78.cc +++ b/examples/step-78/step-78.cc @@ -277,7 +277,7 @@ namespace BlackScholesSolver // when the option expires.\n // - asset_volatility: The volatility of the stock price.\n // - interest_rate: The risk free interest rate.\n - // - strike_price: The aggreed upon price that the buyer will + // - strike_price: The agreed upon price that the buyer will // have the option of purchasing the stocks at the expiration time. // // Some slight differences between this program and step-26 are the creation @@ -354,7 +354,7 @@ namespace BlackScholesSolver // they are fairly normal values for these parameters. Although the stock // price has no upper bound in reality (it is in fact infinite), we impose // an upper bound that is twice the strike price. This is a somewhat arbitrary - // choice to be twice the strike price, but it is large enought to see the + // choice to be twice the strike price, but it is large enough to see the // interesting parts of the solution. template BlackScholes::BlackScholes() @@ -539,7 +539,7 @@ namespace BlackScholesSolver // @sect4{BlackScholes::add_results_for_output} - // This is simply the function to stitch the solution peices together. For + // This is simply the function to stitch the solution pieces together. For // this, we create a new layer at each time, and then add the solution vector // for that timestep. The function then stitches this together with the old // solutions using 'build_patches'. @@ -650,7 +650,7 @@ namespace BlackScholesSolver convergence_table.write_tex(error_table_file); // Next, we will make the convergence table. We will again write this to - // the console and to the convergence LaTex file. + // the console and to the convergence LaTeX file. convergence_table.add_column_to_supercolumn("cells", "n cells"); std::vector new_order; new_order.emplace_back("n cells"); -- 2.39.5