[deal.ii] 01/03: New upstream version 8.4.2
Matthias Maier
tamiko-guest at moszumanska.debian.org
Sat Sep 3 02:33:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
tamiko-guest pushed a commit to branch master
in repository deal.ii.
commit 053453d1f5fe723632936ba0bc4831f7d1749527
Author: Matthias Maier <tamiko at 43-1.org>
Date: Sat Sep 3 02:18:47 2016 +0000
New upstream version 8.4.2
---
VERSION | 2 +-
cmake/setup_compiler_flags_gnu.cmake | 2 +-
doc/news/8.4.1-vs-8.4.2.h | 63 +++++++++++++
doc/news/changes.h | 2 +-
doc/users/doxygen.html | 2 +-
include/deal.II/base/data_out_base.h | 2 +-
include/deal.II/base/mpi.h | 6 +-
include/deal.II/lac/petsc_compatibility.h | 55 +++++++++++
include/deal.II/numerics/vector_tools.templates.h | 11 +--
source/base/data_out_base.cc | 2 +-
source/base/mpi.cc | 16 ++++
source/distributed/tria.cc | 58 ------------
source/fe/fe_tools_interpolate.cc | 110 +++++++++-------------
source/lac/petsc_precondition.cc | 43 ++++-----
14 files changed, 211 insertions(+), 163 deletions(-)
diff --git a/VERSION b/VERSION
index 6da4de5..e7fdef7 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.4.1
+8.4.2
diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake
index 4cccd53..cc75241 100644
--- a/cmake/setup_compiler_flags_gnu.cmake
+++ b/cmake/setup_compiler_flags_gnu.cmake
@@ -46,7 +46,7 @@ ENDIF()
#
# Set the pic flag.
#
-ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fpic")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-fPIC")
#
# Check whether the -as-needed flag is available. If so set it to link
diff --git a/doc/news/8.4.1-vs-8.4.2.h b/doc/news/8.4.1-vs-8.4.2.h
new file mode 100644
index 0000000..8258235
--- /dev/null
+++ b/doc/news/8.4.1-vs-8.4.2.h
@@ -0,0 +1,63 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2014 - 2016 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.
+//
+// ---------------------------------------------------------------------
+
+/**
+ at page changes_between_8_4_1_and_8_4_2 Changes between Version 8.4.1 and 8.4.2
+
+<p>
+This is the list of changes made between the release of deal.II version
+8.4.1 and that of 8.4.2. All entries are signed with the names of the
+author.
+</p>
+
+
+<!-- ----------- SPECIFIC IMPROVEMENTS ----------------- -->
+
+<a name="specific"></a>
+<h3>Specific improvements</h3>
+
+<ol>
+ <li> Fixed: Fix MPI_InitFinalize by correctly initializing and destroying
+ all p4est/libsc related objects by calls to sc_init(), p4est_init(), and
+ sc_finalize(); compatibility with p4est versions >1.1.
+ <br>
+ (Jonathan Perry-Houts, 2016/08/31)
+ </li>
+
+ <li> Fixed: The build system now uses -fPIC instead of -fpic
+ <br>
+ (Matthias Maier, 2016/08/31)
+ </li>
+
+ <li> Fixed: Linker error under VS2013
+ <br>
+ (Alex Kokomov, 2016/08/09)
+ </li>
+
+ <li> New: The library is now compatible with PETSc 3.7.0. Part of this change
+ included adding a new header, <tt>petsc_compatibility.h</tt>, which provides
+ some version-independent functions for using common PETSc functions.
+ <br>
+ (David Wells, 2016/07/07)
+ </li>
+
+ <li> Fixed: Fix various warnings introduced by GCC 6
+ <br>
+ (David Wells, 2016/05/07)
+ </li>
+
+</ol>
+
+*/
diff --git a/doc/news/changes.h b/doc/news/changes.h
index 4614021..d3577bf 100644
--- a/doc/news/changes.h
+++ b/doc/news/changes.h
@@ -14,7 +14,7 @@
// ---------------------------------------------------------------------
/**
- at page changes_after_8_4_1 Changes after Version 8.4.1
+ at page changes_after_8_4_2 Changes after Version 8.4.2
<p>
This is the list of changes made after the release of deal.II version
diff --git a/doc/users/doxygen.html b/doc/users/doxygen.html
index 767eeb5..ae7e424 100644
--- a/doc/users/doxygen.html
+++ b/doc/users/doxygen.html
@@ -30,7 +30,7 @@
Doxygen, if the online documentation is available,
<a href="../doxygen/deal.II/index.html">here</a>. For older revisions,
links are provided here by revision number:
- <a href="http://www.dealii.org/8.4.1/doxygen/deal.tag">8.4.1</a>,
+ <a href="http://www.dealii.org/8.4.2/doxygen/deal.tag">8.4.2</a>,
<a href="http://www.dealii.org/8.3.0/doxygen/deal.tag">8.3.0</a>,
<a href="http://www.dealii.org/8.2.0/doxygen/deal.tag">8.2.0</a>,
<a href="http://www.dealii.org/8.1.0/doxygen/deal.tag">8.1.0</a>,
diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h
index 1c1eea7..0727125 100644
--- a/include/deal.II/base/data_out_base.h
+++ b/include/deal.II/base/data_out_base.h
@@ -994,7 +994,7 @@ namespace DataOutBase
* this number is used only to verify that the format we are writing is
* what the current readers and writers understand.
*/
- static const unsigned int format_version = 3;
+ static const unsigned int format_version;
};
/**
diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h
index 183d141..e13d84a 100644
--- a/include/deal.II/base/mpi.h
+++ b/include/deal.II/base/mpi.h
@@ -348,10 +348,14 @@ namespace Utilities
* program and to shut it down again at the end. It also allows you to
* control the number threads used in each MPI task.
*
- * If deal.II is configured with PETSc, the library will also be
+ * If deal.II is configured with PETSc, the library will be
* initialized in the beginning and destroyed at the end automatically
* (internally by calling PetscInitialize() and PetscFinalize()).
*
+ * If deal.II is configured with p4est, that library will also be
+ * initialized in the beginning, and destroyed at the end automatically
+ * (internally by calling sc_init(), p4est_init(), and sc_finalize()).
+ *
* If a program uses MPI one would typically just create an object of this
* type at the beginning of <code>main()</code>. The constructor of this
* class then runs <code>MPI_Init()</code> with the given arguments. At
diff --git a/include/deal.II/lac/petsc_compatibility.h b/include/deal.II/lac/petsc_compatibility.h
new file mode 100644
index 0000000..705ffa0
--- /dev/null
+++ b/include/deal.II/lac/petsc_compatibility.h
@@ -0,0 +1,55 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 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.
+//
+// ---------------------------------------------------------------------
+
+/*
+ * Rather than using ifdefs everywhere, try to wrap older versions of PETSc
+ * functions in one place.
+ */
+#ifndef dealii__petsc_compatibility_h
+#define dealii__petsc_compatibility_h
+
+#include <deal.II/base/config.h>
+
+#ifdef DEAL_II_WITH_PETSC
+
+#include <petscconf.h>
+#include <petscpc.h>
+
+#include <string>
+
+DEAL_II_NAMESPACE_OPEN
+
+namespace PETScWrappers
+{
+ /**
+ * Set an option in the global PETSc database. This function just wraps
+ * PetscOptionsSetValue with a version check (the signature of this function
+ * changed in PETSc 3.7.0).
+ */
+ inline void set_option_value (const std::string &name,
+ const std::string &value)
+ {
+#if DEAL_II_PETSC_VERSION_LT(3, 7, 0)
+ PetscOptionsSetValue (name.c_str (), value.c_str ());
+#else
+ PetscOptionsSetValue (NULL, name.c_str (), value.c_str ());
+#endif
+ }
+}
+
+DEAL_II_NAMESPACE_CLOSE
+
+#endif // DEAL_II_WITH_PETSC
+#endif // dealii__petsc_compatibility_h
diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h
index e6889a3..e1af496 100644
--- a/include/deal.II/numerics/vector_tools.templates.h
+++ b/include/deal.II/numerics/vector_tools.templates.h
@@ -6972,15 +6972,8 @@ namespace VectorTools
}
else
{
- // This function is not implemented for distributed vectors, so
- // if v is not a boring Vector or BlockVector:
- Assert( dynamic_cast<Vector<double> *>(& v)
- || dynamic_cast<Vector<float> *>(& v)
- || dynamic_cast<Vector<long double> *>(& v)
- || dynamic_cast<BlockVector<double> *>(& v)
- || dynamic_cast<BlockVector<float> *>(& v)
- || dynamic_cast<BlockVector<long double> *>(& v),
- ExcNotImplemented());
+ // This function is not implemented for distributed vectors.
+ Assert(!v.supports_distributed_data, ExcNotImplemented());
const unsigned int n = v.size();
diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc
index 8e5a78b..000af86 100644
--- a/source/base/data_out_base.cc
+++ b/source/base/data_out_base.cc
@@ -1501,7 +1501,7 @@ namespace DataOutBase
template <int dim, int spacedim>
const unsigned int Patch<dim,spacedim>::space_dim;
- const unsigned int Deal_II_IntermediateFlags::format_version;
+ const unsigned int Deal_II_IntermediateFlags::format_version = 3;
diff --git a/source/base/mpi.cc b/source/base/mpi.cc
index ea24b30..f5c4037 100644
--- a/source/base/mpi.cc
+++ b/source/base/mpi.cc
@@ -50,6 +50,10 @@
# endif
#endif
+#ifdef DEAL_II_WITH_P4EST
+# include <p4est_bits.h>
+#endif
+
DEAL_II_NAMESPACE_OPEN
@@ -386,6 +390,12 @@ namespace Utilities
# endif
#endif
+#ifdef DEAL_II_WITH_P4EST
+ //Initialize p4est and libsc components
+ sc_init(MPI_COMM_WORLD, 0, 0, NULL, SC_LP_SILENT);
+ p4est_init (0, SC_LP_SILENT);
+#endif
+
constructor_has_already_run = true;
@@ -517,6 +527,12 @@ namespace Utilities
}
#endif
+#ifdef DEAL_II_WITH_P4EST
+ // now end p4est and libsc
+ // Note: p4est has no finalize function
+ sc_finalize ();
+#endif
+
// only MPI_Finalize if we are running with MPI. We also need to do this
// when running PETSc, because we initialize MPI ourselves before calling
diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc
index f8b7009..21f7541 100644
--- a/source/distributed/tria.cc
+++ b/source/distributed/tria.cc
@@ -2098,59 +2098,6 @@ namespace
}
-// initialize p4est
-namespace internal
-{
- namespace p4est
- {
- struct InitFinalize
- {
- private:
- struct Singleton
- {
- Singleton ()
- {
- // ensure that the initialization code is run only once, even if we
- // link with 1d, 2d, and 3d libraries
- static bool initialized = false;
-
- if (initialized == false)
- {
- sc_init (MPI_COMM_WORLD,
- 0, 0, 0, SC_LP_SILENT);
- p4est_init (0, SC_LP_SILENT);
-
- initialized = true;
- }
- }
-
- ~Singleton ()
- {
- // same here
- static bool deinitialized = false;
-
- if (deinitialized == false)
- {
- // p4est has no p4est_finalize function
- sc_finalize ();
-
- deinitialized = true;
- }
- }
- };
-
- public:
- // do run the initialization code, at least the first time around we get
- // to this function
- static void do_initialize ()
- {
- static Singleton singleton;
- }
- };
- }
-}
-
-
namespace parallel
{
namespace distributed
@@ -2179,11 +2126,6 @@ namespace parallel
n_attached_datas(0),
n_attached_deserialize(0)
{
- // initialize p4est. do this in a separate function since it has to
- // happen only once, even if we have triangulation objects for several
- // different space dimensions
- dealii::internal::p4est::InitFinalize::do_initialize ();
-
parallel_ghost = 0;
}
diff --git a/source/fe/fe_tools_interpolate.cc b/source/fe/fe_tools_interpolate.cc
index 1a611c6..88b4fce 100644
--- a/source/fe/fe_tools_interpolate.cc
+++ b/source/fe/fe_tools_interpolate.cc
@@ -85,24 +85,19 @@ namespace FETools
Assert(u2.size()==dof2.n_dofs(),
ExcDimensionMismatch(u2.size(), dof2.n_dofs()));
-#ifdef DEAL_II_WITH_PETSC
- if (dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- // if u1 is a parallel distributed
- // PETSc vector, we check the local
- // size of u1 for safety
- Assert(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size(), dof1.n_locally_owned_dofs()));
- };
-
- if (dynamic_cast<PETScWrappers::MPI::Vector *>(&u2) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof2) != 0)
- {
- Assert(dynamic_cast<PETScWrappers::MPI::Vector *>(&u2)->local_size() == dof2.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<PETScWrappers::MPI::Vector *>(&u2)->local_size(), dof2.n_locally_owned_dofs()));
- };
+#ifdef DEBUG
+ const IndexSet &dof1_local_dofs = dof1.locally_owned_dofs();
+ const IndexSet &dof2_local_dofs = dof2.locally_owned_dofs();
+ const IndexSet u1_elements = u1.locally_owned_elements();
+ const IndexSet u2_elements = u2.locally_owned_elements();
+ Assert(u1_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
+ Assert(u2_elements == dof2_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
#endif
+
// allocate vectors at maximal
// size. will be reinited in inner
// cell, but Vector makes sure that
@@ -248,23 +243,16 @@ namespace FETools
Assert(u1_interpolated.size()==dof1.n_dofs(),
ExcDimensionMismatch(u1_interpolated.size(), dof1.n_dofs()));
-#ifdef DEAL_II_WITH_PETSC
- if (dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- // if u1 is a parallel distributed
- // PETSc vector, we check the local
- // size of u1 for safety
- Assert(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size(), dof1.n_locally_owned_dofs()));
- };
-
- if (dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- Assert(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated)->local_size(), dof1.n_locally_owned_dofs()));
- };
+#ifdef DEBUG
+ const IndexSet &dof1_local_dofs = dof1.locally_owned_dofs();
+ const IndexSet u1_elements = u1.locally_owned_elements();
+ const IndexSet u1_interpolated_elements = u1_interpolated.locally_owned_elements();
+ Assert(u1_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
+ Assert(u1_interpolated_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
#endif
// For continuous elements on grids
@@ -328,23 +316,16 @@ namespace FETools
Assert(u1_interpolated.size() == dof1.n_dofs(),
ExcDimensionMismatch(u1_interpolated.size(), dof1.n_dofs()));
-#ifdef DEAL_II_WITH_PETSC
- if (dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- // if u1 is a parallel distributed
- // PETSc vector, we check the local
- // size of u1 for safety
- Assert(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size(), dof1.n_locally_owned_dofs()));
- };
-
- if (dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- Assert(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_interpolated)->local_size(), dof1.n_locally_owned_dofs()));
- };
+#ifdef DEBUG
+ const IndexSet &dof1_local_dofs = dof1.locally_owned_dofs();
+ const IndexSet u1_elements = u1.locally_owned_elements();
+ const IndexSet u1_interpolated_elements = u1_interpolated.locally_owned_elements();
+ Assert(u1_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
+ Assert(u1_interpolated_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
#endif
Vector<typename OutVector::value_type> u1_local(DoFTools::max_dofs_per_cell(dof1));
@@ -560,23 +541,16 @@ namespace FETools
Assert(u1_difference.size()==dof1.n_dofs(),
ExcDimensionMismatch(u1_difference.size(), dof1.n_dofs()));
-#ifdef DEAL_II_WITH_PETSC
- if (dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- // if u1 is a parallel distributed
- // PETSc vector, we check the local
- // size of u1 for safety
- Assert(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<const PETScWrappers::MPI::Vector *>(&u1)->local_size(), dof1.n_locally_owned_dofs()));
- };
-
- if (dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_difference) != 0)
- if (dynamic_cast<const DoFHandler<dim>*>(&dof1) != 0)
- {
- Assert(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_difference)->local_size() == dof1.n_locally_owned_dofs(),
- ExcDimensionMismatch(dynamic_cast<PETScWrappers::MPI::Vector *>(&u1_difference)->local_size(), dof1.n_locally_owned_dofs()));
- };
+#ifdef DEBUG
+ const IndexSet &dof1_local_dofs = dof1.locally_owned_dofs();
+ const IndexSet u1_elements = u1.locally_owned_elements();
+ const IndexSet u1_difference_elements = u1_difference.locally_owned_elements();
+ Assert(u1_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
+ Assert(u1_difference_elements == dof1_local_dofs,
+ ExcMessage("The provided vector and DoF handler should have the same"
+ " index sets."));
#endif
// For continuous elements on grids
diff --git a/source/lac/petsc_precondition.cc b/source/lac/petsc_precondition.cc
index 8906e0c..5e574a3 100644
--- a/source/lac/petsc_precondition.cc
+++ b/source/lac/petsc_precondition.cc
@@ -18,6 +18,7 @@
#ifdef DEAL_II_WITH_PETSC
# include <deal.II/base/utilities.h>
+# include <deal.II/lac/petsc_compatibility.h>
# include <deal.II/lac/petsc_matrix_base.h>
# include <deal.II/lac/petsc_vector_base.h>
# include <deal.II/lac/petsc_solver.h>
@@ -487,32 +488,32 @@ namespace PETScWrappers
AssertThrow (ierr == 0, ExcPETScError(ierr));
if (additional_data.output_details)
- PetscOptionsSetValue("-pc_hypre_boomeramg_print_statistics","1");
+ {
+ set_option_value("-pc_hypre_boomeramg_print_statistics", "1");
+ }
- PetscOptionsSetValue("-pc_hypre_boomeramg_agg_nl",
- Utilities::int_to_string(
- additional_data.aggressive_coarsening_num_levels
- ).c_str());
+ set_option_value("-pc_hypre_boomeramg_agg_nl",
+ Utilities::to_string(additional_data.aggressive_coarsening_num_levels));
std::stringstream ssStream;
ssStream << additional_data.max_row_sum;
- PetscOptionsSetValue("-pc_hypre_boomeramg_max_row_sum", ssStream.str().c_str());
+ set_option_value("-pc_hypre_boomeramg_max_row_sum", ssStream.str());
ssStream.str(""); // empty the stringstream
ssStream << additional_data.strong_threshold;
- PetscOptionsSetValue("-pc_hypre_boomeramg_strong_threshold", ssStream.str().c_str());
+ set_option_value("-pc_hypre_boomeramg_strong_threshold", ssStream.str());
if (additional_data.symmetric_operator)
{
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_up", "symmetric-SOR/Jacobi");
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_down", "symmetric-SOR/Jacobi");
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_coarse", "Gaussian-elimination");
+ set_option_value("-pc_hypre_boomeramg_relax_type_up", "symmetric-SOR/Jacobi");
+ set_option_value("-pc_hypre_boomeramg_relax_type_down", "symmetric-SOR/Jacobi");
+ set_option_value("-pc_hypre_boomeramg_relax_type_coarse", "Gaussian-elimination");
}
else
{
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_up", "SOR/Jacobi");
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_down", "SOR/Jacobi");
- PetscOptionsSetValue("-pc_hypre_boomeramg_relax_type_coarse", "Gaussian-elimination");
+ set_option_value("-pc_hypre_boomeramg_relax_type_up", "SOR/Jacobi");
+ set_option_value("-pc_hypre_boomeramg_relax_type_down", "SOR/Jacobi");
+ set_option_value("-pc_hypre_boomeramg_relax_type_coarse", "Gaussian-elimination");
}
ierr = PCSetFromOptions (pc);
@@ -588,7 +589,9 @@ namespace PETScWrappers
AssertThrow (ierr == 0, ExcPETScError(ierr));
if (additional_data.output_details)
- PetscOptionsSetValue("-pc_hypre_parasails_logging","1");
+ {
+ set_option_value("-pc_hypre_parasails_logging","1");
+ }
Assert ((additional_data.symmetric == 0 ||
additional_data.symmetric == 1 ||
@@ -622,20 +625,18 @@ namespace PETScWrappers
ExcMessage("ParaSails parameter symmetric can only be equal to 0, 1, 2!"));
};
- PetscOptionsSetValue("-pc_hypre_parasails_sym",ssStream.str().c_str());
+ set_option_value("-pc_hypre_parasails_sym",ssStream.str());
- PetscOptionsSetValue("-pc_hypre_parasails_nlevels",
- Utilities::int_to_string(
- additional_data.n_levels
- ).c_str());
+ set_option_value ("-pc_hypre_parasails_nlevels",
+ Utilities::to_string(additional_data.n_levels));
ssStream.str(""); // empty the stringstream
ssStream << additional_data.threshold;
- PetscOptionsSetValue("-pc_hypre_parasails_thresh", ssStream.str().c_str());
+ set_option_value("-pc_hypre_parasails_thresh", ssStream.str());
ssStream.str(""); // empty the stringstream
ssStream << additional_data.filter;
- PetscOptionsSetValue("-pc_hypre_parasails_filter", ssStream.str().c_str());
+ set_option_value("-pc_hypre_parasails_filter", ssStream.str());
ierr = PCSetFromOptions (pc);
AssertThrow (ierr == 0, ExcPETScError(ierr));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/deal.ii.git
More information about the debian-science-commits
mailing list