From 5ef130723c4a399a8a250b318d2e43c43270d955 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 5 Nov 2016 07:21:42 -0600 Subject: [PATCH] Initialize member variables. --- source/multigrid/multigrid.cc | 49 ++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/source/multigrid/multigrid.cc b/source/multigrid/multigrid.cc index 85118e18c8..d5ccb8210b 100644 --- a/source/multigrid/multigrid.cc +++ b/source/multigrid/multigrid.cc @@ -36,21 +36,24 @@ DEAL_II_NAMESPACE_OPEN MGTransferBlockBase::MGTransferBlockBase () + : + n_mg_blocks (0) {} -MGTransferBlockBase::MGTransferBlockBase ( - const MGConstrainedDoFs &mg_c) +MGTransferBlockBase::MGTransferBlockBase (const MGConstrainedDoFs &mg_c) : + n_mg_blocks (0), mg_constrained_dofs(&mg_c) {} -MGTransferBlockBase::MGTransferBlockBase ( - const ConstraintMatrix &/*c*/, const MGConstrainedDoFs &mg_c) +MGTransferBlockBase::MGTransferBlockBase (const ConstraintMatrix &/*c*/, + const MGConstrainedDoFs &mg_c) : + n_mg_blocks (0), mg_constrained_dofs(&mg_c) {} @@ -197,12 +200,17 @@ MGTransferBlockBase::memory_consumption () const template MGTransferSelect::MGTransferSelect () + : + selected_component (0), + mg_selected_component (0) {} template MGTransferSelect::MGTransferSelect (const ConstraintMatrix &c) : + selected_component (0), + mg_selected_component (0), constraints(&c) {} @@ -246,22 +254,27 @@ void MGTransferSelect::restrict_and_add ( template MGTransferBlockSelect::MGTransferBlockSelect () + : + selected_block (0) {} template -MGTransferBlockSelect::MGTransferBlockSelect ( - const MGConstrainedDoFs &mg_c) - : MGTransferBlockBase(mg_c) +MGTransferBlockSelect::MGTransferBlockSelect (const MGConstrainedDoFs &mg_c) + : + MGTransferBlockBase(mg_c), + selected_block (0) {} template -MGTransferBlockSelect::MGTransferBlockSelect ( - const ConstraintMatrix &/*c*/, const MGConstrainedDoFs &mg_c) - : MGTransferBlockBase(mg_c) +MGTransferBlockSelect::MGTransferBlockSelect (const ConstraintMatrix &/*c*/, + const MGConstrainedDoFs &mg_c) + : + MGTransferBlockBase(mg_c), + selected_block (0) {} @@ -273,10 +286,10 @@ MGTransferBlockSelect::~MGTransferBlockSelect () template -void MGTransferBlockSelect::prolongate ( - const unsigned int to_level, - Vector &dst, - const Vector &src) const +void +MGTransferBlockSelect::prolongate (const unsigned int to_level, + Vector &dst, + const Vector &src) const { Assert ((to_level >= 1) && (to_level<=prolongation_matrices.size()), ExcIndexRange (to_level, 1, prolongation_matrices.size()+1)); @@ -288,10 +301,10 @@ void MGTransferBlockSelect::prolongate ( template -void MGTransferBlockSelect::restrict_and_add ( - const unsigned int from_level, - Vector &dst, - const Vector &src) const +void +MGTransferBlockSelect::restrict_and_add (const unsigned int from_level, + Vector &dst, + const Vector &src) const { Assert ((from_level >= 1) && (from_level<=prolongation_matrices.size()), ExcIndexRange (from_level, 1, prolongation_matrices.size()+1)); -- 2.39.5