From a4bbb4a6e7f6c3f2abd0b1913c24dba095b8aa7c Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 4 Dec 2013 06:57:07 +0000 Subject: [PATCH] Fix segmentation fault. Still need to fix wrong resolution of constraints in distribute_local_to_global git-svn-id: https://svn.dealii.org/trunk@31869 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/lac/constraint_matrix.templates.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index 20a85f4c66..c4762246d8 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -2431,7 +2431,8 @@ ConstraintMatrix::distribute_local_to_global ( local_matrix, col_ptr, val_ptr); const size_type n_values = col_ptr - &cols[0]; if (n_values > 0) - global_matrix.add(row, n_values, &cols[0], &vals[0], false, true); + global_matrix.add(row, n_values, &cols[0], val_ptr-n_values, false, + true); } else internals::resolve_matrix_row (global_rows, i, 0, n_actual_dofs, @@ -2524,7 +2525,8 @@ ConstraintMatrix::distribute_local_to_global ( local_matrix, col_ptr, val_ptr); const size_type n_values = col_ptr - &cols[0]; if (n_values > 0) - global_matrix.add(row, n_values, &cols[0], &vals[0], false, true); + global_matrix.add(row, n_values, &cols[0], val_ptr-n_values, + false, true); } my_scratch_data.in_use = false; @@ -2628,7 +2630,8 @@ distribute_local_to_global (const FullMatrix &local_matrix, const size_type n_values = col_ptr - &cols[0]; if (n_values > 0) global_matrix.block(block, block_col).add(row, n_values, - &cols[0], &vals[0], + &cols[0], + val_ptr-n_values, false, true); } else -- 2.39.5