]> https://gitweb.dealii.org/ - dealii-svn.git/log
dealii-svn.git
12 years agoAdd support for in tree metis
maier [Wed, 26 Sep 2012 21:28:43 +0000 (21:28 +0000)]
Add support for in tree metis

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26761 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoSupport in tree UMFPACK and AMD builds
maier [Wed, 26 Sep 2012 21:28:17 +0000 (21:28 +0000)]
Support in tree UMFPACK and AMD builds

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26760 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoadd test case for hang with fe_system with 0 components
heister [Wed, 26 Sep 2012 20:41:14 +0000 (20:41 +0000)]
add test case for hang with fe_system with 0 components

git-svn-id: https://svn.dealii.org/trunk@26759 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRemove a debug output
maier [Wed, 26 Sep 2012 19:53:38 +0000 (19:53 +0000)]
Remove a debug output

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26758 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfixes
maier [Wed, 26 Sep 2012 18:12:27 +0000 (18:12 +0000)]
Bugfixes

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26757 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAn example CMakeLists.txt file for a user project
maier [Wed, 26 Sep 2012 16:37:34 +0000 (16:37 +0000)]
An example CMakeLists.txt file for a user project

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26756 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoadd copy and access functions
kanschat [Wed, 26 Sep 2012 16:29:09 +0000 (16:29 +0000)]
add copy and access functions

git-svn-id: https://svn.dealii.org/trunk@26755 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix some typos in the readme
maier [Wed, 26 Sep 2012 16:24:37 +0000 (16:24 +0000)]
Fix some typos in the readme

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26754 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoTypos
maier [Wed, 26 Sep 2012 16:14:02 +0000 (16:14 +0000)]
Typos

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26753 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix two typos
maier [Wed, 26 Sep 2012 14:49:31 +0000 (14:49 +0000)]
Fix two typos

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26752 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfixes
maier [Wed, 26 Sep 2012 14:49:19 +0000 (14:49 +0000)]
Bugfixes

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26751 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoImplement the client side cmake configuration as well
maier [Wed, 26 Sep 2012 14:49:04 +0000 (14:49 +0000)]
Implement the client side cmake configuration as well

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26750 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Wed, 26 Sep 2012 09:08:22 +0000 (09:08 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26749 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd a bunch of comments
maier [Wed, 26 Sep 2012 09:08:14 +0000 (09:08 +0000)]
Add a bunch of comments

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26748 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Wed, 26 Sep 2012 09:08:00 +0000 (09:08 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26747 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Wed, 26 Sep 2012 07:57:30 +0000 (07:57 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26745 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Wed, 26 Sep 2012 07:54:44 +0000 (07:54 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26744 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 23:08:30 +0000 (23:08 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26743 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 22:42:57 +0000 (22:42 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26742 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix accidentally commited merge conflict
maier [Tue, 25 Sep 2012 22:19:39 +0000 (22:19 +0000)]
Fix accidentally commited merge conflict

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26741 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoA bunch of c&p typos
maier [Tue, 25 Sep 2012 22:14:28 +0000 (22:14 +0000)]
A bunch of c&p typos

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26740 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoA Hack
maier [Tue, 25 Sep 2012 21:05:39 +0000 (21:05 +0000)]
A Hack

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26739 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRemove an obsolete test
maier [Tue, 25 Sep 2012 19:35:52 +0000 (19:35 +0000)]
Remove an obsolete test

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26738 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Tue, 25 Sep 2012 19:35:22 +0000 (19:35 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26737 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd missing include file.
bangerth [Tue, 25 Sep 2012 18:18:42 +0000 (18:18 +0000)]
Add missing include file.

git-svn-id: https://svn.dealii.org/trunk@26736 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd missing include file.
bangerth [Tue, 25 Sep 2012 18:17:44 +0000 (18:17 +0000)]
Add missing include file.

git-svn-id: https://svn.dealii.org/trunk@26735 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoadd test for
heister [Tue, 25 Sep 2012 17:52:19 +0000 (17:52 +0000)]
add test for

git-svn-id: https://svn.dealii.org/trunk@26734 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoSparsityTools::distribute_sparsity_pattern()
heister [Tue, 25 Sep 2012 17:51:58 +0000 (17:51 +0000)]
SparsityTools::distribute_sparsity_pattern()

git-svn-id: https://svn.dealii.org/trunk@26733 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoThe last parts of code duplication
maier [Tue, 25 Sep 2012 17:40:46 +0000 (17:40 +0000)]
The last parts of code duplication

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26732 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCode deduplication
maier [Tue, 25 Sep 2012 17:23:33 +0000 (17:23 +0000)]
Code deduplication

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26731 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoCleanup
maier [Tue, 25 Sep 2012 17:23:19 +0000 (17:23 +0000)]
Cleanup

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26730 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agotest for BlockCompressedSimpleSparsityPattern::column_number()
heister [Tue, 25 Sep 2012 15:58:47 +0000 (15:58 +0000)]
test for BlockCompressedSimpleSparsityPattern::column_number()

git-svn-id: https://svn.dealii.org/trunk@26729 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoadded BlockCompressedSimpleSparsityPattern::column_number()
heister [Tue, 25 Sep 2012 15:58:31 +0000 (15:58 +0000)]
added BlockCompressedSimpleSparsityPattern::column_number()

git-svn-id: https://svn.dealii.org/trunk@26728 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUpdate output files. (In fact, revert them to the state they were before the merge...
bangerth [Tue, 25 Sep 2012 15:21:19 +0000 (15:21 +0000)]
Update output files. (In fact, revert them to the state they were before the merge; there must have been something different in the configuration of the branch that these tests produced different results there.)

git-svn-id: https://svn.dealii.org/trunk@26727 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoA bunch of bugfixes for mpi support
maier [Tue, 25 Sep 2012 13:46:20 +0000 (13:46 +0000)]
A bunch of bugfixes for mpi support

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26724 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMerge from upstream.
bangerth [Tue, 25 Sep 2012 13:24:11 +0000 (13:24 +0000)]
Merge from upstream.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26723 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 13:19:32 +0000 (13:19 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26722 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUse a void* in the argument list of MatShellGetContext as required by the compiler.
bangerth [Tue, 25 Sep 2012 12:32:14 +0000 (12:32 +0000)]
Use a void* in the argument list of MatShellGetContext as required by the compiler.

git-svn-id: https://svn.dealii.org/trunk@26719 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 11:50:53 +0000 (11:50 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26718 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoContrib UMFPACK is broken atm
maier [Tue, 25 Sep 2012 11:45:33 +0000 (11:45 +0000)]
Contrib UMFPACK is broken atm

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26717 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd some more descriptive hints to the other features, too
maier [Tue, 25 Sep 2012 10:26:53 +0000 (10:26 +0000)]
Add some more descriptive hints to the other features, too

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26716 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoA nice error message for PETSc
maier [Tue, 25 Sep 2012 10:26:44 +0000 (10:26 +0000)]
A nice error message for PETSc

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26715 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoTypos
maier [Tue, 25 Sep 2012 10:02:04 +0000 (10:02 +0000)]
Typos

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26714 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 10:01:55 +0000 (10:01 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26713 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoblubb
maier [Tue, 25 Sep 2012 10:01:47 +0000 (10:01 +0000)]
blubb

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26712 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd some documentation
maier [Tue, 25 Sep 2012 10:01:38 +0000 (10:01 +0000)]
Add some documentation

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26711 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 09:25:46 +0000 (09:25 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26710 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Fix the cache logic in FindPETSC.cmake
maier [Tue, 25 Sep 2012 09:19:04 +0000 (09:19 +0000)]
Bugfix: Fix the cache logic in FindPETSC.cmake

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26709 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoClarify some error messages
maier [Tue, 25 Sep 2012 08:15:40 +0000 (08:15 +0000)]
Clarify some error messages

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26707 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 07:56:16 +0000 (07:56 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26706 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix
maier [Tue, 25 Sep 2012 07:52:30 +0000 (07:52 +0000)]
Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26705 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRefactoring
maier [Tue, 25 Sep 2012 07:49:55 +0000 (07:49 +0000)]
Refactoring

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26704 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: We have to install the headers of contrib boost as well...
maier [Tue, 25 Sep 2012 07:49:45 +0000 (07:49 +0000)]
Bugfix: We have to install the headers of contrib boost as well...

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26703 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix branch marker that was erroneously merged.
bangerth [Tue, 25 Sep 2012 03:17:57 +0000 (03:17 +0000)]
Fix branch marker that was erroneously merged.

git-svn-id: https://svn.dealii.org/trunk@26701 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMerge branch_component_mask into mainline.
bangerth [Tue, 25 Sep 2012 03:04:45 +0000 (03:04 +0000)]
Merge branch_component_mask into mainline.

git-svn-id: https://svn.dealii.org/trunk@26700 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUpdate support for Make.global_options.in
maier [Mon, 24 Sep 2012 23:15:56 +0000 (23:15 +0000)]
Update support for Make.global_options.in

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26698 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUpdate the custom targets
maier [Mon, 24 Sep 2012 23:15:36 +0000 (23:15 +0000)]
Update the custom targets

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26697 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoPrettify some output
maier [Mon, 24 Sep 2012 23:15:18 +0000 (23:15 +0000)]
Prettify some output

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26696 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMark some cached variables as advanced
maier [Mon, 24 Sep 2012 23:15:03 +0000 (23:15 +0000)]
Mark some cached variables as advanced

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26695 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRemove debug output
maier [Mon, 24 Sep 2012 22:17:43 +0000 (22:17 +0000)]
Remove debug output

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26694 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: PARENT_SCOPE is way to buggy for this hack
maier [Mon, 24 Sep 2012 22:15:37 +0000 (22:15 +0000)]
Bugfix: PARENT_SCOPE is way to buggy for this hack

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26693 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoremove unused variable
heister [Mon, 24 Sep 2012 22:03:38 +0000 (22:03 +0000)]
remove unused variable

git-svn-id: https://svn.dealii.org/trunk@26692 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoInterface to MatShell matrix-type in PETSc
steigemann [Mon, 24 Sep 2012 21:57:25 +0000 (21:57 +0000)]
Interface to MatShell matrix-type in PETSc

git-svn-id: https://svn.dealii.org/trunk@26691 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoremove compiler warning
heister [Mon, 24 Sep 2012 21:52:45 +0000 (21:52 +0000)]
remove compiler warning

git-svn-id: https://svn.dealii.org/trunk@26690 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoInterface to MatShell matrix-type in PETSc
steigemann [Mon, 24 Sep 2012 21:44:07 +0000 (21:44 +0000)]
Interface to MatShell matrix-type in PETSc

git-svn-id: https://svn.dealii.org/trunk@26689 0785d39b-7218-0410-832d-ea1e28bc413d

12 years ago//---------------------------------------------------------------------------
steigemann [Mon, 24 Sep 2012 20:43:44 +0000 (20:43 +0000)]
//---------------------------------------------------------------------------
//    $Id: petsc_matrix_free.cc 26043 2012-09-24 19:25:57Z steigemann $
//    Version: $Name$
//
//    Copyright (C) 2012 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//---------------------------------------------------------------------------

#include <deal.II/lac/petsc_matrix_free.h>

#ifdef DEAL_II_USE_PETSC

DEAL_II_NAMESPACE_OPEN

namespace PETScWrappers
{
  MatrixFree::MatrixFree ()
            : communicator (PETSC_COMM_SELF)
  {
    const int m=0;
    do_reinit (m, m, m, m);
  }

  MatrixFree::MatrixFree (const MPI_Comm     &communicator,
                          const unsigned int  m,
                          const unsigned int  n,
                          const unsigned int  local_rows,
                          const unsigned int  local_columns)
            : communicator (communicator)
  {
    do_reinit (m, n, local_rows, local_columns);
  }

  MatrixFree::MatrixFree (const MPI_Comm     &communicator,
                          const unsigned int  m,
                          const unsigned int  n,
                          const std::vector<unsigned int> &local_rows_per_process,
                          const std::vector<unsigned int> &local_columns_per_process,
                          const unsigned int  this_process)
            : communicator (communicator)
  {
    Assert (local_rows_per_process.size() == local_columns_per_process.size(),
            ExcDimensionMismatch (local_rows_per_process.size(),
                                  local_columns_per_process.size()));
    Assert (this_process < local_rows_per_process.size(),
            ExcInternalError());

    do_reinit (m, n,
               local_rows_per_process[this_process],
               local_columns_per_process[this_process]);
  }

  MatrixFree::MatrixFree (const unsigned int  m,
                          const unsigned int  n,
                          const unsigned int  local_rows,
                          const unsigned int  local_columns)
            : communicator (MPI_COMM_WORLD)
  {
    do_reinit (m, n, local_rows, local_columns);
  }

  MatrixFree::MatrixFree (const unsigned int  m,
                          const unsigned int  n,
                          const std::vector<unsigned int> &local_rows_per_process,
                          const std::vector<unsigned int> &local_columns_per_process,
                          const unsigned int  this_process)
            : communicator (MPI_COMM_WORLD)
  {
    Assert (local_rows_per_process.size() == local_columns_per_process.size(),
            ExcDimensionMismatch (local_rows_per_process.size(),
                                  local_columns_per_process.size()));
    Assert (this_process < local_rows_per_process.size(),
            ExcInternalError());

    do_reinit (m, n,
               local_rows_per_process[this_process],
               local_columns_per_process[this_process]);
  }

  void MatrixFree::reinit (const MPI_Comm     &communicator,
                           const unsigned int  m,
                           const unsigned int  n,
                           const unsigned int  local_rows,
                           const unsigned int  local_columns)
  {
    this->communicator = communicator;

                                     // destroy the matrix and
                                     // generate a new one
#if DEAL_II_PETSC_VERSION_LT(3,2,0)
    int ierr = MatDestroy (matrix);
#else
    int ierr = MatDestroy (&matrix);
#endif
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    do_reinit (m, n, local_rows, local_columns);
  }

  void MatrixFree::reinit (const MPI_Comm     &communicator,
                           const unsigned int  m,
                           const unsigned int  n,
                           const std::vector<unsigned int> &local_rows_per_process,
                           const std::vector<unsigned int> &local_columns_per_process,
                           const unsigned int  this_process)
  {
    Assert (local_rows_per_process.size() == local_columns_per_process.size(),
            ExcDimensionMismatch (local_rows_per_process.size(),
                                  local_columns_per_process.size()));
    Assert (this_process < local_rows_per_process.size(),
            ExcInternalError());

    this->communicator = communicator;

#if DEAL_II_PETSC_VERSION_LT(3,2,0)
    int ierr = MatDestroy (matrix);
#else
    int ierr = MatDestroy (&matrix);
#endif
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    do_reinit (m, n,
               local_rows_per_process[this_process],
               local_columns_per_process[this_process]);
  }

  void MatrixFree::reinit (const unsigned int  m,
                           const unsigned int  n,
                           const unsigned int  local_rows,
                           const unsigned int  local_columns)
  {
    reinit (MPI_COMM_WORLD, m, n, local_rows, local_columns);
  }

  void MatrixFree::reinit (const unsigned int  m,
                           const unsigned int  n,
                           const std::vector<unsigned int> &local_rows_per_process,
                           const std::vector<unsigned int> &local_columns_per_process,
                           const unsigned int  this_process)
  {
    reinit (MPI_COMM_WORLD, m, n, local_rows_per_process, local_columns_per_process, this_process);
  }

  void MatrixFree::clear ()
  {
#if DEAL_II_PETSC_VERSION_LT(3,2,0)
    int ierr = MatDestroy (matrix);
#else
    int ierr = MatDestroy (&matrix);
#endif
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    const int m=0;
    do_reinit (m, m, m, m);
  }

  void MatrixFree::vmult (Vec  &dst, const Vec  &src) const
  {

//TODO: Translate the given PETSc Vec* vector into a deal.II
// vector so we can call the vmult function with the usual
// interface; then convert back. This could be much more
// efficient, if the PETScWrappers::*::Vector classes
// had a way to simply generate such a vector object from
// a given PETSc Vec* object without allocating new memory
// and without taking ownership of the Vec*

    VectorBase  *x = 0;
    VectorBase  *y = 0;
                                     // because we do not know,
                                     // if dst and src are sequential
                                     // or distributed vectors,
                                     // we ask for the vector-type
                                     // and reinit x and y with
                                     // dealii::PETScWrappers::*::Vector:
    const char  *vec_type;
    int ierr = VecGetType (src, &vec_type);

    PetscInt  local_size;
    ierr = VecGetLocalSize (src, &local_size);
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    if (strcmp(vec_type,"mpi") == 0)
      {
        PetscInt  size;
        ierr = VecGetSize (src, &size);
        AssertThrow (ierr == 0, ExcPETScError(ierr));

        x = new PETScWrappers::MPI::Vector (this->get_mpi_communicator (), size, local_size);
        y = new PETScWrappers::MPI::Vector (this->get_mpi_communicator (), size, local_size);
      }
    else if (strcmp(vec_type,"seq") == 0)
      {
        x = new PETScWrappers::Vector (local_size);
        y = new PETScWrappers::Vector (local_size);
      }
    else
      AssertThrow (false, ExcMessage("PETScWrappers::MPI::MatrixFree::do_matrix_vector_action: "
                                     "This only works for Petsc Vec Type = VECMPI | VECSEQ"));

                                     // copy src to x
    x->equ(1., PETScWrappers::VectorBase(src));
                                     // and call vmult(x,y) which must
                                     // be reimplemented in derived classes
    vmult (*y, *x);

    y->compress();
                                     // copy the result back to dst
    ierr = VecCopy (&(*(*y)), dst);
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    delete (x);
    delete (y);
  }

  int MatrixFree::matrix_free_mult (Mat  A, Vec  src, Vec  dst)
  {
                                     // create a pointer to this MatrixFree
                                     // object and link the given matrix A
                                     // to the matrix-vector multiplication
                                     // of this MatrixFree object,
    MatrixFree  *this_object;
    int ierr = MatShellGetContext (A, &this_object);
    AssertThrow (ierr == 0, ExcPETScError(ierr));

                                     // call vmult of this object:
    this_object->vmult (dst, src);

    return (0);
  }

  void MatrixFree::do_reinit (const unsigned int  m,
                              const unsigned int  n,
                              const unsigned int  local_rows,
                              const unsigned int  local_columns)
  {
    Assert (local_rows <= m, ExcDimensionMismatch (local_rows, m));
    Assert (local_columns <= n, ExcDimensionMismatch (local_columns, n));

    int ierr;
                                     // create a PETSc MatShell matrix-type
                                     // object of dimension m x n and local size
                                     // local_rows x local_columns
    ierr = MatCreateShell(communicator, local_rows, local_columns, m, n, (void*)this, &matrix);
    AssertThrow (ierr == 0, ExcPETScError(ierr));
                                     // register the MatrixFree::matrix_free_mult function
                                     // as the matrix multiplication used by this matrix
    ierr = MatShellSetOperation (matrix, MATOP_MULT,
               (void(*)(void))&dealii::PETScWrappers::MatrixFree::matrix_free_mult);
    AssertThrow (ierr == 0, ExcPETScError(ierr));

    ierr = MatSetFromOptions (matrix);
    AssertThrow (ierr == 0, ExcPETScError(ierr));
  }
}

DEAL_II_NAMESPACE_CLOSE

#endif // DEAL_II_USE_PETSC

git-svn-id: https://svn.dealii.org/trunk@26688 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoSmall Bugfix
maier [Mon, 24 Sep 2012 19:51:03 +0000 (19:51 +0000)]
Small Bugfix

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26685 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix. *cough*
maier [Mon, 24 Sep 2012 19:48:00 +0000 (19:48 +0000)]
Bugfix. *cough*

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26684 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoTypo
maier [Mon, 24 Sep 2012 19:44:20 +0000 (19:44 +0000)]
Typo

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26682 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMake Wolfgang happy #5
maier [Mon, 24 Sep 2012 19:38:02 +0000 (19:38 +0000)]
Make Wolfgang happy #5

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26681 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMake Wolfgang happy #4
maier [Mon, 24 Sep 2012 19:37:34 +0000 (19:37 +0000)]
Make Wolfgang happy #4

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26680 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMake Wolfgang happy #3
maier [Mon, 24 Sep 2012 19:37:10 +0000 (19:37 +0000)]
Make Wolfgang happy #3

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26679 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMake Wolfgang happy #2
maier [Mon, 24 Sep 2012 19:37:00 +0000 (19:37 +0000)]
Make Wolfgang happy #2

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26678 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMake Wolfgang happy #1
maier [Mon, 24 Sep 2012 19:36:47 +0000 (19:36 +0000)]
Make Wolfgang happy #1

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26677 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agofix typo in docu
heister [Mon, 24 Sep 2012 17:45:27 +0000 (17:45 +0000)]
fix typo in docu

git-svn-id: https://svn.dealii.org/trunk@26676 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoChange the variable names for deal as well
maier [Mon, 24 Sep 2012 16:13:39 +0000 (16:13 +0000)]
Change the variable names for deal as well

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26674 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUpdate Make.global_options and unify PACKAGE_VERSION_MAJOR etc.
maier [Mon, 24 Sep 2012 16:13:27 +0000 (16:13 +0000)]
Update Make.global_options and unify PACKAGE_VERSION_MAJOR etc.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26673 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfixes
maier [Mon, 24 Sep 2012 15:56:34 +0000 (15:56 +0000)]
Bugfixes

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26672 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoSupport for petsc #2
maier [Mon, 24 Sep 2012 15:56:22 +0000 (15:56 +0000)]
Support for petsc #2

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26671 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Search for petsc correctly.
maier [Mon, 24 Sep 2012 15:56:08 +0000 (15:56 +0000)]
Bugfix: Search for petsc correctly.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26670 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agomake constructor of IndexSet explicit
heister [Mon, 24 Sep 2012 15:40:45 +0000 (15:40 +0000)]
make constructor of IndexSet explicit

git-svn-id: https://svn.dealii.org/trunk@26668 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRemove file that has been deleted on mainline.
bangerth [Mon, 24 Sep 2012 13:55:26 +0000 (13:55 +0000)]
Remove file that has been deleted on mainline.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26663 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMerge from trunk.
bangerth [Mon, 24 Sep 2012 13:53:31 +0000 (13:53 +0000)]
Merge from trunk.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26662 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoAdd support for petsc, 1st part
maier [Mon, 24 Sep 2012 13:50:38 +0000 (13:50 +0000)]
Add support for petsc, 1st part

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26661 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoThe changes during the reset...
maier [Mon, 24 Sep 2012 13:49:57 +0000 (13:49 +0000)]
The changes during the reset...

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26660 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoSet the merge properties to what is likely the correct value.
bangerth [Mon, 24 Sep 2012 13:35:10 +0000 (13:35 +0000)]
Set the merge properties to what is likely the correct value.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26659 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFinalize the external library hinting and write some documentation
maier [Mon, 24 Sep 2012 12:22:00 +0000 (12:22 +0000)]
Finalize the external library hinting and write some documentation

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26656 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRemove empty folders
maier [Mon, 24 Sep 2012 07:01:46 +0000 (07:01 +0000)]
Remove empty folders

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26653 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoUpdate config.h.in.old
maier [Sun, 23 Sep 2012 21:34:27 +0000 (21:34 +0000)]
Update config.h.in.old

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26652 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Also check for HAVE_UNISTD_H
maier [Sun, 23 Sep 2012 21:20:26 +0000 (21:20 +0000)]
Bugfix: Also check for HAVE_UNISTD_H

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26651 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoDegrade some WARNINGS to STATUS messages
maier [Sun, 23 Sep 2012 21:20:03 +0000 (21:20 +0000)]
Degrade some WARNINGS to STATUS messages

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26650 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoRefactoring
maier [Sun, 23 Sep 2012 19:10:53 +0000 (19:10 +0000)]
Refactoring

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26649 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Enable to overwrite *_RELDIR for DEAL_II_COMPONENT_COMPAT_FILES as well
maier [Sun, 23 Sep 2012 19:10:32 +0000 (19:10 +0000)]
Bugfix: Enable to overwrite *_RELDIR for DEAL_II_COMPONENT_COMPAT_FILES as well

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26648 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoOn the quest to get a working Make.global_options
maier [Sun, 23 Sep 2012 18:11:25 +0000 (18:11 +0000)]
On the quest to get a working Make.global_options

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26647 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoMention DEAL_II_ALLOW_CONTRIB and DEAL_II_FORCE_* in the configuration summary as...
maier [Sun, 23 Sep 2012 17:18:13 +0000 (17:18 +0000)]
Mention DEAL_II_ALLOW_CONTRIB and DEAL_II_FORCE_* in the configuration summary as well

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26646 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix some warnings and error messages
maier [Sun, 23 Sep 2012 16:27:27 +0000 (16:27 +0000)]
Fix some warnings and error messages

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26645 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Only try to extract the metis version number out of a file if it is
maier [Sun, 23 Sep 2012 16:27:03 +0000 (16:27 +0000)]
Bugfix: Only try to extract the metis version number out of a file if it is
actually found.

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26644 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoFix bad markup.
bangerth [Sun, 23 Sep 2012 14:43:19 +0000 (14:43 +0000)]
Fix bad markup.

git-svn-id: https://svn.dealii.org/trunk@26643 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoTypo
maier [Sun, 23 Sep 2012 00:27:55 +0000 (00:27 +0000)]
Typo

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26639 0785d39b-7218-0410-832d-ea1e28bc413d

12 years agoBugfix: Exclude *.svn from installation...
maier [Sun, 23 Sep 2012 00:25:09 +0000 (00:25 +0000)]
Bugfix: Exclude *.svn from installation...

git-svn-id: https://svn.dealii.org/branches/branch_cmake@26638 0785d39b-7218-0410-832d-ea1e28bc413d


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.