]> https://gitweb.dealii.org/ - dealii-svn.git/log
dealii-svn.git
12 years agomerge from mainline
heister [Mon, 1 Oct 2012 15:23:44 +0000 (15:23 +0000)]
merge from mainline

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

12 years agoUpdate documentation in a couple of places.
bangerth [Sun, 30 Sep 2012 16:06:12 +0000 (16:06 +0000)]
Update documentation in a couple of places.

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

12 years agoRemove some old parts of the code dealing with PETSc versions prior to 2.3. Add some...
bangerth [Fri, 28 Sep 2012 23:29:04 +0000 (23:29 +0000)]
Remove some old parts of the code dealing with PETSc versions prior to 2.3. Add some comments.

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

12 years agosimplify more dublicated code in fe_system
heister [Fri, 28 Sep 2012 21:56:08 +0000 (21:56 +0000)]
simplify more dublicated code in fe_system

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

12 years agosimplify dublicated code in fe_system
heister [Fri, 28 Sep 2012 21:49:00 +0000 (21:49 +0000)]
simplify dublicated code in fe_system

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

12 years agomove test into bits because it works now
heister [Fri, 28 Sep 2012 19:38:07 +0000 (19:38 +0000)]
move test into bits because it works now

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

12 years agoupdate test output
heister [Fri, 28 Sep 2012 19:33:56 +0000 (19:33 +0000)]
update test output

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

12 years agoupdate tests for FESystem
heister [Fri, 28 Sep 2012 19:32:59 +0000 (19:32 +0000)]
update tests for FESystem

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

12 years agoFESystem can now deal with n_elements==0 for a block. Remove a ton of dublicated...
heister [Fri, 28 Sep 2012 19:32:18 +0000 (19:32 +0000)]
FESystem can now deal with n_elements==0 for a block. Remove a ton of dublicated code in the process.

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

12 years agoChange make_dependencies to ignore -D command line options rather than error out
heien [Fri, 28 Sep 2012 18:24:15 +0000 (18:24 +0000)]
Change make_dependencies to ignore -D command line options rather than error out

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

12 years agoMove a piece of code where it is necessary.
bangerth [Fri, 28 Sep 2012 18:04:37 +0000 (18:04 +0000)]
Move a piece of code where it is necessary.

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

12 years agobenchmark: add test for plotting
heister [Fri, 28 Sep 2012 16:22:30 +0000 (16:22 +0000)]
benchmark: add test for plotting

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

12 years agoextend documentation
heister [Fri, 28 Sep 2012 15:36:01 +0000 (15:36 +0000)]
extend documentation

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

12 years agotypo in documentation
heister [Fri, 28 Sep 2012 15:34:14 +0000 (15:34 +0000)]
typo in documentation

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

12 years agoSay which section can't be entered in an assertion.
bangerth [Fri, 28 Sep 2012 15:33:06 +0000 (15:33 +0000)]
Say which section can't be entered in an assertion.

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

12 years agoFix the way we let the normalize.pl script know about where the deal.II directory is.
bangerth [Fri, 28 Sep 2012 12:56:27 +0000 (12:56 +0000)]
Fix the way we let the normalize.pl script know about where the deal.II directory is.

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

12 years agoFind the path to deal.II some other way.
bangerth [Fri, 28 Sep 2012 02:40:49 +0000 (02:40 +0000)]
Find the path to deal.II some other way.

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

12 years agoUpdate.
bangerth [Fri, 28 Sep 2012 02:40:23 +0000 (02:40 +0000)]
Update.

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

12 years agoRemove this file. I've put it on the google code wiki.
bangerth [Fri, 28 Sep 2012 00:22:49 +0000 (00:22 +0000)]
Remove this file. I've put it on the google code wiki.

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

12 years agoRemove now deleted files from the list of things where stuff has to be substitutes.
bangerth [Thu, 27 Sep 2012 23:57:53 +0000 (23:57 +0000)]
Remove now deleted files from the list of things where stuff has to be substitutes.

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

12 years agonicer error message when refining an empty Triangulation
heister [Thu, 27 Sep 2012 22:14:23 +0000 (22:14 +0000)]
nicer error message when refining an empty Triangulation

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

12 years agofix benchmark script loop
heister [Thu, 27 Sep 2012 19:03:14 +0000 (19:03 +0000)]
fix benchmark script loop

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

12 years agoadd Assert for make_periodicity_constraints for a distributed Triangulation
heister [Thu, 27 Sep 2012 18:51:52 +0000 (18:51 +0000)]
add Assert for make_periodicity_constraints for a distributed Triangulation

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

12 years agofix typo in comment
heister [Thu, 27 Sep 2012 18:49:46 +0000 (18:49 +0000)]
fix typo in comment

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

12 years agoimprove documentation for make_periodicity_constraints
heister [Thu, 27 Sep 2012 18:26:37 +0000 (18:26 +0000)]
improve documentation for make_periodicity_constraints

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

12 years agoRemove from here since it has moved to the homepage/RELEASE directory.
bangerth [Thu, 27 Sep 2012 17:26:27 +0000 (17:26 +0000)]
Remove from here since it has moved to the homepage/RELEASE directory.

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

12 years agoReindent a bunch of places to make merging from mainline simpler.
bangerth [Thu, 27 Sep 2012 17:02:48 +0000 (17:02 +0000)]
Reindent a bunch of places to make merging from mainline simpler.

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

12 years agoSet properties.
bangerth [Thu, 27 Sep 2012 17:01:58 +0000 (17:01 +0000)]
Set properties.

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

12 years agoSet properties.
bangerth [Thu, 27 Sep 2012 16:59:11 +0000 (16:59 +0000)]
Set properties.

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

12 years agoFix indentation.
bangerth [Thu, 27 Sep 2012 16:58:59 +0000 (16:58 +0000)]
Fix indentation.

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

12 years agoOnly output a list of parameters if there are any. Otherwise we
bangerth [Thu, 27 Sep 2012 16:58:13 +0000 (16:58 +0000)]
Only output a list of parameters if there are any. Otherwise we
end up with an empty {itemize} list which latex does not like.

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

12 years agoMove the 'normalize' and 'status_to_report' scripts to the tests directory.
bangerth [Thu, 27 Sep 2012 16:54:06 +0000 (16:54 +0000)]
Move the 'normalize' and 'status_to_report' scripts to the tests directory.

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

12 years agoFix a bunch of malformed indentations to make merging from mainline less painful.
bangerth [Thu, 27 Sep 2012 16:52:31 +0000 (16:52 +0000)]
Fix a bunch of malformed indentations to make merging from mainline less painful.

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

12 years agoRemove a subdirectory that only contains tools we never seem to
bangerth [Thu, 27 Sep 2012 16:52:25 +0000 (16:52 +0000)]
Remove a subdirectory that only contains tools we never seem to
use.

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

12 years agoConvert several tutorial programs to the ComponentMask approach.
bangerth [Thu, 27 Sep 2012 16:52:24 +0000 (16:52 +0000)]
Convert several tutorial programs to the ComponentMask approach.

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

12 years agoFix one place where the syntax has to be adjusted to the new ComponentMask class.
bangerth [Thu, 27 Sep 2012 16:52:19 +0000 (16:52 +0000)]
Fix one place where the syntax has to be adjusted to the new ComponentMask class.

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

12 years agoRemove a script that generates a TODO file. doxygen does this in a more elegant way...
bangerth [Thu, 27 Sep 2012 16:52:16 +0000 (16:52 +0000)]
Remove a script that generates a TODO file. doxygen does this in a more elegant way, as does Eclipse. It's also easy to do with a grep command.

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

12 years agoRemove more old stuff.
bangerth [Thu, 27 Sep 2012 16:52:12 +0000 (16:52 +0000)]
Remove more old stuff.

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

12 years agoRemove scripts that haven't been used in a long time.
bangerth [Thu, 27 Sep 2012 16:52:11 +0000 (16:52 +0000)]
Remove scripts that haven't been used in a long time.

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

12 years agoRemove a script that nobody seems to recall what exactly it does.
bangerth [Thu, 27 Sep 2012 16:52:07 +0000 (16:52 +0000)]
Remove a script that nobody seems to recall what exactly it does.

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

12 years agoRemove a script that hasn't been useful since we switched to svn :-)
bangerth [Thu, 27 Sep 2012 16:52:05 +0000 (16:52 +0000)]
Remove a script that hasn't been useful since we switched to svn :-)

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

12 years agouse the logic in Triangulation instead of copying it
kanschat [Thu, 27 Sep 2012 09:04:15 +0000 (09:04 +0000)]
use the logic in Triangulation instead of copying it

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

12 years agoremove console output
kanschat [Thu, 27 Sep 2012 08:51:08 +0000 (08:51 +0000)]
remove console output

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

12 years agoadd faces and output file
kanschat [Thu, 27 Sep 2012 08:49:54 +0000 (08:49 +0000)]
add faces and output file

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

12 years agotest iterator functions of DoFHandler
kanschat [Thu, 27 Sep 2012 08:37:30 +0000 (08:37 +0000)]
test iterator functions of DoFHandler

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

12 years agoadd missing copy function to MGDoFAccessor
kanschat [Thu, 27 Sep 2012 08:18:43 +0000 (08:18 +0000)]
add missing copy function to MGDoFAccessor

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

12 years agoallow writing to Logstream
kanschat [Thu, 27 Sep 2012 08:07:52 +0000 (08:07 +0000)]
allow writing to Logstream

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

12 years agoAdded iostream to table_handler.cc
cazamias [Thu, 27 Sep 2012 00:04:20 +0000 (00:04 +0000)]
Added iostream to table_handler.cc

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

12 years agoSmall fixes to get_times program
cazamias [Wed, 26 Sep 2012 23:43:44 +0000 (23:43 +0000)]
Small fixes to get_times program

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

12 years agoimprove Makefile
heister [Wed, 26 Sep 2012 23:15:13 +0000 (23:15 +0000)]
improve Makefile

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

12 years agoUpdated benchmark script with correct name
cazamias [Wed, 26 Sep 2012 23:14:56 +0000 (23:14 +0000)]
Updated benchmark script with correct name

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

12 years agoadd simple makefile for benchmark analyse script
heister [Wed, 26 Sep 2012 23:13:42 +0000 (23:13 +0000)]
add simple makefile for benchmark analyse script

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

12 years agoModified bench script
cazamias [Wed, 26 Sep 2012 23:12:08 +0000 (23:12 +0000)]
Modified bench script

git-svn-id: https://svn.dealii.org/trunk@26767 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 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 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 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 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 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 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 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 agomerge from mainline
heister [Mon, 24 Sep 2012 15:48:44 +0000 (15:48 +0000)]
merge from mainline

git-svn-id: https://svn.dealii.org/branches/branch_merge_mg_into_dof_handler@26669 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 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 agoFix a typo.
bangerth [Sat, 22 Sep 2012 00:25:32 +0000 (00:25 +0000)]
Fix a typo.

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

12 years agokeywords?
kanschat [Fri, 21 Sep 2012 08:30:55 +0000 (08:30 +0000)]
keywords?

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

12 years agoexplain how to link documentation
kanschat [Fri, 21 Sep 2012 08:15:35 +0000 (08:15 +0000)]
explain how to link documentation

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

12 years agomake namespace visible
kanschat [Fri, 21 Sep 2012 08:15:14 +0000 (08:15 +0000)]
make namespace visible

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

12 years agoNew tests.
bangerth [Thu, 20 Sep 2012 15:41:46 +0000 (15:41 +0000)]
New tests.

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

12 years agoPatch by Felix Gruber (felgru): Fix a number of typos and documentation problems.
bangerth [Thu, 20 Sep 2012 14:58:51 +0000 (14:58 +0000)]
Patch by Felix Gruber (felgru): Fix a number of typos and documentation problems.

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

12 years agoAugment documentation.
bangerth [Thu, 20 Sep 2012 14:08:13 +0000 (14:08 +0000)]
Augment documentation.

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

12 years agoNew test.
bangerth [Thu, 20 Sep 2012 14:03:34 +0000 (14:03 +0000)]
New test.

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

12 years agoNew test.
bangerth [Thu, 20 Sep 2012 13:59:37 +0000 (13:59 +0000)]
New test.

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

12 years agoAdd DoFRenumbering::block_wise functions.
bangerth [Thu, 20 Sep 2012 13:37:48 +0000 (13:37 +0000)]
Add DoFRenumbering::block_wise functions.

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

12 years agoAdd a FECollection::n_blocks function.
bangerth [Thu, 20 Sep 2012 13:37:12 +0000 (13:37 +0000)]
Add a FECollection::n_blocks function.

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

12 years agoNew test.
bangerth [Thu, 20 Sep 2012 13:36:06 +0000 (13:36 +0000)]
New test.

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

12 years agoFix typo.
bangerth [Thu, 20 Sep 2012 13:28:15 +0000 (13:28 +0000)]
Fix typo.

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

12 years agoGroup functions for doxygen.
bangerth [Thu, 20 Sep 2012 12:26:40 +0000 (12:26 +0000)]
Group functions for doxygen.

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

12 years agoadd elasticity example and highlight the differences between the
kanschat [Thu, 20 Sep 2012 12:07:16 +0000 (12:07 +0000)]
add elasticity example and highlight the differences between the
different approaches

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

12 years agoMake project_boundary_values_curl_conforming work for arbitrary FESystem.
buerg [Thu, 20 Sep 2012 09:20:12 +0000 (09:20 +0000)]
Make project_boundary_values_curl_conforming work for arbitrary FESystem.

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

12 years agoPatch by Felgru: Fix a bunch of documentation typos.
bangerth [Thu, 20 Sep 2012 03:00:21 +0000 (03:00 +0000)]
Patch by Felgru: Fix a bunch of documentation typos.

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

12 years agoGenerate output in GMV format instead of VTK. GMV has long been dead.
bangerth [Thu, 20 Sep 2012 02:42:11 +0000 (02:42 +0000)]
Generate output in GMV format instead of VTK. GMV has long been dead.

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

12 years agofix last commit
heister [Wed, 19 Sep 2012 23:30:18 +0000 (23:30 +0000)]
fix last commit

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

12 years agofix last commit
heister [Wed, 19 Sep 2012 23:29:41 +0000 (23:29 +0000)]
fix last commit

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

12 years agobenchmark: tweak script
heister [Wed, 19 Sep 2012 23:27:37 +0000 (23:27 +0000)]
benchmark: tweak script

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

12 years agobenchmark: update script and ignores
heister [Wed, 19 Sep 2012 23:14:49 +0000 (23:14 +0000)]
benchmark: update script and ignores

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

12 years agowork on benchmark script
heister [Wed, 19 Sep 2012 22:35:38 +0000 (22:35 +0000)]
work on benchmark script

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

12 years agoperformance benchmark: move to a more reasonable starting revision
heister [Wed, 19 Sep 2012 22:11:25 +0000 (22:11 +0000)]
performance benchmark: move to a more reasonable starting revision

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

12 years agoadd a second performance test
heister [Wed, 19 Sep 2012 22:09:48 +0000 (22:09 +0000)]
add a second performance test

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

12 years agoperformance benchmark: clean the tests and write to different output files
heister [Wed, 19 Sep 2012 22:08:19 +0000 (22:08 +0000)]
performance benchmark: clean the tests and write to different output files

git-svn-id: https://svn.dealii.org/trunk@26529 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.