From 184e75b0ec264322b9d451dff7535883f6a5f9cf Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 7 May 2008 18:15:50 +0000 Subject: [PATCH] Minor change. git-svn-id: https://svn.dealii.org/trunk@16052 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-33/doc/intro.dox | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/deal.II/examples/step-33/doc/intro.dox b/deal.II/examples/step-33/doc/intro.dox index beca0d1d9d..02acf71a81 100644 --- a/deal.II/examples/step-33/doc/intro.dox +++ b/deal.II/examples/step-33/doc/intro.dox @@ -134,24 +134,28 @@ or Trilinos' GMRES implementation to solve it.

Auto-Differentiation

-Since computing the Jacobian $\partial R$ is a terrible beast, we use an automatic differentiation package, -Sacado, to do this. Sacado is a package within the Trilinos framework and offers a C++ template class Sacado::Fad::DFad (Fad standing for "floating point automatic differentiation") that supports basic arithmetic operators and -functions such as sqrt, sin, cos, pow, etc. In order -to use this feature, one -declares a collection of variables of this type and then denotes -some of this collection as degrees of freedom. These variables are used in an algorithm, and as the variables -are used, their sensitivities with respect to the degrees of freedom are continuously updated. -One can imagine that for the full Jacobian, this could be prohibitively expensive. However, we do -not use the Sacado type for the entire computation, but only element by element. The author has -used this approach side by side with a hand coded Jacobian for the Incompressible Navier-Stokes problem -and found the Sacado approach to be just as fast as using a hand coded -Jacobian, but infinitely simpler and less error prone: Since using the -auto-differentiation requires only that one code the residual $R(\mathbf{W})$, ensuring code correctness -and maintaining code becomes tremendously more simple. +functions such as sqrt, sin, cos, pow, etc. In order to +use this feature, one declares a collection of variables of this type +and then denotes some of this collection as degrees of freedom. These +variables are used in an algorithm, and as the variables are used, +their sensitivities with respect to the degrees of freedom are +continuously updated. One can imagine that for the full Jacobian, +this could be prohibitively expensive. However, we do not use the +Sacado type for the entire computation, but only element by element. +The author has used this approach side by side with a hand coded +Jacobian for the Incompressible Navier-Stokes problem and found the +Sacado approach to be just as fast as using a hand coded Jacobian, but +infinitely simpler and less error prone: Since using the +auto-differentiation requires only that one code the residual +$R(\mathbf{W})$, ensuring code correctness and maintaining code +becomes tremendously more simple. All this said, here's a very simple example showing how Sacado can be used: -- 2.39.5