]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Aboid using std::bind1st in FE_Nedelec_SZ 6562/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 10 May 2018 00:40:45 +0000 (02:40 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 10 May 2018 00:40:45 +0000 (02:40 +0200)
source/fe/fe_nedelec_sz.cc

index f2acd8c33dbe6a086b84c7c561660813a1c6bc3d..487f39c6fa041a5da436493d3eb7109a1d4d1283 100644 (file)
@@ -985,11 +985,11 @@ void FE_NedelecSZ<dim>::fill_edge_values(const typename Triangulation<dim,dim>::
             {
               std::transform (edge_sigma_values[m].begin(), edge_sigma_values[m].end(),
                               edge_sigma_values[m].begin(),
-                              std::bind1st (std::multiplies<double> (), static_cast<double>(edge_sign[m])));
+              [&](const double edge_sigma_value) {return edge_sign[m]*edge_sigma_value;});
 
               std::transform (edge_sigma_grads[m].begin(), edge_sigma_grads[m].end(),
                               edge_sigma_grads[m].begin(),
-                              std::bind1st (std::multiplies<double> (), static_cast<double>(edge_sign[m])));
+              [&](const double edge_sigma_grad) {return edge_sign[m]*edge_sigma_grad;});
             }
 
           // If we want to generate shape gradients then we need second derivatives of the 1d polynomials,
@@ -1131,10 +1131,10 @@ void FE_NedelecSZ<dim>::fill_edge_values(const typename Triangulation<dim,dim>::
             {
               std::transform (edge_sigma_values[m].begin(), edge_sigma_values[m].end(),
                               edge_sigma_values[m].begin(),
-                              std::bind1st (std::multiplies<double> (), static_cast<double>(edge_sign[m])));
+              [&](const double edge_sigma_value) {return edge_sign[m]*edge_sigma_value;});
               std::transform (edge_sigma_grads[m].begin(), edge_sigma_grads[m].end(),
                               edge_sigma_grads[m].begin(),
-                              std::bind1st (std::multiplies<double> (), static_cast<double>(edge_sign[m])));
+              [&](const double edge_sigma_grad) {return edge_sign[m]*edge_sigma_grad;});
             }
 
           // Now calculate the edge-based shape functions:

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.