From bb9c30e63668eb78ef2f2c488fd1781eebe565cb Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 12 Feb 2010 02:41:54 +0000 Subject: [PATCH] Also instantiate with PETScWrappers::MPI::{Block,}Vector. git-svn-id: https://svn.dealii.org/trunk@20561 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_values.h | 30 ++++++++- deal.II/deal.II/source/fe/fe_values.cc | 88 +++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index c405834f3d..6594d20922 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name: $ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -58,6 +58,12 @@ namespace PETScWrappers { class Vector; class BlockVector; + + namespace MPI + { + class Vector; + class BlockVector; + } } #endif @@ -2827,6 +2833,28 @@ class FEValuesBase : protected FEValuesData, void get_interpolated_dof_values (const PETScWrappers::BlockVector &in, Vector &out) const = 0; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::BlockVector &in, + Vector &out) const; #endif #ifdef DEAL_II_USE_TRILINOS diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 7686ee4d84..0094d67eec 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -1246,6 +1246,28 @@ class FEValuesBase::CellIterator : public FEValuesBase &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::BlockVector &in, + Vector &out) const; #endif #ifdef DEAL_II_USE_TRILINOS @@ -1478,6 +1500,28 @@ class FEValuesBase::TriaCellIterator : public FEValuesBase &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::Vector &in, + Vector &out) const; + + /** + * Call + * @p get_interpolated_dof_values + * of the iterator with the + * given arguments. + */ + virtual + void + get_interpolated_dof_values (const PETScWrappers::MPI::BlockVector &in, + Vector &out) const; #endif #ifdef DEAL_II_USE_TRILINOS @@ -1671,6 +1715,28 @@ get_interpolated_dof_values (const PETScWrappers::BlockVector &in, cell->get_interpolated_dof_values (in, out); } +template +template +void +FEValuesBase::CellIterator:: +get_interpolated_dof_values (const PETScWrappers::MPI::Vector &in, + Vector &out) const +{ + cell->get_interpolated_dof_values (in, out); +} + + + +template +template +void +FEValuesBase::CellIterator:: +get_interpolated_dof_values (const PETScWrappers::MPI::BlockVector &in, + Vector &out) const +{ + cell->get_interpolated_dof_values (in, out); +} + #endif #ifdef DEAL_II_USE_TRILINOS @@ -1850,6 +1916,26 @@ get_interpolated_dof_values (const PETScWrappers::BlockVector &, Assert (false, ExcMessage (message_string)); } +template +void +FEValuesBase::TriaCellIterator:: +get_interpolated_dof_values (const PETScWrappers::MPI::Vector &, + Vector &) const +{ + Assert (false, ExcMessage (message_string)); +} + + + +template +void +FEValuesBase::TriaCellIterator:: +get_interpolated_dof_values (const PETScWrappers::MPI::BlockVector &, + Vector &) const +{ + Assert (false, ExcMessage (message_string)); +} + #endif #ifdef DEAL_II_USE_TRILINOS -- 2.39.5