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: Fri, 3 Apr 2020 20:29:37 -0400 (EDT)

branch: master
commit 4c176ff6596a7966bd55af715834ffec5d71190a
Author: Konstantinos Poulios <address@hidden>
AuthorDate: Sat Feb 1 10:07:06 2020 +0100

    Simplification
---
 .../getfem_generic_assembly_compile_and_exec.h     |  2 ++
 src/getfem_generic_assembly_compile_and_exec.cc    | 28 ++--------------------
 2 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/src/getfem/getfem_generic_assembly_compile_and_exec.h 
b/src/getfem/getfem_generic_assembly_compile_and_exec.h
index 1a39731..e1e36e8 100644
--- a/src/getfem/getfem_generic_assembly_compile_and_exec.h
+++ b/src/getfem/getfem_generic_assembly_compile_and_exec.h
@@ -95,6 +95,8 @@ namespace getfem {
     std::map<gauss_pt_corresp, bgeot::pstored_point_tab> neighbor_corresp;
     std::set<std::pair<std::string,std::string>> unreduced_terms;
 
+    scalar_type ONE=1;
+
     using region_mim_tuple = std::tuple<const mesh_im *, const mesh_region *, 
psecondary_domain>;
     struct region_mim : public region_mim_tuple {
       const mesh_im* mim() const {return 
std::get<0>(static_cast<region_mim_tuple>(*this));}
diff --git a/src/getfem_generic_assembly_compile_and_exec.cc 
b/src/getfem_generic_assembly_compile_and_exec.cc
index 5aa3205..42a74b0 100644
--- a/src/getfem_generic_assembly_compile_and_exec.cc
+++ b/src/getfem_generic_assembly_compile_and_exec.cc
@@ -4534,7 +4534,6 @@ namespace getfem {
   protected:
     const bool false_=false;
     const size_type zero_=0;
-    const scalar_type one_=1;
   };
 
 
@@ -4715,18 +4714,6 @@ namespace getfem {
         (t_, ctx1_, ctx2_, a1, a2, coeff_, zero_, ipt_, false),
         Kxr(K_), Kxu(K_), I1(&I1_), I2__(&I2_), I2(I2__),
         imd1(imd1_), mf2__(&mf2_), mf2(mf2__), reduced_mf2(false_) {}
-
-    ga_instruction_matrix_assembly_imd_mf // constructor without coeff (== 1)
-    (const base_tensor &t_, model_real_sparse_matrix &K_,
-     const fem_interpolation_context &ctx1_,
-     const fem_interpolation_context &ctx2_,
-     const gmm::sub_interval &I1_, const im_data *imd1_, const scalar_type &a1,
-     const gmm::sub_interval &I2_, const mesh_fem &mf2_, const scalar_type &a2,
-     const size_type &ipt_)
-      : ga_instruction_matrix_assembly_base
-        (t_, ctx1_, ctx2_, a1, a2, one_, zero_, ipt_, false),
-        Kxr(K_), Kxu(K_), I1(&I1_), I2__(&I2_), I2(I2__),
-        imd1(imd1_), mf2__(&mf2_), mf2(mf2__), reduced_mf2(false_) {}
   };
 
   struct ga_instruction_matrix_assembly_mf_imd
@@ -4829,17 +4816,6 @@ namespace getfem {
       : ga_instruction_matrix_assembly_base
         (t_, ctx1_, ctx2_, a1, a2, coeff_, zero_, ipt_, false),
         K(K_), I1(I1_), I2(I2_), imd1(imd1_), imd2(imd2_) {}
-
-    ga_instruction_matrix_assembly_imd_imd // constructor without coeff (== 1)
-    (const base_tensor &t_, model_real_sparse_matrix &K_,
-     const fem_interpolation_context &ctx1_,
-     const fem_interpolation_context &ctx2_,
-     const gmm::sub_interval &I1_, const im_data *imd1_, const scalar_type &a1,
-     const gmm::sub_interval &I2_, const im_data *imd2_, const scalar_type &a2,
-     const size_type &ipt_)
-      : ga_instruction_matrix_assembly_base
-        (t_, ctx1_, ctx2_, a1, a2, one_, zero_, ipt_, false),
-        K(K_), I1(I1_), I2(I2_), imd1(imd1_), imd2(imd2_) {}
   };
 
 
@@ -8041,7 +8017,7 @@ namespace getfem {
                   pgai =
                     std::make_shared<ga_instruction_matrix_assembly_imd_mf>
                     (Kq1j2pr, KQJpr, gis.ctx, gis.ctx,
-                     I1, imd1, alpha1, I2, *mf2, alpha2, gis.ipt); // 
constructor without gis.coeff
+                     I1, imd1, gis.ONE, I2, *mf2, gis.ONE, gis.ONE, gis.ipt); 
// without gis.coeff
                     // TODO: name_test2 variable group
                     if (mf2->is_reduced())
                       gis.unreduced_terms.emplace(name_test1, name_test2);
@@ -8049,7 +8025,7 @@ namespace getfem {
                   pgai =
                     std::make_shared<ga_instruction_matrix_assembly_imd_imd>
                     (Kq1j2pr, KQJpr, gis.ctx, gis.ctx,
-                     I1, imd1, alpha1, I2, imd2, alpha2, gis.ipt); // 
constructor without gis.coeff
+                     I1, imd1, gis.ONE, I2, imd2, gis.ONE, gis.ONE, gis.ipt); 
// without gis.coeff
                 rmi.instructions.push_back(std::move(pgai));
               } // for j2
               const bool initialize = true;



reply via email to

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