[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] [getfem-commits] branch master updated: Bug fix for fix
From: |
Yves Renard |
Subject: |
[Getfem-commits] [getfem-commits] branch master updated: Bug fix for fixed size test functions in constant matrices |
Date: |
Tue, 03 May 2022 03:10:50 -0400 |
This is an automated email from the git hooks/post-receive script.
renard pushed a commit to branch master
in repository getfem.
The following commit(s) were added to refs/heads/master by this push:
new 57e5e2d4 Bug fix for fixed size test functions in constant matrices
57e5e2d4 is described below
commit 57e5e2d431c76987900528a1b7f7badd0d0d3893
Author: Renard Yves <yves.renard@insa-lyon.fr>
AuthorDate: Tue May 3 09:10:36 2022 +0200
Bug fix for fixed size test functions in constant matrices
---
src/getfem_generic_assembly_compile_and_exec.cc | 21 ++++++++++++---------
src/getfem_generic_assembly_semantic.cc | 9 +++++++++
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/getfem_generic_assembly_compile_and_exec.cc
b/src/getfem_generic_assembly_compile_and_exec.cc
index 3d80cc27..8e0ccd32 100644
--- a/src/getfem_generic_assembly_compile_and_exec.cc
+++ b/src/getfem_generic_assembly_compile_and_exec.cc
@@ -2598,8 +2598,8 @@ namespace getfem {
base_tensor &t, &tc1, &tc2;
size_type q;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: unrolled contraction operation of size " <<
N*q
- << " optimized for vectorized second tensor of type 2");
+ GA_DEBUG_INFO("Instruction: unrolled contraction of size " << N*q <<
+ " optimized for vectorized second tensor of type 2");
size_type nn = N*q, s1 = tc1.size()/nn, s2 = tc2.size()/nn, s2_q = s2/q;
size_type s1_qq = s1*q, s2_qq = s2*q;
GA_DEBUG_ASSERT(t.size() == s1*s2, "Internal error");
@@ -2632,7 +2632,7 @@ namespace getfem {
struct ga_instruction_contraction_opt0_2_dunrolled : public ga_instruction {
base_tensor &t, &tc1, &tc2;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: unrolled contraction operation of size " <<
N*Q
+ GA_DEBUG_INFO("Instruction: unrolled contraction of size " << N*Q
<< " optimized for vectorized second tensor of type 2");
size_type s1 = tc1.size()/(N*Q), s2 = tc2.size()/(N*Q), s2_q = s2/Q;
size_type s1_qq = s1*Q, s2_qq = s2*Q;
@@ -2700,7 +2700,7 @@ namespace getfem {
base_tensor &t, &tc1, &tc2;
size_type q;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: unrolled contraction operation of size " <<
N*q
+ GA_DEBUG_INFO("Instruction: unrolled contraction of size " << N*q
<< " optimized for vectorized second tensor of type 2");
size_type nn = N*q, s1 = tc1.size()/nn, s2 = tc2.size()/nn;
size_type s1_q = s1/q, s1_qq = s1*q, s2_qq = s2*q;
@@ -2731,7 +2731,7 @@ namespace getfem {
struct ga_instruction_contraction_opt2_0_dunrolled : public ga_instruction {
base_tensor &t, &tc1, &tc2;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: unrolled contraction operation of size " <<
N*Q
+ GA_DEBUG_INFO("Instruction: unrolled contraction of size " << N*Q
<< " optimized for vectorized second tensor of type 2");
size_type s1 = tc1.size()/(N*Q), s2 = tc2.size()/(N*Q);
size_type s1_q = s1/Q, s1_qq = s1*Q, s2_qq = s2*Q;
@@ -4547,7 +4547,7 @@ namespace getfem {
const mesh_fem *const&mf1, *const&mf2, *const mf1__, *const mf2__;
const bool &reduced_mf1, &reduced_mf2; // refs to mf1/2->is_reduced()
virtual int exec() {
- GA_DEBUG_INFO("Instruction: matrix term assembly");
+ GA_DEBUG_INFO("Instruction: matrix term assembly mf-mf");
if (!ctx1.is_convex_num_valid() || !ctx2.is_convex_num_valid()) return 0;
bool initialize = (ipt == 0 || interpolate);
@@ -4666,7 +4666,8 @@ namespace getfem {
const mesh_fem * const mf2__, * const &mf2;
const bool &reduced_mf2; // ref to mf2->is_reduced()
virtual int exec() {
- GA_DEBUG_INFO("Instruction: matrix term assembly");
+ GA_DEBUG_INFO("Instruction: matrix term assembly "
+ "(imdata or fixed size)-mf");
if (!ctx1.is_convex_num_valid() || !ctx2.is_convex_num_valid()) return 0;
bool empty_weight = (coeff == scalar_type(0));
@@ -4727,7 +4728,8 @@ namespace getfem {
const bool &reduced_mf1; // ref to mf1->is_reduced()
const im_data *imd2;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: matrix term assembly");
+ GA_DEBUG_INFO("Instruction: matrix term assembly "
+ "mf-(imdata or fixed size)");
if (!ctx1.is_convex_num_valid() || !ctx2.is_convex_num_valid()) return 0;
bool empty_weight = (coeff == scalar_type(0));
@@ -4788,7 +4790,8 @@ namespace getfem {
const gmm::sub_interval &I1, &I2;
const im_data *imd1, *imd2;
virtual int exec() {
- GA_DEBUG_INFO("Instruction: matrix term assembly");
+ GA_DEBUG_INFO("Instruction: matrix term assembly "
+ "(imdata or fixed size)-(imdata or fixed size)");
GA_DEBUG_ASSERT(I1.size() && I2.size(), "Internal error");
bool empty_weight = (coeff == scalar_type(0));
diff --git a/src/getfem_generic_assembly_semantic.cc
b/src/getfem_generic_assembly_semantic.cc
index ce38aaa6..6522ba69 100644
--- a/src/getfem_generic_assembly_semantic.cc
+++ b/src/getfem_generic_assembly_semantic.cc
@@ -1606,6 +1606,15 @@ namespace getfem {
for (int i = int(mi.size()-1); i >= to_add; --i)
mi[i] = mi[i-to_add];
for (int i = 0; i < to_add; ++i) mi[i] = 2;
+ if (pnode->test_function_type & 1 &&
+ !(workspace.associated_mf(pnode->name_test1))
+ && !(workspace.associated_im_data(pnode->name_test1)))
+ mi[0] = gmm::vect_size(workspace.value(pnode->name_test1));
+ if (pnode->test_function_type & 2 &&
+ !(workspace.associated_mf(pnode->name_test2))
+ && !(workspace.associated_im_data(pnode->name_test2)))
+ mi[(pnode->test_function_type & 1) ? 1 : 0]
+ = gmm::vect_size(workspace.value(pnode->name_test2));
pnode->tensor().adjust_sizes(mi);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] [getfem-commits] branch master updated: Bug fix for fixed size test functions in constant matrices,
Yves Renard <=