]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a test of Paralution and use astyle on modified files.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jun 2014 16:42:19 +0000 (16:42 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jun 2014 16:42:19 +0000 (16:42 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_paralution@33007 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/paralution_precondition.h
deal.II/source/lac/paralution_precondition.cc
deal.II/source/lac/paralution_solver.cc
tests/lac/paralution_solver_02.cc [new file with mode: 0644]
tests/lac/paralution_solver_02.with_paralution=yes.output [new file with mode: 0644]

index 5f07ed91286f18ab2249527c95b55be07525f0c2..4523c21b0d1085b8650a46787aede152cb16b92e 100644 (file)
@@ -45,28 +45,28 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionBase
   {
-    public :
-      /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
-       */
-      struct AdditionalData 
-      {};
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {};
 
-      /**
-       * Constructor. Does not do anything.
-       */
-      PreconditionBase ();
+    /**
+     * Constructor. Does not do anything.
+     */
+    PreconditionBase ();
 
-      friend class SolverBase;
+    friend class SolverBase;
 
-    protected :
-      /**
-       * This is a pointer to the preconditioner object that is used when
-       * applying the preconditioner.
-       */
-      std_cxx1x::shared_ptr<paralution::Preconditioner<paralution::LocalMatrix<Number>,
-        paralution::LocalVector<Number>,Number> > preconditioner;
+  protected :
+    /**
+     * This is a pointer to the preconditioner object that is used when
+     * applying the preconditioner.
+     */
+    std_cxx1x::shared_ptr<paralution::Preconditioner<paralution::LocalMatrix<Number>,
+              paralution::LocalVector<Number>,Number> > preconditioner;
   };
 
 
@@ -81,18 +81,18 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionJacobi : public PreconditionBase<Number>
   {
-    public :
-      /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
-       */               
-      struct AdditionalData
-      {};
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {};
 
-      /**
-       * Constructor.
-       */
-      PreconditionJacobi ();
+    /**
+     * Constructor.
+     */
+    PreconditionJacobi ();
 
   private :
     /**
@@ -114,18 +114,18 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionSGS : public PreconditionBase<Number>
   {
-    public :
-      /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
-       */               
-      struct AdditionalData
-      {};
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {};
 
-      /**
-       * Constructor.
-       */
-      PreconditionSGS ();
+    /**
+     * Constructor.
+     */
+    PreconditionSGS ();
 
   private :
     /**
@@ -148,18 +148,18 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionMultiColoredSGS : public PreconditionBase<Number>
   {
-    public :
-      /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
-       */               
-      struct AdditionalData
-      {};
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {};
 
-      /**
-       * Constructor.
-       */
-      PreconditionMultiColoredSGS ();
+    /**
+     * Constructor.
+     */
+    PreconditionMultiColoredSGS ();
 
   private :
     /**
@@ -182,39 +182,39 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionMultiColoredSOR : public PreconditionBase<Number>
   {
-    public :
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {
       /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
-       */
-      struct AdditionalData
-      {
-        /**
-         * Constructor. By default, set the damping parameter to one.
-         */
-        AdditionalData (const double omega = 1);
-
-        /**
-         * Relaxation parameter.
-         */
-        double omega;
-      };
-
-      /** 
-       * Constructor. Take additional flags if there are any.
+       * Constructor. By default, set the damping parameter to one.
        */
-      PreconditionMultiColoredSOR (const AdditionalData &additional_data = AdditionalData());
+      AdditionalData (const double omega = 1);
 
       /**
-       * This function changes the value of the additional flags.
+       * Relaxation parameter.
        */
-      void initialize (const AdditionalData &additional_data = AdditionalData());
+      double omega;
+    };
 
-    private :
-      /**
-       * Store a copy of the flags for this particular preconditioner.
-       */
-      AdditionalData additional_data;
+    /**
+     * Constructor. Take additional flags if there are any.
+     */
+    PreconditionMultiColoredSOR (const AdditionalData &additional_data = AdditionalData());
+
+    /**
+     * This function changes the value of the additional flags.
+     */
+    void initialize (const AdditionalData &additional_data = AdditionalData());
+
+  private :
+    /**
+     * Store a copy of the flags for this particular preconditioner.
+     */
+    AdditionalData additional_data;
   };
 
 
@@ -229,39 +229,39 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionILU : public PreconditionBase<Number>
   {
-    public :
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {
       /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
+       * Constructor. By default, set the fill-in parameter to zero.
        */
-      struct AdditionalData
-      {
-        /**
-         * Constructor. By default, set the fill-in parameter to zero.
-         */
-        AdditionalData (const unsigned int levels = 0);
-
-        /**
-         * Fill-in parameter.
-         */
-        unsigned int levels;
-      };
+      AdditionalData (const unsigned int levels = 0);
 
       /**
-       * Constructor. Take additional flags if there are any.
+       * Fill-in parameter.
        */
-      PreconditionILU (const AdditionalData &additional_data = AdditionalData());
+      unsigned int levels;
+    };
 
-      /**
-       * This function changes the value of the additional flags.
-       */
-      void initialize (const AdditionalData &additional_data = AdditionalData());
+    /**
+     * Constructor. Take additional flags if there are any.
+     */
+    PreconditionILU (const AdditionalData &additional_data = AdditionalData());
 
-    private :
-      /**
-       * Store a copy of the flags for this particular preconditioner.
-       */
-      AdditionalData additional_data;
+    /**
+     * This function changes the value of the additional flags.
+     */
+    void initialize (const AdditionalData &additional_data = AdditionalData());
+
+  private :
+    /**
+     * Store a copy of the flags for this particular preconditioner.
+     */
+    AdditionalData additional_data;
   };
 
 
@@ -279,49 +279,49 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionILUT : public PreconditionBase<Number>
   {
-    public :
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {
       /**
-       * Standardized data struct to pipe additional flags to the 
-       * preconditioner.
+       * Constructor. By default, set the threshold to zero.
        */
-      struct AdditionalData 
-      {
-        /**
-         * Constructor. By default, set the threshold to zero.
-         */
-        AdditionalData (const Number threshold = 0.);
-
-        /**
-         * Constructor.
-         */
-        AdditionalData (const Number threshold, const unsigned int max_row);
-
-        /**
-         * Threshold.
-         */
-        Number threshold;
-
-        /**
-         * Maximum number of elements per row.
-         */
-        unsigned int max_row;
-      };
+      AdditionalData (const Number threshold = 0.);
 
       /**
-       * Constructor. Take additional flags if there are any.
+       * Constructor.
        */
-      PreconditionILUT (const AdditionalData &additional_data = AdditionalData());
+      AdditionalData (const Number threshold, const unsigned int max_row);
 
       /**
-       * This function changes the value of the additional flags.
+       * Threshold.
        */
-      void initialize (const AdditionalData &additional_data = AdditionalData());
+      Number threshold;
 
-    private :
       /**
-       * Store a copy of the flags for this particular preconditioner.
+       * Maximum number of elements per row.
        */
-      AdditionalData additional_data;
+      unsigned int max_row;
+    };
+
+    /**
+     * Constructor. Take additional flags if there are any.
+     */
+    PreconditionILUT (const AdditionalData &additional_data = AdditionalData());
+
+    /**
+     * This function changes the value of the additional flags.
+     */
+    void initialize (const AdditionalData &additional_data = AdditionalData());
+
+  private :
+    /**
+     * Store a copy of the flags for this particular preconditioner.
+     */
+    AdditionalData additional_data;
   };
 
 
@@ -339,45 +339,45 @@ namespace ParalutionWrappers
   template <typename Number>
   class PreconditionMultiColoredILU : public PreconditionBase<Number>
   {
-    public :
+  public :
+    /**
+     * Standardized data struct to pipe additional flags to the
+     * preconditioner.
+     */
+    struct AdditionalData
+    {
       /**
-       * Standardized data struct to pipe additional flags to the
-       * preconditioner.
+       * Constructor. By default, set the fill-in parameter to zero and the
+       * power-pattern to one.
        */
-      struct AdditionalData
-      {
-        /**
-         * Constructor. By default, set the fill-in parameter to zero and the
-         * power-pattern to one.
-         */
-        AdditionalData (const unsigned int levels = 0, const unsigned int power = 1);
-
-        /**
-         * Fill-in parameter.
-         */
-        unsigned int levels;
-
-        /**
-         * Power parameter.
-         */
-        unsigned int power;
-      };
+      AdditionalData (const unsigned int levels = 0, const unsigned int power = 1);
 
       /**
-       * Constructor. Take additional flags if there are any.
+       * Fill-in parameter.
        */
-      PreconditionMultiColoredILU (const AdditionalData &additional_data = AdditionalData());
+      unsigned int levels;
 
       /**
-       * This function changes the value of additional flags.
+       * Power parameter.
        */
-      void initialize (const AdditionalData &additional_data = AdditionalData());
+      unsigned int power;
+    };
 
-      private :
-      /**
-       * Store a copy of the flags for this particular preconditioner.
-       */
-      AdditionalData additional_data;
+    /**
+     * Constructor. Take additional flags if there are any.
+     */
+    PreconditionMultiColoredILU (const AdditionalData &additional_data = AdditionalData());
+
+    /**
+     * This function changes the value of additional flags.
+     */
+    void initialize (const AdditionalData &additional_data = AdditionalData());
+
+  private :
+    /**
+     * Store a copy of the flags for this particular preconditioner.
+     */
+    AdditionalData additional_data;
   };
 }
 
index 9502c32452c8f444656a3f5aef68ef9ea280bffd..3f77ec78cf5bc6ae34e23e18983bb7372ef4d272 100644 (file)
@@ -34,7 +34,7 @@ namespace ParalutionWrappers
   PreconditionJacobi<Number>::PreconditionJacobi()
   {
     this->preconditioner.reset(new paralution::Jacobi<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
   }
 
 
@@ -45,7 +45,7 @@ namespace ParalutionWrappers
   PreconditionSGS<Number>::PreconditionSGS()
   {
     this->preconditioner.reset(new paralution::SGS<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
   }
 
 
@@ -56,7 +56,7 @@ namespace ParalutionWrappers
   PreconditionMultiColoredSGS<Number>::PreconditionMultiColoredSGS()
   {
     this->preconditioner.reset(new paralution::MultiColoredSGS<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
   }
 
 
@@ -65,35 +65,38 @@ namespace ParalutionWrappers
 
   template <typename Number>
   PreconditionMultiColoredSOR<Number>::AdditionalData::
-  AdditionalData(const double omega) 
-  :
+  AdditionalData(const double omega)
+    :
     omega(omega)
   {}
 
 
+
   template <typename Number>
   PreconditionMultiColoredSOR<Number>::PreconditionMultiColoredSOR(
-      const AdditionalData &additional_data)
-  :
+    const AdditionalData &additional_data)
+    :
     additional_data(additional_data)
   {
     this->preconditioner.reset(new paralution::MultiColoredGS<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
 
     initialize(additional_data);
   }
 
+
+
   template <typename Number>
   void PreconditionMultiColoredSOR<Number>::initialize(const AdditionalData &additional_data)
   {
     // Downcast the preconditioner pointer to use SetRelaxation
     paralution::MultiColoredGS<paralution::LocalMatrix<Number>,paralution::
-      LocalVector<Number>,Number>* downcasted_ptr = static_cast<paralution::
-      MultiColoredGS<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,
-      Number>* >(this->preconditioner.get());
+    LocalVector<Number>,Number>* downcasted_ptr = static_cast<paralution::
+                                                  MultiColoredGS<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,
+                                                  Number>* >(this->preconditioner.get());
 
     downcasted_ptr->SetRelaxation(additional_data.omega);
-  } 
+  }
 
 
 
@@ -101,28 +104,32 @@ namespace ParalutionWrappers
 
   template <typename Number>
   PreconditionILU<Number>::AdditionalData::AdditionalData(const unsigned int levels)
-  :
+    :
     levels(levels)
   {}
 
+
+
   template <typename Number>
   PreconditionILU<Number>::PreconditionILU(const AdditionalData &additional_data)
-  :
+    :
     additional_data(additional_data)
   {
     this->preconditioner.reset(new paralution::ILU<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
-  
+                               paralution::LocalVector<Number>,Number>);
+
     initialize(additional_data);
   }
 
+
+
   template <typename Number>
   void PreconditionILU<Number>::initialize(const AdditionalData &additional_data)
   {
     // Downcast the preconditioner pointer to use Set
     paralution::ILU<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,
-      Number>* downcasted_ptr = static_cast<paralution::ILU<paralution::
-        LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
+               Number>* downcasted_ptr = static_cast<paralution::ILU<paralution::
+                                         LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
 
     downcasted_ptr->Set(additional_data.levels);
   }
@@ -133,42 +140,48 @@ namespace ParalutionWrappers
 
   template <typename Number>
   PreconditionILUT<Number>::AdditionalData::AdditionalData(const Number threshold)
-  :
+    :
     threshold(threshold),
     max_row(0)
   {}
 
+
+
   template <typename Number>
   PreconditionILUT<Number>::AdditionalData::AdditionalData(const Number threshold,
-      const unsigned int max_row)
-  :
+                                                           const unsigned int max_row)
+    :
     threshold(threshold),
     max_row(max_row)
   {}
 
+
+
   template <typename Number>
   PreconditionILUT<Number>::PreconditionILUT(const AdditionalData &additional_data)
-  :
+    :
     additional_data(additional_data)
   {
     this->preconditioner.reset(new paralution::ILUT<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
 
     initialize(additional_data);
-  }  
-  
+  }
+
+
+
   template <typename Number>
   void PreconditionILUT<Number>::initialize(const AdditionalData &additional_data)
   {
     // Downcast the preconditioner pointer to use Set
     paralution::ILUT<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,
-      Number>* downcasted_ptr = static_cast<paralution::ILUT<paralution::
-        LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
+               Number>* downcasted_ptr = static_cast<paralution::ILUT<paralution::
+                                         LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
 
-   if (additional_data.max_row==0)
-     downcasted_ptr->Set(additional_data.threshold);
-   else
-     downcasted_ptr->Set(additional_data.threshold,additional_data.max_row);
+    if (additional_data.max_row==0)
+      downcasted_ptr->Set(additional_data.threshold);
+    else
+      downcasted_ptr->Set(additional_data.threshold,additional_data.max_row);
   }
 
 
@@ -178,30 +191,34 @@ namespace ParalutionWrappers
   template <typename Number>
   PreconditionMultiColoredILU<Number>::AdditionalData::
   AdditionalData(const unsigned int levels, const unsigned int power)
-  :
+    :
     levels(levels),
     power(power)
   {}
 
+
+
   template <typename Number>
   PreconditionMultiColoredILU<Number>::
   PreconditionMultiColoredILU(const AdditionalData &additional_data)
-  :
+    :
     additional_data(additional_data)
   {
     this->preconditioner.reset(new paralution::MultiColoredILU<paralution::LocalMatrix<Number>,
-                   paralution::LocalVector<Number>,Number>);
+                               paralution::LocalVector<Number>,Number>);
 
     initialize(additional_data);
   }
 
+
+
   template <typename Number>
   void PreconditionMultiColoredILU<Number>::initialize(const AdditionalData &additional_data)
   {
     // Downcast the preconditioner pointer to use Set
     paralution::MultiColoredILU<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,
-      Number>* downcasted_ptr = static_cast<paralution::MultiColoredILU<paralution::
-        LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
+               Number>* downcasted_ptr = static_cast<paralution::MultiColoredILU<paralution::
+                                         LocalMatrix<Number>,paralution::LocalVector<Number>,Number>* >(this->preconditioner.get());
 
     downcasted_ptr->Set(additional_data.levels,additional_data.power);
   }
index 59c999830b271504ac70a90ab21532eec495f5cf..623a6f17d33483ed16c03d70b67145de83ccbbdb 100644 (file)
@@ -52,7 +52,7 @@ namespace ParalutionWrappers
     // Set absolute tolerance, relative tolerance, divergence tolerance,
     // maximum number of iterations.
     solver->Init(solver_control.tolerance(),0.,1.e100,
-                solver_control.max_steps());
+                 solver_control.max_steps());
 
     // Move the solver to the accelerator if necessary.
     if (move_to_accelerator==true)
@@ -81,8 +81,8 @@ namespace ParalutionWrappers
                        bool                            move_to_accelerator)
   {
     std_cxx1x::shared_ptr<paralution::CG<paralution::LocalMatrix<Number>,
-      paralution::LocalVector<Number>,Number> > solver(new  paralution::
-        CG<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,Number>);
+              paralution::LocalVector<Number>,Number> > solver(new  paralution::
+                                                               CG<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,Number>);
 
     this->execute_solve<Number>(solver,A,x,b,preconditioner,move_to_accelerator);
   }
@@ -106,8 +106,8 @@ namespace ParalutionWrappers
                              bool                            move_to_accelerator)
   {
     std_cxx1x::shared_ptr<paralution::BiCGStab<paralution::LocalMatrix<Number>,
-      paralution::LocalVector<Number>,Number> > solver(new  paralution::
-        BiCGStab<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,Number>);
+              paralution::LocalVector<Number>,Number> > solver(new  paralution::
+                                                               BiCGStab<paralution::LocalMatrix<Number>,paralution::LocalVector<Number>,Number>);
 
     this->execute_solve<Number>(solver,A,x,b,preconditioner,move_to_accelerator);
   }
@@ -116,6 +116,14 @@ namespace ParalutionWrappers
 
   /* --------------------- SolverGMRES ----------------------- */
 
+  SolverGMRES::AdditionalData::AdditionalData(const unsigned int restart_parameter)
+    :
+    restart_parameter(restart_parameter)
+  {}
+
+
+
+
   SolverGMRES::SolverGMRES (SolverControl        &cn,
                             const AdditionalData &data)
     :
@@ -133,8 +141,8 @@ namespace ParalutionWrappers
                           bool                            move_to_accelerator)
   {
     std_cxx1x::shared_ptr<paralution::GMRES<paralution::LocalMatrix<Number>,
-      paralution::LocalVector<Number>,Number> > solver(new  paralution::
-        GMRES<paralution::LocalMatrix<Number>, paralution::LocalVector<Number>,Number>);
+              paralution::LocalVector<Number>,Number> > solver(new  paralution::
+                                                               GMRES<paralution::LocalMatrix<Number>, paralution::LocalVector<Number>,Number>);
 
     // Set the restart parameter.
     solver->SetBasisSize(additional_data.restart_parameter);
diff --git a/tests/lac/paralution_solver_02.cc b/tests/lac/paralution_solver_02.cc
new file mode 100644 (file)
index 0000000..7bc614a
--- /dev/null
@@ -0,0 +1,74 @@
+// ---------------------------------------------------------------------
+// $Id: paralution_solver_01.cc 31349 2013-10-20 19:07:06Z maier $
+//
+// Copyright (C) 2013 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// Create a test for ParalutionWrappers::SolverGMRES
+
+#include "../tests.h"
+#include "testmatrix.h"
+#include <cmath>
+#include <fstream>
+#include <iomanip>
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/paralution_sparse_matrix.h>
+#include <deal.II/lac/paralution_vector.h>
+#include <deal.II/lac/paralution_solver.h>
+#include <deal.II/lac/paralution_precondition.h>
+
+int main()
+{
+  paralution::init_paralution();
+
+  std::ofstream logfile("output");
+  deallog << std::fixed;
+  deallog << std::setprecision(0);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  SolverControl control(100,1.e-3);
+  ParalutionWrappers::SolverGMRES solver(control);
+
+  for (unsigned int size=4; size<=30; size*=3)
+  {
+    unsigned int dim = (size-1)*(size-1);
+
+    deallog << "Size "<< size <<" Unknowns "<< dim << std::endl;
+
+    // Make matrix 
+    FDMatrix testproblem(size, size);
+    SparsityPattern structure(dim, dim, 5);
+    testproblem.five_point_structure(structure);
+    structure.compress();
+    ParalutionWrappers::SparseMatrix<double> A(structure);
+    testproblem.five_point(A);
+    A.convert_to_paralution_csr();
+
+    //Preconditioner
+    ParalutionWrappers::PreconditionMultiColoredSOR<double> p(1.);
+
+    ParalutionWrappers::Vector<double> u(dim);
+    ParalutionWrappers::Vector<double> f(dim);
+    for (unsigned int i=0; i<dim; ++i)
+    {
+      u[i] = 0.;
+      f[i] = 1.;
+    }
+    solver.solve(A,u,f,p);
+  }
+
+  paralution::stop_paralution();
+}
diff --git a/tests/lac/paralution_solver_02.with_paralution=yes.output b/tests/lac/paralution_solver_02.with_paralution=yes.output
new file mode 100644 (file)
index 0000000..fe1389a
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::Size 4 Unknowns 9
+DEAL::Size 12 Unknowns 121

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.