From: Wolfgang Bangerth Date: Mon, 30 Nov 2020 17:51:08 +0000 (-0700) Subject: Expand on an explanation in step-40. X-Git-Tag: v9.3.0-rc1~824^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54d72d0d6d02d2a7088f36f58b90c19592db6ed3;p=dealii.git Expand on an explanation in step-40. --- diff --git a/examples/step-40/step-40.cc b/examples/step-40/step-40.cc index 2d5daa4113..cb0b66a1ee 100644 --- a/examples/step-40/step-40.cc +++ b/examples/step-40/step-40.cc @@ -30,15 +30,24 @@ #include -// 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 #include #include