getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] [getfem-commits] branch master updated: Fix compilation


From: Konstantinos Poulios
Subject: [Getfem-commits] [getfem-commits] branch master updated: Fix compilation warnings
Date: Tue, 17 Oct 2023 05:06:03 -0400

This is an automated email from the git hooks/post-receive script.

logari81 pushed a commit to branch master
in repository getfem.

The following commit(s) were added to refs/heads/master by this push:
     new 8f534996 Fix compilation warnings
8f534996 is described below

commit 8f5349968d918271bfeb001a2d32fd1686fa42b6
Author: Konstantinos Poulios <logari81@gmail.com>
AuthorDate: Tue Oct 17 11:05:52 2023 +0200

    Fix compilation warnings
---
 src/getfem_generic_assembly_interpolation.cc |  8 ++++----
 src/getfem_plasticity.cc                     | 13 ++++---------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/getfem_generic_assembly_interpolation.cc 
b/src/getfem_generic_assembly_interpolation.cc
index 2f45470f..5fb43322 100644
--- a/src/getfem_generic_assembly_interpolation.cc
+++ b/src/getfem_generic_assembly_interpolation.cc
@@ -593,10 +593,10 @@ namespace getfem {
         box_to_convexes.clear();
         element_boxes.clear();
         base_node bmin(N), bmax(N);
+        const mesh_region &mr = target_mesh.region(target_region);
         const dal::bit_vector&
           convex_index = (target_region == mesh_region::all_convexes().id())
-                       ? target_mesh.convex_index()
-                       : target_mesh.region(target_region).index();
+                       ? target_mesh.convex_index() : mr.index();
         for (dal::bv_visitor cv(convex_index); !cv.finished(); ++cv) {
 
           bgeot::pgeometric_trans pgt = target_mesh.trans_of_convex(cv);
@@ -609,10 +609,10 @@ namespace getfem {
             gmm::clear(bmin);
             gmm::clear(bmax);
           }
+          mesh::ref_mesh_pt_ct cvpts = target_mesh.points_of_convex(cv);
           for (short_type ip = 1; ip < nbd_t; ++ip) {
             // size_type ind = target_mesh.ind_points_of_convex(cv)[ip];
-            const base_node &pt = target_mesh.points_of_convex(cv)[ip];
-
+            const base_node &pt = cvpts[ip];
             for (size_type k = 0; k < N; ++k) {
               bmin[k] = std::min(bmin[k], pt[k]);
               bmax[k] = std::max(bmax[k], pt[k]);
diff --git a/src/getfem_plasticity.cc b/src/getfem_plasticity.cc
index 79166277..5a0ec9c0 100644
--- a/src/getfem_plasticity.cc
+++ b/src/getfem_plasticity.cc
@@ -2193,15 +2193,10 @@ namespace getfem {
 
     pbrick pbr = std::make_shared<elastoplasticity_brick>(ACP);
 
-    model::termlist tl;
-    tl.push_back(model::term_description
-                 (varname, varname, true));
-    model::varnamelist dl(1, datalambda);
-    dl.push_back(datamu);
-    dl.push_back(datathreshold);
-    dl.push_back(datasigma);
-    dl.push_back(data_previous_disp);
-    model::varnamelist vl(1, varname);
+    model::termlist tl{model::term_description(varname, varname, true)};
+    model::varnamelist
+      dl{datalambda, datamu, datathreshold, datasigma, data_previous_disp},
+      vl{varname};
 
     return md.add_brick(pbr, vl, dl, tl,
                         model::mimlist(1,&mim), region);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]