From c792bc1ec754933637f17a993d19d9c11aa21044 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 3 May 2013 01:02:19 +0000 Subject: [PATCH] more step-32 git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29436 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-32/step-32.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 89e1907695..b250e387dc 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -1845,7 +1845,7 @@ namespace Step32 { stokes_matrix.clear (); -#ifdef PETSC_LA +#ifdef USE_PETSC_LA LA::MPI::CompressedBlockSparsityPattern sp(stokes_partitioning, MPI_COMM_WORLD); #else LA::MPI::CompressedBlockSparsityPattern sp(stokes_partitioning); @@ -2822,15 +2822,28 @@ namespace Step32 if (use_bdf2_scheme == true) { +#ifdef USE_PETSC_LA + temperature_matrix = temperature_mass_matrix; // TODO: fast? + temperature_matrix *= (2*time_step + old_time_step) / + (time_step + old_time_step); + temperature_matrix.add (temperature_stiffness_matrix, time_step); + +#else temperature_matrix.copy_from (temperature_mass_matrix); temperature_matrix *= (2*time_step + old_time_step) / (time_step + old_time_step); temperature_matrix.add (time_step, temperature_stiffness_matrix); +#endif } else { +#ifdef USE_PETSC_LA + temperature_matrix = temperature_mass_matrix; + temperature_matrix.add (temperature_stiffness_matrix, time_step); +#else temperature_matrix.copy_from (temperature_mass_matrix); temperature_matrix.add (time_step, temperature_stiffness_matrix); +#endif } if (rebuild_temperature_preconditioner == true) @@ -3095,6 +3108,7 @@ namespace Step32 }; double global_temperature[2]; + for (unsigned int i=0; i (temperature[0], -- 2.39.5