[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 8392e34b2a5861eed3074c7668acc638faace080
Author: Konstantinos Poulios <address@hidden>
Date: Wed Mar 13 22:07:50 2019 +0100
Revert 1
---
.../getfem_generic_assembly_compile_and_exec.h | 4 ++++
src/getfem_generic_assembly_compile_and_exec.cc | 24 ++++++++++++++++++++++
src/getfem_generic_assembly_interpolation.cc | 19 ++---------------
3 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/src/getfem/getfem_generic_assembly_compile_and_exec.h
b/src/getfem/getfem_generic_assembly_compile_and_exec.h
index 888b2ce..e2372ec 100644
--- a/src/getfem/getfem_generic_assembly_compile_and_exec.h
+++ b/src/getfem/getfem_generic_assembly_compile_and_exec.h
@@ -215,6 +215,10 @@ namespace getfem {
void ga_interpolation_exec(ga_instruction_set &gis,
ga_workspace &workspace,
ga_interpolation_context &gic);
+ void ga_interpolation_single_point_exec
+ (ga_instruction_set &gis, ga_workspace &workspace,
+ const fem_interpolation_context &ctx_x, const base_small_vector &Normal,
+ const mesh &interp_mesh);
} /* end of namespace */
diff --git a/src/getfem_generic_assembly_compile_and_exec.cc
b/src/getfem_generic_assembly_compile_and_exec.cc
index cb7bd65..eab8a04 100644
--- a/src/getfem_generic_assembly_compile_and_exec.cc
+++ b/src/getfem_generic_assembly_compile_and_exec.cc
@@ -7055,6 +7055,30 @@ namespace getfem {
gic.finalize();
}
+ void ga_interpolation_single_point_exec
+ (ga_instruction_set &gis, ga_workspace &workspace,
+ const fem_interpolation_context &ctx_x, const base_small_vector &Normal,
+ const mesh &interp_mesh) {
+ gis.ctx = ctx_x;
+ gis.Normal = Normal;
+ gmm::clear(workspace.assembled_tensor().as_vector());
+ gis.nbpt = 1;
+ gis.ipt = 0;
+ gis.pai = 0;
+
+ for (auto &&instr : gis.all_instructions) {
+ const getfem::mesh &m = *(instr.second.m);
+ GMM_ASSERT1(&m == &interp_mesh,
+ "Incompatibility of meshes in interpolation");
+ auto &gilb = instr.second.begin_instructions;
+ for (size_type j = 0; j < gilb.size(); ++j) j += gilb[j]->exec();
+ auto &gile = instr.second.elt_instructions;
+ for (size_type j = 0; j < gile.size(); ++j) j+=gile[j]->exec();
+ auto &gil = instr.second.instructions;
+ for (size_type j = 0; j < gil.size(); ++j) j += gil[j]->exec();
+ }
+ }
+
void ga_exec(ga_instruction_set &gis, ga_workspace &workspace) {
base_matrix G1, G2;
base_small_vector un;
diff --git a/src/getfem_generic_assembly_interpolation.cc
b/src/getfem_generic_assembly_interpolation.cc
index 9fdddf7..7702ee8 100644
--- a/src/getfem_generic_assembly_interpolation.cc
+++ b/src/getfem_generic_assembly_interpolation.cc
@@ -636,23 +636,8 @@ namespace getfem {
bool compute_derivatives) const {
int ret_type = 0;
- local_gis.ctx = ctx_x;
- local_gis.Normal = Normal;
- local_gis.nbpt = 1;
- local_gis.ipt = 0;
- local_gis.pai = 0;
- gmm::clear(local_workspace.assembled_tensor().as_vector());
-
- for (auto &&instr : local_gis.all_instructions) {
- GMM_ASSERT1(instr.second.m == &m,
- "Incompatibility of meshes in interpolation");
- auto &gilb = instr.second.begin_instructions;
- for (size_type j = 0; j < gilb.size(); ++j) j += gilb[j]->exec();
- auto &gile = instr.second.elt_instructions;
- for (size_type j = 0; j < gile.size(); ++j) j+=gile[j]->exec();
- auto &gil = instr.second.instructions;
- for (size_type j = 0; j < gil.size(); ++j) j += gil[j]->exec();
- }
+ ga_interpolation_single_point_exec(local_gis, local_workspace, ctx_x,
+ Normal, m);
GMM_ASSERT1(local_workspace.assembled_tensor().size()==target_mesh.dim(),
"Wrong dimension of the transformation expression");