based on a patch sent in by Kevin Drzycimski on the mailing list
#
# Are all dependencies fulfilled?
#
-IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_P4EST)
+IF(NOT (DEAL_II_WITH_PETSC OR DEAL_II_WITH_TRILINOS) OR NOT DEAL_II_WITH_P4EST)
MESSAGE(FATAL_ERROR "
Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
DEAL_II_WITH_PETSC = ON
DEAL_II_WITH_P4EST = ON
-One or all of these are OFF in your installation but are required for this tutorial step."
+or
+ DEAL_II_WITH_TRILINOS = ON
+ DEAL_II_WITH_P4EST = ON
+One or both of these combinations are OFF in your installation but at least one is required for this tutorial step."
)
ENDIF()
#include <deal.II/lac/generic_linear_algebra.h>
-#define USE_PETSC_LA
+// uncomment the following #define if you have PETSc and Trilinos installed
+// and you prefer using Trilinos in this example:
+// #define FORCE_USE_OF_TRILINOS
+// This will either import PETSc or TrilinosWrappers into the namespace LA:
namespace LA
{
-#ifdef USE_PETSC_LA
+#if defined(DEAL_II_WITH_PETSC) && !(defined(DEAL_II_WITH_TRILINOS) && defined(FORCE_USE_OF_TRILINOS))
using namespace dealii::LinearAlgebraPETSc;
-#else
+#elif defined(DEAL_II_WITH_TRILINOS)
using namespace dealii::LinearAlgebraTrilinos;
+#else
+#error DEAL_II_WITH_PETSC or DEAL_II_WITH_TRILINOS required
#endif
}
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