[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: |
Mon, 20 Nov 2023 18:08:45 -0500 (EST) |
branch: master
commit 7ff5109eafc10e8536931fa33d342341d7569277
Author: Konstantinos Poulios <logari81@gmail.com>
AuthorDate: Tue Nov 21 00:08:18 2023 +0100
Add missing dependency between fem_global_function and context aware
global_function instances
---
src/getfem_fem_global_function.cc | 6 ++++++
src/getfem_global_function.cc | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/getfem_fem_global_function.cc
b/src/getfem_fem_global_function.cc
index 20648b55..12df23ad 100644
--- a/src/getfem_fem_global_function.cc
+++ b/src/getfem_fem_global_function.cc
@@ -52,6 +52,12 @@ namespace getfem {
GMM_ASSERT1(&m != &dummy_mesh(), "A non-empty mesh object"
" is expected.");
this->add_dependency(m_);
+ for (const pglobal_function &glob_func : funcs) {
+ std::shared_ptr<const context_dependencies>
+ dep = std::dynamic_pointer_cast<const context_dependencies>(glob_func);
+ if (dep)
+ this->add_dependency(*dep);
+ }
init();
}
diff --git a/src/getfem_global_function.cc b/src/getfem_global_function.cc
index bcd2e55e..80bdc66d 100644
--- a/src/getfem_global_function.cc
+++ b/src/getfem_global_function.cc
@@ -815,6 +815,7 @@ namespace getfem {
: global_function(2), dummy_lsets(0, dummy_level_set()),
lsets(dummy_lsets), ls(ls_), fn(fn_) {
cv = size_type(-1);
+ this->add_dependency(ls);
}
};