From 691c5c4f29861f93ef954491ec52f48a7914a5a4 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 17 Apr 2020 11:07:01 -0400 Subject: [PATCH] step-8: make setup more like step-6. --- examples/step-8/step-8.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()); } -- 2.39.5