]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Include one more file.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Apr 2009 12:56:44 +0000 (12:56 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Apr 2009 12:56:44 +0000 (12:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@18545 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-31/step-31.cc

index 0d8f8abacd0eb995cc2048705d92e678deeb54f1..b6e3e99de9e75d039270839feac9302888a29212 100644 (file)
@@ -24,6 +24,7 @@
 #include <lac/full_matrix.h>
 #include <lac/solver_gmres.h>
 #include <lac/solver_cg.h>
+#include <lac/block_sparsity_pattern.h>
 #include <lac/constraint_matrix.h>
 
 #include <grid/tria.h>
@@ -1548,7 +1549,7 @@ BoussinesqFlowProblem<dim>::build_stokes_preconditioner ()
   amg_data.aggregation_threshold = 0.02;
   Amg_preconditioner->initialize(stokes_preconditioner_matrix.block(0,0),
                                 amg_data);
-      
+
   Mp_preconditioner = std_cxx0x::shared_ptr<TrilinosWrappers::PreconditionIC>
                      (new TrilinosWrappers::PreconditionIC());
   Mp_preconditioner->initialize(stokes_preconditioner_matrix.block(1,1));
@@ -2263,6 +2264,10 @@ void BoussinesqFlowProblem<dim>::solve ()
       gmres (solver_control,
             SolverGMRES<TrilinosWrappers::BlockVector >::AdditionalData(100));
 
+    for (unsigned int i=0; i<stokes_solution.size(); ++i)
+      if (stokes_constraints.is_constrained(i))
+       stokes_solution(i) = 0;
+
     gmres.solve(stokes_matrix, stokes_solution, stokes_rhs, preconditioner);
 
     stokes_constraints.distribute (stokes_solution);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.