From: David Wells Date: Fri, 17 Apr 2020 15:07:01 +0000 (-0400) Subject: step-8: make setup more like step-6. X-Git-Tag: v9.2.0-rc1~211^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=691c5c4f29861f93ef954491ec52f48a7914a5a4;p=dealii.git step-8: make setup more like step-6. --- diff --git a/examples/step-8/step-8.cc b/examples/step-8/step-8.cc index dd95346468..86ddbf978f 100644 --- a/examples/step-8/step-8.cc +++ b/examples/step-8/step-8.cc @@ -222,6 +222,9 @@ namespace Step8 void ElasticProblem::setup_system() { dof_handler.distribute_dofs(fe); + solution.reinit(dof_handler.n_dofs()); + system_rhs.reinit(dof_handler.n_dofs()); + constraints.clear(); DoFTools::make_hanging_node_constraints(dof_handler, constraints); VectorTools::interpolate_boundary_values(dof_handler, @@ -238,9 +241,6 @@ namespace Step8 sparsity_pattern.copy_from(dsp); system_matrix.reinit(sparsity_pattern); - - solution.reinit(dof_handler.n_dofs()); - system_rhs.reinit(dof_handler.n_dofs()); }