getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] (no subject)


From: Konstantinos Poulios
Subject: [Getfem-commits] (no subject)
Date: Wed, 13 Mar 2019 17:45:22 -0400 (EDT)

branch: debug_assembly_breakage
commit 31d449da0920f67a46d0bb96cc094c5261a794be
Author: Konstantinos Poulios <address@hidden>
Date:   Wed Mar 13 22:44:10 2019 +0100

    Revert 3
---
 src/getfem/getfem_generic_assembly.h     |  9 ++++++---
 src/getfem_generic_assembly_workspace.cc | 22 +++++++++++-----------
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/src/getfem/getfem_generic_assembly.h 
b/src/getfem/getfem_generic_assembly.h
index 32f90f7..93d1855 100644
--- a/src/getfem/getfem_generic_assembly.h
+++ b/src/getfem/getfem_generic_assembly.h
@@ -286,14 +286,17 @@ namespace getfem {
         return q;
       }
 
-      var_description(bool is_var, const mesh_fem *mf_, const im_data *imd_,
-                      gmm::sub_interval I_, const model_real_plain_vector *v,
+      var_description(bool is_var, bool is_fem,
+                      const mesh_fem *mmf, gmm::sub_interval I_,
+                      const model_real_plain_vector *v, const im_data *imd_,
                       size_type Q)
-        : is_variable(is_var), is_fem_dofs(mf_ != 0), mf(mf_), I(I_), V(v),
+        : is_variable(is_var), is_fem_dofs(is_fem), mf(mmf), I(I_), V(v),
           imd(imd_), qdims(1) {
         GMM_ASSERT1(Q > 0, "Bad dimension");
         qdims[0] = Q;
       }
+      var_description() : is_variable(false), is_fem_dofs(false),
+                          mf(0), V(0), imd(0), qdims(1) { qdims[0] = 1; }
     };
 
   public:
diff --git a/src/getfem_generic_assembly_workspace.cc 
b/src/getfem_generic_assembly_workspace.cc
index 4a7237b..761d767 100644
--- a/src/getfem_generic_assembly_workspace.cc
+++ b/src/getfem_generic_assembly_workspace.cc
@@ -45,14 +45,14 @@ namespace getfem {
   void ga_workspace::add_fem_variable
   (const std::string &name, const mesh_fem &mf,
    const gmm::sub_interval &I, const model_real_plain_vector &VV) {
-    variables.emplace(name, var_description(true, &mf, 0, I, &VV, 1));
+    variables[name] = var_description(true, true, &mf, I, &VV, 0, 1);
   }
 
   void ga_workspace::add_fixed_size_variable
   (const std::string &name,
    const gmm::sub_interval &I, const model_real_plain_vector &VV) {
-    variables.emplace(name, var_description(true, 0, 0, I, &VV,
-                                            dim_type(gmm::vect_size(VV))));
+    variables[name] = var_description(true, false, 0, I, &VV, 0,
+                                      dim_type(gmm::vect_size(VV)));
   }
 
   void ga_workspace::add_fem_constant
@@ -62,22 +62,22 @@ namespace getfem {
                              << "has zero degrees of freedom");
     size_type Q = gmm::vect_size(VV)/mf.nb_dof();
     if (Q == 0) Q = size_type(1);
-    variables.emplace(name, var_description(false, &mf, 0,
-                                            gmm::sub_interval(), &VV, Q));
+    variables[name] = var_description(false, true, &mf,
+                                      gmm::sub_interval(), &VV, 0, Q);
   }
 
   void ga_workspace::add_fixed_size_constant
   (const std::string &name, const model_real_plain_vector &VV) {
-    variables.emplace(name, var_description(false, 0, 0,
-                                            gmm::sub_interval(), &VV,
-                                            gmm::vect_size(VV)));
+    variables[name] = var_description(false, false, 0,
+                                      gmm::sub_interval(), &VV, 0,
+                                      gmm::vect_size(VV));
   }
 
   void ga_workspace::add_im_data(const std::string &name, const im_data &imd,
                                  const model_real_plain_vector &VV) {
-    variables.emplace(name, var_description
-      (false, 0, &imd, gmm::sub_interval(), &VV,
-       gmm::vect_size(VV)/(imd.nb_filtered_index() * imd.nb_tensor_elem())));
+    variables[name] = var_description
+      (false, false, 0, gmm::sub_interval(), &VV, &imd,
+       gmm::vect_size(VV)/(imd.nb_filtered_index() * imd.nb_tensor_elem()));
   }
 
   bool ga_workspace::variable_exists(const std::string &name) const {



reply via email to

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