[cig-commits] [commit] knepley/fix-dm-composition, next: Solver: Remove DM from Vecs used in MatNullSpace - This avoids a reference cycle (6753495)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Jun 25 17:20:03 PDT 2014
Repository : https://github.com/geodynamics/pylith
On branches: knepley/fix-dm-composition,next
Link : https://github.com/geodynamics/pylith/compare/9e9b3eb32aeee3851bb285945375cc28a2c0fdcf...ffaa715d19b1a8a79173ca5af7d64b65529244c8
>---------------------------------------------------------------
commit 6753495fc98dd431738ab42abd96f19b223fb39f
Author: Matthew G. Knepley <knepley at gmail.com>
Date: Wed Jun 25 17:16:01 2014 -0700
Solver: Remove DM from Vecs used in MatNullSpace
- This avoids a reference cycle
>---------------------------------------------------------------
6753495fc98dd431738ab42abd96f19b223fb39f
libsrc/pylith/problems/Solver.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libsrc/pylith/problems/Solver.cc b/libsrc/pylith/problems/Solver.cc
index ad906fc..fa9f6eb 100644
--- a/libsrc/pylith/problems/Solver.cc
+++ b/libsrc/pylith/problems/Solver.cc
@@ -178,6 +178,8 @@ pylith::problems::Solver::_createNullSpace(const topology::SolutionFields& field
const int m = (spaceDim * (spaceDim + 1)) / 2;
for(int i = 0; i < m; ++i) {
err = VecDuplicate(solutionGlobalVec, &mode[i]);PYLITH_CHECK_ERROR(err);
+ // This is necessary to avoid circular references when we compose this MatNullSpace with a field in the DM
+ err = VecSetDM(mode[i], NULL);PYLITH_CHECK_ERROR(err);
} // for
// :KLUDGE: Assume P1
for(int d = 0; d < spaceDim; ++d) {
More information about the CIG-COMMITS
mailing list