* <tr valign="top">
* <td>step-23</td>
* <td> Finally a "real" time dependent problem, the wave equation.
- * Fractional time stepping (explicit, fully implicit and Crank-Nicholson
+ * Fractional time stepping (explicit, fully implicit and
+ * [Crank](https://en.wikipedia.org/wiki/John_Crank)-[Nicolson](https://en.wikipedia.org/wiki/Phyllis_Nicolson)
* method).
* <br/> Keywords: MatrixCreator, VectorTools::project()
* </td></tr>
* </td>
* <td>
* step-12,
+ * step-12b,
* step-21,
* step-39,
* step-46,
to get:
@f[
\left( v_h, \nabla \cdot (\beta u_h) \right)_T
-= -(\nabla v_h, \beta u_h) + \int_\Gamma v_h u_h \beta \cdot n
+= -(\nabla v_h, \beta u_h) + \int_{\partial T} v_h u_h \beta \cdot n
@f]
When summing this expression over all cells $T$, the boundary integral is done over
all internal and external faces and as such there are three cases:
std::vector<double> boundary_values(n_face_q_points);
std::vector<Tensor<2, dim>> k_inverse_values(n_q_points);
- std::vector<Vector<double>> old_solution_values(n_q_points,
+ std::vector<Vector<double>> old_solution_values(n_q_points,
Vector<double>(dim + 2));
- std::vector<std::vector<Tensor<1, dim>>> old_solution_grads(
- n_q_points, std::vector<Tensor<1, dim>>(dim + 2));
const FEValuesExtractors::Vector velocities(0);
const FEValuesExtractors::Scalar pressure(dim);
<h4>Performance optimizations</h4>
-The program developed below has seen a lot of TLC. We have run it over and
-over under profiling tools (mainly <a
+The program developed below has seen a lot of tender loving care.
+We have run it over and over under profiling tools (mainly <a
href="http://www.valgrind.org/">valgrind</a>'s cachegrind and callgrind
tools, as well as the KDE <a
-href="http://kcachegrind.sourceforge.net/">KCachegrind</a> program for
+href="http://kcachegrind.github.io/">KCachegrind</a> program for
visualization) to see where the bottlenecks are. This has paid off: through
this effort, the program has become about four times as fast when
considering the runtime of the refinement cycles zero through three,
that we calculate the nonlinear viscosity as a function of this
intermediate temperature, $\nu_\alpha =
\nu_\alpha\left(\frac 12 T^{n-1}+\frac 12 T^{n-2}\right)$. Note that this
-evaluation of the residual is nothing else than a Crank-Nicholson scheme,
+evaluation of the residual is nothing else than a Crank-Nicolson scheme,
so we can be sure that now everything is alright. One might wonder whether
it is a problem that the numerical viscosity now is not evaluated at
time $n$ (as opposed to the rest of the equation). However, this offset
grid_in.read_ucd(input_file);
}
- dof_handler.clear();
dof_handler.distribute_dofs(fe);
// Size all of the fields.
up with these “hanging nodes” if we do this.
-<h3> Why adapatively refined meshes? </h3>
+<h3> Why adaptively refined meshes? </h3>
Now that you have seen what these adaptively refined meshes look like,
you should ask <i>why</i> we would want to do this. After all, we know from
* Application class performing the theta timestepping scheme.
*
* The theta scheme is an abstraction of implicit and explicit Euler
- * schemes, the Crank-Nicholson scheme and linear combinations of those. The
+ * schemes, the Crank-Nicolson scheme and linear combinations of those. The
* choice of the actual scheme is controlled by the parameter #theta as
* follows.
* <ul>
* <li> #theta=0: explicit Euler scheme
* <li> #theta=1: implicit Euler scheme
- * <li> #theta=½: Crank-Nicholson scheme
+ * <li> #theta=½: Crank-Nicolson scheme
* </ul>
*
- * For fixed #theta, the Crank-Nicholson scheme is the only second order
+ * For fixed #theta, the Crank-Nicolson scheme is the only second order
* scheme. Nevertheless, further stability may be achieved by choosing
* #theta larger than ½, thereby introducing a first order error term. In
* order to avoid a loss of convergence order, the adaptive theta scheme can
* , my_subclass("Forcing term")
* {}
*
- * void MyClass::declare_parmeters(ParameterHandler &prm)
+ * void MyClass::declare_parameters(ParameterHandler &prm)
* {
* // many add_parameter(...);
* }
* if you know which format you want to have, or if you want the format to be
* a runtime parameter, you can write
* @code
- * GridOut::OutputFormat grid_format =
+ * GridOut::OutputFormat output_format =
* GridOut::parse_output_format(get_format_name_from_somewhere());
* std::ofstream output_file("some_filename"
* + GridOut::default_suffix(output_format));