]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace "#if defined(...)" by #ifdef(...) 12381/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 2 Jun 2021 21:44:11 +0000 (17:44 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 2 Jun 2021 21:44:11 +0000 (17:44 -0400)
20 files changed:
include/deal.II/base/partitioner.templates.h
include/deal.II/base/tensor.h
include/deal.II/base/vectorization.h
include/deal.II/differentiation/ad/adolc_math.h
include/deal.II/dofs/dof_accessor.templates.h
include/deal.II/lac/read_write_vector.h
include/deal.II/lac/read_write_vector.templates.h
include/deal.II/lac/trilinos_epetra_vector.h
include/deal.II/lac/trilinos_linear_operator.h
include/deal.II/lac/trilinos_tpetra_communication_pattern.h
include/deal.II/lac/trilinos_tpetra_vector.h
include/deal.II/lac/vector_element_access.h
include/deal.II/numerics/data_out_dof_data.templates.h
source/base/mpi.cc
source/base/utilities.cc
source/lac/trilinos_vector.cc
tests/base/is_finite.cc
tests/base/is_finite_complex.cc
tests/base/log_nan.cc
tests/quick_tests/affinity.cc

index 076dcab77a4623a45eda2b95eea75da286d956cb..c91db2b6d1d14663b74c53d0af49e023dde00622 100644 (file)
@@ -226,7 +226,7 @@ namespace Utilities
                     }
                   else
                     {
-#    if defined(DEAL_II_COMPILER_CUDA_AWARE)
+#    ifdef DEAL_II_COMPILER_CUDA_AWARE
                       cudaError_t cuda_error =
                         cudaMemcpy(ghost_array.data() + ghost_range.first,
                                    ghost_array.data() + offset,
@@ -376,7 +376,7 @@ namespace Utilities
                         }
                       else
                         {
-#    if defined(DEAL_II_COMPILER_CUDA_AWARE)
+#    ifdef DEAL_II_COMPILER_CUDA_AWARE
                           cudaError_t cuda_error =
                             cudaMemcpy(ghost_array_ptr + offset,
                                        ghost_array.data() + my_ghosts->first,
@@ -525,7 +525,7 @@ namespace Utilities
                    "import_from_ghosted_array_start as is passed "
                    "to import_from_ghosted_array_finish."));
 
-#      if defined(DEAL_II_COMPILER_CUDA_AWARE)
+#      ifdef DEAL_II_COMPILER_CUDA_AWARE
           if (std::is_same<MemorySpaceType, MemorySpace::CUDA>::value)
             {
               cudaMemset(ghost_array.data(),
index e777735b5f8cd56289dc9a87f23783185e403530..003b90da86e42dec34d41ac53c60a702a7dbb1f9 100644 (file)
@@ -1050,7 +1050,7 @@ template <typename OtherNumber>
 constexpr inline bool
 Tensor<0, dim, Number>::operator==(const Tensor<0, dim, OtherNumber> &p) const
 {
-#  if defined(DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING)
+#  ifdef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
   Assert(!(std::is_same<Number, adouble>::value ||
            std::is_same<OtherNumber, adouble>::value),
          ExcMessage(
index a58a4aaf043df1c1e49754da7735648a939edec2..f754144e0268b7c4f78faf34a5c069207590233d 100644 (file)
@@ -59,7 +59,7 @@
       "Mismatch in vectorization capabilities: AVX-512F was detected during configuration of deal.II and switched on, but it is apparently not available for the file you are trying to compile at the moment. Check compilation flags controlling the instruction set, such as -march=native."
 #  endif
 
-#  if defined(_MSC_VER)
+#  ifdef _MSC_VER
 #    include <intrin.h>
 #  elif defined(__ALTIVEC__)
 #    include <altivec.h>
index bd7034020cba74687ace924b8d98d61160794b11..d1e79547f08031c415ba46810545dff2f7aba88c 100644 (file)
@@ -123,7 +123,7 @@ namespace std
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(log)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(log10)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(sqrt)
-#    if defined(DEAL_II_ADOLC_WITH_ATRIG_ERF)
+#    ifdef DEAL_II_ADOLC_WITH_ATRIG_ERF
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(erf)
   inline adouble
   erfc(const adouble &x)
@@ -153,7 +153,7 @@ namespace std
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(sinh)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(cosh)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(tanh)
-#    if defined(DEAL_II_ADOLC_WITH_ATRIG_ERF)
+#    ifdef DEAL_II_ADOLC_WITH_ATRIG_ERF
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(asinh)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(acosh)
   DEAL_II_EXPOSE_ADOLC_UNARY_MATH_FUNCTION(atanh)
index 7bf7c0333d0dfe064b59535b20e4f26e78f57b94..dde3407dfb065b3c75770407fff87afe1ccd2316 100644 (file)
@@ -705,7 +705,7 @@ namespace internal
 
 
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
       static std::vector<unsigned int>
       sort_indices(const types::global_dof_index *v_begin,
                    const types::global_dof_index *v_end)
index 2e2fecad4ea5fc7415f07d57ed1f283ea1eb345b..967c3961c9a4940ff0e0112b7c2d3cfe45482818 100644 (file)
@@ -693,7 +693,7 @@ namespace LinearAlgebra
     void
     resize_val(const size_type new_allocated_size);
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
     /**
      * Return a TpetraWrappers::CommunicationPattern and store it for future
index 59f92e4479a10559247a61edc4231571845764ee..ac4bc07f1a981c75ce4558c28998fda38440618f 100644 (file)
@@ -299,7 +299,7 @@ namespace LinearAlgebra
 
 
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
   template <typename Number>
   void
   ReadWriteVector<Number>::reinit(
@@ -570,7 +570,7 @@ namespace LinearAlgebra
 
 
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
   template <typename Number>
   void
@@ -1033,7 +1033,7 @@ namespace LinearAlgebra
 
 
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
   template <typename Number>
   TpetraWrappers::CommunicationPattern
index 400dc2ec5db6c6d78b601a0e65c83fac2372df39..fd717964c690566e6c0ddea4689b1ab9ccef1446 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <deal.II/base/config.h>
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
 
 #  include <deal.II/base/index_set.h>
 #  include <deal.II/base/subscriptor.h>
index 63492c2a15402ea7fec8bdc76369e488bd70bd22..4515a8ee02d566fe82c4e57bd544452bf7a71e83 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <deal.II/base/config.h>
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
 
 #  include <deal.II/lac/block_linear_operator.h>
 #  include <deal.II/lac/linear_operator.h>
index fe14d69af0ba13038c227cfa1253f60c16a75ebe..a746580583f34eed84d83d7488f737baa59717df 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <deal.II/base/config.h>
 
-#if defined(DEAL_II_TRILINOS_WITH_TPETRA)
+#ifdef DEAL_II_TRILINOS_WITH_TPETRA
 
 #  include <deal.II/base/communication_pattern_base.h>
 
index 82fd1aa6061e8c9ff1784284702b74a4c9cbfd79..8e3a56b8b1f0dd1729ff40a6be5d0c42c24ac1a0 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <deal.II/base/config.h>
 
-#if defined(DEAL_II_TRILINOS_WITH_TPETRA)
+#ifdef DEAL_II_TRILINOS_WITH_TPETRA
 
 #  include <deal.II/base/index_set.h>
 #  include <deal.II/base/subscriptor.h>
index ff0c2aa9af1077a927a6fdcbc8d85f17f6dea1b9..2a14cef74ed1980ae247142f2aa7bbcfcbf41335 100644 (file)
@@ -78,7 +78,7 @@ namespace internal
 
 
 
-#if defined(DEAL_II_WITH_TRILINOS)
+#ifdef DEAL_II_WITH_TRILINOS
   template <>
   inline void
   ElementAccess<LinearAlgebra::EpetraWrappers::Vector>::add(
index 547603ce43e6987230aabb27d9fbd9941549529d..d7db51a91937704ad633963509f3188f95e44357 100644 (file)
@@ -665,7 +665,7 @@ namespace internal
 
 
 
-#if defined(DEAL_II_TRILINOS_WITH_TPETRA)
+#ifdef DEAL_II_TRILINOS_WITH_TPETRA
     template <>
     inline void
     VectorHelper<LinearAlgebra::TpetraWrappers::Vector<double>>::extract(
index 83567af5f9e9caca613f01202c468c2618bbd2d9..dd82111c50205f96ffb55b1be774a94c6386b346 100644 (file)
@@ -1017,7 +1017,7 @@ namespace Utilities
         release_unused_memory();
 
       // Next with Trilinos:
-#  if defined(DEAL_II_WITH_TRILINOS)
+#  ifdef DEAL_II_WITH_TRILINOS
       GrowingVectorMemory<
         TrilinosWrappers::MPI::Vector>::release_unused_memory();
       GrowingVectorMemory<
index f687aa26a90131ebc313e65c03bcd859b34c94b0..0534635e6fedc57cfe2451fcf99dc54d2de3cea6 100644 (file)
@@ -914,7 +914,7 @@ namespace Utilities
 
   namespace System
   {
-#if defined(__linux__)
+#ifdef __linux__
 
     double
     get_cpu_load()
@@ -974,7 +974,7 @@ namespace Utilities
       // parsing /proc/self/stat would be a
       // lot easier, but it does not contain
       // VmHWM, so we use /status instead.
-#if defined(__linux__)
+#ifdef __linux__
       std::ifstream file("/proc/self/status");
       std::string   line;
       std::string   name;
index 021da0fd94a96b8b0f82f3be98117f2ac5cfe755..bbe9fc84a7cce0f80d55b3bfe7801fdf81c30c2f 100644 (file)
@@ -259,7 +259,7 @@ namespace TrilinosWrappers
 
           last_action = Insert;
         }
-#  if defined(DEBUG)
+#  ifdef DEBUG
       const Epetra_MpiComm *comm_ptr =
         dynamic_cast<const Epetra_MpiComm *>(&(v.vector->Comm()));
       Assert(comm_ptr != nullptr, ExcInternalError());
@@ -335,7 +335,7 @@ namespace TrilinosWrappers
         }
       else
         vector = std::move(actual_vec);
-#  if defined(DEBUG)
+#  ifdef DEBUG
       const Epetra_MpiComm *comm_ptr =
         dynamic_cast<const Epetra_MpiComm *>(&(vector->Comm()));
       Assert(comm_ptr != nullptr, ExcInternalError());
index 46964a4bbf56c2cfa2bab54f406a432b60836100..5684f9f8e9811881c0698d89154ba2e9ae2d4de8 100644 (file)
@@ -66,7 +66,7 @@ main()
   // unusable since we can no longer detect whether something is a
   // NaN. that said, to make the test work in these cases, simply
   // switch off floating point exceptions for invalid arguments
-#if defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+#ifdef DEAL_II_HAVE_FP_EXCEPTIONS
   fedisableexcept(FE_INVALID);
 #endif
 
index 647ab6eee06320ad11a9c959023f486dbc263dcd..861021831b7defe86d199e5277b0bb64d9616b8a 100644 (file)
@@ -147,7 +147,7 @@ main()
   // unusable since we can no longer detect whether something is a
   // NaN. that said, to make the test work in these cases, simply
   // switch off floating point exceptions for invalid arguments
-#if defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+#ifdef DEAL_II_HAVE_FP_EXCEPTIONS
   fedisableexcept(FE_INVALID);
 #endif
 
index 7f0135beee897bf441e60bfd2b47794af9e3d1ea..dbd5bcd07832db6b0f323c1b7889565405c9cdd6 100644 (file)
@@ -34,7 +34,7 @@ main()
   // unusable since we can no longer detect whether something is a
   // NaN. that said, to make the test work in these cases, simply
   // switch off floating point exceptions for invalid arguments
-#if defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+#ifdef DEAL_II_HAVE_FP_EXCEPTIONS
   fedisableexcept(FE_INVALID);
 #endif
 
index edde64a356d4d1fe23a5309a8b4969d9b4f624a0..460b347c6bbd96f70fcf7862eff6cff6c530b03d 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <deal.II/grid/tria.h>
 
-#if defined(__linux__)
+#ifdef __linux__
 #  include <sched.h>
 #  include <sys/sysinfo.h>
 #endif
@@ -35,7 +35,7 @@ getaffinity(unsigned int &bits_set, unsigned int &mask)
   bits_set = 0;
   mask     = 0x00;
 
-#if defined(__linux__)
+#ifdef __linux__
   cpu_set_t my_set;
   CPU_ZERO(&my_set);
 

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.