]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix muparse and change a unsigned type
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 3 Dec 2018 20:48:00 +0000 (21:48 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 3 Dec 2018 20:48:00 +0000 (21:48 +0100)
bundled/muparser_v2_2_4/src/muParserBase.cpp
examples/step-44/step-44.cc

index 770606e7acd07b0f1315851221a6dd3761ecc382..09b0230bf09d1e787d41e97a8f4e89d1cef5467f 100644 (file)
@@ -1040,8 +1040,8 @@ namespace mu
               --sidx; Stack[sidx] = MathImpl<value_type>::Pow(Stack[sidx], Stack[1+sidx]);\r
               continue;\r
 \r
-      case  cmLAND: --sidx; Stack[sidx]  = Stack[sidx] && Stack[sidx+1]; continue;\r
-      case  cmLOR:  --sidx; Stack[sidx]  = Stack[sidx] || Stack[sidx+1]; continue;\r
+      case  cmLAND: --sidx; Stack[sidx]  = (Stack[sidx] != 0.) && (Stack[sidx+1] != 0.); continue;\r
+      case  cmLOR:  --sidx; Stack[sidx]  = (Stack[sidx] != 0.) || (Stack[sidx+1] != 0.); continue;\r
 \r
       case  cmASSIGN: \r
           // Bugfix for Bulkmode:\r
index c40d4af574c5130cfdcf59a75375afe9527c7767..249b66d05a05e221beff087c262fe59f29bb4afc 100644 (file)
@@ -3052,9 +3052,9 @@ namespace Step44
           std::cout << " SLV " << std::flush;
           if (parameters.type_lin == "CG")
             {
-              const int solver_its =
-                static_cast<int>(tangent_matrix.block(u_dof, u_dof).m() *
-                                 parameters.max_iterations_lin);
+              const auto solver_its = static_cast<unsigned int>(
+                tangent_matrix.block(u_dof, u_dof).m() *
+                parameters.max_iterations_lin);
               const double tol_sol =
                 parameters.tol_lin * system_rhs.block(u_dof).l2_norm();
 

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.