]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Expand on an explanation in step-40.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Nov 2020 17:51:08 +0000 (10:51 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 30 Nov 2020 17:51:08 +0000 (10:51 -0700)
examples/step-40/step-40.cc

index 2d5daa4113e64af6b3d46453d46d7bb36ac402a1..cb0b66a1eeb163ee9416cc5534b2905d6dce1193 100644 (file)
 
 #include <deal.II/lac/generic_linear_algebra.h>
 
-// uncomment the following \#define if you have PETSc and Trilinos installed
-// and you prefer using Trilinos in this example:
+// This program can use either PETSc or Trilinos for its parallel
+// algebra needs. By default, if deal.II has been configured with
+// PETSc, it will use PETSc. Otherwise, the following few lines will
+// check that deal.II has been configured with Trilinos and take that.
+//
+// But there may be cases where you want to use Trilinos, even though
+// deal.II has *also* been configured with PETSc, for example to
+// compare the performance of these two libraries. To do this,
+// add the following `\#define` to the source code:
 // @code
 // #define FORCE_USE_OF_TRILINOS
 // @endcode
-
-// This will either import PETSc or TrilinosWrappers into the namespace
-// LA. Note that we are defining the macro USE_PETSC_LA so that we can detect
-// if we are using PETSc (see solve() for an example where this is necessary)
+//
+// Using this logic, the following lines will then import either the
+// PETSc or Trilinos wrappers into the namespace `LA` (for "linear
+// algebra). In the former case, we are also defining the macro
+// `USE_PETSC_LA` so that we can detect if we are using PETSc (see
+// solve() for an example where this is necessary).
 namespace LA
 {
 #if defined(DEAL_II_WITH_PETSC) && !defined(DEAL_II_PETSC_WITH_COMPLEX) && \
@@ -52,6 +61,7 @@ namespace LA
 #endif
 } // namespace LA
 
+
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.