Re: [Getfem-commits] [getfem-commits] branch devel-logari81-interpolate-element-matrices created (now 5f88efb4)
Dear Kostas, All seems perfect to me. This is a usefull adding (I added it also in the documentation). Ok also with the non-usefullness of the normal in ga_instruction_neighbor_transformation_call. Best regards, Yves Le 27/05/2022 à 11:25, Konstantinos Poulios a écrit : Dear Yves, Could you please have a look at these commits, especially the last two, and merge/delete this branch? Kostas On Fri, May 27, 2022 at 11:23 AM Konstantinos Poulios via Getfem-commits wrote: logari81 pushed a change to branch devel-logari81-interpolate-element-matrices. at 5f88efb4 Support element_K and element_B interpolates in GWFL This branch includes the following new commits: new 71eeed57 Minor changes new 4bb1fd6e Avoid passing unused references new 5f88efb4 Support element_K and element_B interpolates in GWFL
[Getfem-commits] (no subject)
branch: master commit f6e4bf85984fdeeb5952a39c5c0707dbad19ead2 Author: Renard Yves AuthorDate: Fri May 27 17:50:06 2022 +0200 minor modification --- doc/sphinx/source/userdoc/gasm_high.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/sphinx/source/userdoc/gasm_high.rst b/doc/sphinx/source/userdoc/gasm_high.rst index 8d4e9bab..e556fa01 100644 --- a/doc/sphinx/source/userdoc/gasm_high.rst +++ b/doc/sphinx/source/userdoc/gasm_high.rst @@ -750,6 +750,8 @@ Once a transformation is defined in the workspace/model, one can interpolate a v Interpolate(Normal, transname) Interpolate(X, transname) + Interpolate(element_K, transname) + Interpolate(element_B, transname) Interpolate(u, transname) Interpolate(Grad_u, transname) Interpolate(Div_u, transname)
[Getfem-commits] [getfem-commits] master updated (57e5e2d4 -> f6e4bf85)
renard pushed a change to branch master. from 57e5e2d4 Bug fix for fixed size test functions in constant matrices add 71eeed57 Minor changes add 4bb1fd6e Avoid passing unused references add 5f88efb4 Support element_K and element_B interpolates in GWFL new f6e4bf85 minor modification Summary of changes: doc/sphinx/source/userdoc/gasm_high.rst | 2 ++ src/getfem/getfem_generic_assembly_tree.h | 2 ++ src/getfem_generic_assembly_compile_and_exec.cc | 48 - src/getfem_generic_assembly_semantic.cc | 42 +- src/getfem_generic_assembly_tree.cc | 14 ++-- 5 files changed, 88 insertions(+), 20 deletions(-)
[Getfem-commits] [getfem-commits] branch devel-logari81-interpolate-element-matrices deleted (was 5f88efb4)
renard pushed a change to branch devel-logari81-interpolate-element-matrices. was 5f88efb4 Support element_K and element_B interpolates in GWFL The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
Re: [Getfem-commits] [getfem-commits] branch devel-logari81-interpolate-element-matrices created (now 5f88efb4)
Dear Yves, Could you please have a look at these commits, especially the last two, and merge/delete this branch? Kostas On Fri, May 27, 2022 at 11:23 AM Konstantinos Poulios via Getfem-commits < getfem-commits@nongnu.org> wrote: > logari81 pushed a change to branch > devel-logari81-interpolate-element-matrices. > > at 5f88efb4 Support element_K and element_B interpolates in GWFL > > This branch includes the following new commits: > > new 71eeed57 Minor changes > new 4bb1fd6e Avoid passing unused references > new 5f88efb4 Support element_K and element_B interpolates in GWFL > > >
[Getfem-commits] [getfem-commits] branch devel-logari81-interpolate-element-matrices created (now 5f88efb4)
logari81 pushed a change to branch devel-logari81-interpolate-element-matrices. at 5f88efb4 Support element_K and element_B interpolates in GWFL This branch includes the following new commits: new 71eeed57 Minor changes new 4bb1fd6e Avoid passing unused references new 5f88efb4 Support element_K and element_B interpolates in GWFL
[Getfem-commits] (no subject)
branch: devel-logari81-interpolate-element-matrices commit 5f88efb4b1be63caceb0193d4db7b256cad80726 Author: Konstantinos Poulios AuthorDate: Fri May 27 11:22:29 2022 +0200 Support element_K and element_B interpolates in GWFL --- src/getfem/getfem_generic_assembly_tree.h | 2 ++ src/getfem_generic_assembly_compile_and_exec.cc | 15 + src/getfem_generic_assembly_semantic.cc | 42 - src/getfem_generic_assembly_tree.cc | 14 +++-- 4 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/getfem/getfem_generic_assembly_tree.h b/src/getfem/getfem_generic_assembly_tree.h index 0d9ad00a..9c9ba7ac 100644 --- a/src/getfem/getfem_generic_assembly_tree.h +++ b/src/getfem/getfem_generic_assembly_tree.h @@ -158,6 +158,8 @@ namespace getfem { GA_NODE_INTERPOLATE_HESS_TEST, GA_NODE_INTERPOLATE_DIVERG_TEST, GA_NODE_INTERPOLATE_X, +GA_NODE_INTERPOLATE_ELT_K, +GA_NODE_INTERPOLATE_ELT_B, GA_NODE_INTERPOLATE_NORMAL, GA_NODE_INTERPOLATE_DERIVATIVE, GA_NODE_ELEMENTARY, diff --git a/src/getfem_generic_assembly_compile_and_exec.cc b/src/getfem_generic_assembly_compile_and_exec.cc index a875de3f..7b1260e5 100644 --- a/src/getfem_generic_assembly_compile_and_exec.cc +++ b/src/getfem_generic_assembly_compile_and_exec.cc @@ -5577,6 +5577,21 @@ namespace getfem { rmi.instructions.push_back(std::move(pgai)); break; +case GA_NODE_INTERPOLATE_ELT_K: +case GA_NODE_INTERPOLATE_ELT_B: + GMM_ASSERT1(!function_case, + "No use of Interpolate is allowed in functions"); + if (pnode->node_type == GA_NODE_INTERPOLATE_ELT_K) +pgai = std::make_shared + (pnode->tensor(), +rmi.interpolate_infos[pnode->interpolate_name].ctx); + else if (pnode->node_type == GA_NODE_INTERPOLATE_ELT_B) +pgai = std::make_shared + (pnode->tensor(), +rmi.interpolate_infos[pnode->interpolate_name].ctx); + rmi.instructions.push_back(std::move(pgai)); + break; + case GA_NODE_SECONDARY_DOMAIN_X: case GA_NODE_SECONDARY_DOMAIN_NORMAL: { diff --git a/src/getfem_generic_assembly_semantic.cc b/src/getfem_generic_assembly_semantic.cc index 6522ba69..a9b5ac31 100644 --- a/src/getfem_generic_assembly_semantic.cc +++ b/src/getfem_generic_assembly_semantic.cc @@ -99,6 +99,8 @@ namespace getfem { pnode->node_type == GA_NODE_INTERPOLATE_HESS_TEST || pnode->node_type == GA_NODE_INTERPOLATE_DIVERG_TEST || pnode->node_type == GA_NODE_INTERPOLATE_X || +pnode->node_type == GA_NODE_INTERPOLATE_ELT_K || +pnode->node_type == GA_NODE_INTERPOLATE_ELT_B || pnode->node_type == GA_NODE_INTERPOLATE_NORMAL) { workspace.interpolate_transformation(pnode->interpolate_name) ->extract_variables(workspace, vars, ignore_data, m, @@ -160,6 +162,8 @@ namespace getfem { if (interpolate_node || interpolate_test_node || pnode->node_type == GA_NODE_INTERPOLATE_X || +pnode->node_type == GA_NODE_INTERPOLATE_ELT_K || +pnode->node_type == GA_NODE_INTERPOLATE_ELT_B || pnode->node_type == GA_NODE_INTERPOLATE_NORMAL) { std::set vars; workspace.interpolate_transformation(pnode->interpolate_name) @@ -381,7 +385,9 @@ namespace getfem { case GA_NODE_XFEM_MINUS_HESS_TEST: case GA_NODE_XFEM_MINUS_DIVERG_TEST: c += 1.33*(1.22+ga_hash_code(pnode->name)); break; -case GA_NODE_INTERPOLATE_X: case GA_NODE_INTERPOLATE_NORMAL: +case GA_NODE_INTERPOLATE_X: +case GA_NODE_INTERPOLATE_ELT_K: case GA_NODE_INTERPOLATE_ELT_B: +case GA_NODE_INTERPOLATE_NORMAL: case GA_NODE_SECONDARY_DOMAIN_X: case GA_NODE_SECONDARY_DOMAIN_NORMAL: c += M_PI*1.33*ga_hash_code(pnode->interpolate_name); break; @@ -450,6 +456,7 @@ namespace getfem { case GA_NODE_RESHAPE: case GA_NODE_CROSS_PRODUCT: case GA_NODE_IND_MOVE_LAST: case GA_NODE_SWAP_IND: case GA_NODE_CONTRACT: case GA_NODE_INTERPOLATE_X: +case GA_NODE_INTERPOLATE_ELT_K: case GA_NODE_INTERPOLATE_ELT_B: case GA_NODE_INTERPOLATE_NORMAL: case GA_NODE_SECONDARY_DOMAIN_X: case GA_NODE_SECONDARY_DOMAIN_NORMAL: pnode->test_function_type = 0; break; @@ -584,6 +591,23 @@ namespace getfem { } break; } + if (pnode->name.compare("element_K") == 0) { +if (pnode->node_type == GA_NODE_INTERPOLATE) { + pnode->node_type = GA_NODE_INTERPOLATE_ELT_K; + if (ref_elt_dim == 1) +pnode->init_vector_tensor(meshdim); + else +pnode->init_matrix_tensor(meshdim, ref_elt_dim); +} +break; + } + if (pnode->name.compare("element_B") == 0) { +if (pnode->node_type == GA_NODE_INTERPOLATE) { + pnode->node_type = GA_NODE_INTERPOLATE_ELT_B; + pnode->init_matrix_tensor(ref_elt_dim, meshdim); +} +break; +
[Getfem-commits] (no subject)
branch: devel-logari81-interpolate-element-matrices commit 4bb1fd6ee30846fa8ea582358de0b39518b8df56 Author: Konstantinos Poulios AuthorDate: Fri May 27 11:20:27 2022 +0200 Avoid passing unused references --- src/getfem_generic_assembly_compile_and_exec.cc | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/getfem_generic_assembly_compile_and_exec.cc b/src/getfem_generic_assembly_compile_and_exec.cc index 14da914f..a875de3f 100644 --- a/src/getfem_generic_assembly_compile_and_exec.cc +++ b/src/getfem_generic_assembly_compile_and_exec.cc @@ -3982,7 +3982,7 @@ namespace getfem { ga_instruction_set::interpolate_info pinterpolate_transformation trans; fem_interpolation_context -base_small_vector +base_small_vector dummy_normal; const mesh size_type papprox_integration @@ -4077,9 +4077,10 @@ namespace getfem { size_type cv; short_type face_num; gmm::clear(inin.Normal); -inin.pt_type = trans->transform(workspace, m, ctx, Normal, &(inin.m), -cv, face_num, P_ref, inin.Normal, -inin.derivatives, false); +inin.pt_type = trans->transform(workspace, m, ctx, dummy_normal, +&(inin.m), cv, face_num, P_ref, +dummy_normal, inin.derivatives, +false); if (inin.pt_type) { if (cv != size_type(-1)) { inin.m->points_of_convex(cv, inin.G); @@ -4111,10 +4112,10 @@ namespace getfem { ga_instruction_neighbor_transformation_call (const ga_workspace , ga_instruction_set::interpolate_info , pinterpolate_transformation t, fem_interpolation_context , - base_small_vector , const mesh , size_type _, - papprox_integration _, bgeot::geotrans_precomp_pool _pool_, + const mesh , size_type _, papprox_integration _, + bgeot::geotrans_precomp_pool _pool_, std::map _corresp_) - : workspace(w), inin(i), trans(t), ctx(ctxx), Normal(No), m(mm), + : workspace(w), inin(i), trans(t), ctx(ctxx), m(mm), ipt(ipt_), pai(pai_), gp_pool(gp_pool_), neighbor_corresp(neighbor_corresp_) {} }; @@ -7257,8 +7258,7 @@ namespace getfem { pgai = std::make_shared (workspace, rmi.interpolate_infos[transname], workspace.interpolate_transformation(transname), gis.ctx, - gis.Normal, m, gis.ipt, gis.pai, gis.gp_pool, - gis.neighbor_corresp); + m, gis.ipt, gis.pai, gis.gp_pool, gis.neighbor_corresp); } else { pgai = std::make_shared (workspace, rmi.interpolate_infos[transname],