]> https://gitweb.dealii.org/ - dealii.git/commitdiff
examples/step-69: use std::atomic::load() 9666/head
authorMatthias Maier <tamiko@43-1.org>
Sun, 15 Mar 2020 16:46:36 +0000 (11:46 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 15 Mar 2020 16:46:36 +0000 (11:46 -0500)
This fixes a compilation issue with clang-4

Closes: #9665
examples/step-69/step-69.cc

index 49062a7540d30a00c79a42527b26e6f506df36dc..6d07c5a50078780d269cd04fbd8f332ac3a6e631 100644 (file)
@@ -2064,9 +2064,11 @@ namespace Step69
 
       // This is a good point to verify that the computed
       // <code>tau_max</code> is indeed a valid floating point number.
-      AssertThrow(!std::isnan(tau_max) && !std::isinf(tau_max) && tau_max > 0.,
-                  ExcMessage("I'm sorry, Dave. I'm afraid I can't "
-                             "do that. - We crashed."));
+      AssertThrow(
+        !std::isnan(tau_max.load()) && !std::isinf(tau_max.load()) &&
+          tau_max.load() > 0.,
+        ExcMessage(
+          "I'm sorry, Dave. I'm afraid I can't do that. - We crashed."));
     }
 
     // <b>Step 3</b>: Perform update.

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.