These are harmless code modifications to make a variety of compilers happy.
#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
-# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
-_Pragma("GCC diagnostic push") \
-_Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
-_Pragma("GCC diagnostic ignored \"-Wextra\"") \
-_Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
-_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
-_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
-_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
+# define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \
+_Pragma("GCC diagnostic push") \
+_Pragma("GCC diagnostic ignored \"-Wpragmas\"") \
+_Pragma("GCC diagnostic ignored \"-Wextra\"") \
+_Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \
+_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
+_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
+_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
+_Pragma("GCC diagnostic ignored \"-Wunused-but-set-parameter\"") \
_Pragma("GCC diagnostic warning \"-Wpragmas\"")
-# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
+# define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \
_Pragma("GCC diagnostic pop")
#else
// ---------------------------------------------------------------------
//
-// Copyright (C) 2004 - 2014 by the deal.II authors
+// Copyright (C) 2004 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
const PetscScalar *values,
const bool elide_zero_values)
{
+ (void)elide_zero_values;
+
prepare_action(VectorOperation::insert);
const PetscInt petsc_i = row;
PetscScalar const *col_value_ptr;
int n_columns;
- // If we don't elide zeros, the pointers
- // are already available...
+ // If we don't elide zeros, the pointers are already available...
#ifndef PETSC_USE_64BIT_INDICES
if (elide_zero_values == false)
{
else
#endif
{
- // Otherwise, extract nonzero values in
- // each row and get the respective index.
+ // Otherwise, extract nonzero values in each row and get the
+ // respective index.
if (column_indices.size() < n_cols)
{
column_indices.resize(n_cols);
if (value == PetscScalar())
{
- // we have to do checkings on Insert/Add
- // in any case
- // to be consistent with the MPI
- // communication model (see the comments
- // in the documentation of
- // TrilinosWrappers::Vector), but we can
- // save some work if the addend is
- // zero. However, these actions are done
- // in case we pass on to the other
- // function.
+ // we have to do checkings on Insert/Add in any case to be
+ // consistent with the MPI communication model (see the comments in
+ // the documentation of TrilinosWrappers::Vector), but we can save
+ // some work if the addend is zero. However, these actions are done
+ // in case we pass on to the other function.
prepare_action(VectorOperation::add);
return;
MatrixBase::add (const size_type row,
const size_type n_cols,
const size_type *col_indices,
- const PetscScalar *values,
+ const PetscScalar *values,
const bool elide_zero_values,
const bool /*col_indices_are_sorted*/)
{
+ (void)elide_zero_values;
+
prepare_action(VectorOperation::add);
const PetscInt petsc_i = row;
PetscScalar const *col_value_ptr;
int n_columns;
- // If we don't elide zeros, the pointers
- // are already available...
+ // If we don't elide zeros, the pointers are already available...
#ifndef PETSC_USE_64BIT_INDICES
if (elide_zero_values == false)
{
else
#endif
{
- // Otherwise, extract nonzero values in
- // each row and get the respective index.
+ // Otherwise, extract nonzero values in each row and get the
+ // respective index.
if (column_indices.size() < n_cols)
{
column_indices.resize(n_cols);
// define a helper function that queries the global ID of local ID of
// an Epetra_BlockMap object by calling either the 32- or 64-bit
// function necessary.
+ inline
int gid(const Epetra_BlockMap &map, int i)
{
return map.GID(i);
// define a helper function that queries the global ID of local ID of
// an Epetra_BlockMap object by calling either the 32- or 64-bit
// function necessary.
+ inline
long long int gid(const Epetra_BlockMap &map, int i)
{
return map.GID64(i);
// ---------------------------------------------------------------------
//
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
#ifdef DEAL_II_WITH_PETSC
+ inline
PetscScalar
max_element (const PETScWrappers::Vector &criteria)
{
}
+ inline
PetscScalar
min_element (const PETScWrappers::Vector &criteria)
{
#ifdef DEAL_II_WITH_TRILINOS
+ inline
TrilinosScalar
max_element (const TrilinosWrappers::Vector &criteria)
{
}
+ inline
TrilinosScalar
min_element (const TrilinosWrappers::Vector &criteria)
{
namespace GridTools
{
-// This anonymous namespace contains utility functions to extract the
-// triangulation from any container such as DoFHandler
-// and the like
+ // This anonymous namespace contains utility functions to extract the
+ // triangulation from any container such as DoFHandler and the like
namespace
{
template<int dim, int spacedim>
double
diameter (const Triangulation<dim, spacedim> &tria)
{
- // we can't deal with distributed meshes
- // since we don't have all vertices
- // locally. there is one exception,
- // however: if the mesh has never been
- // refined. the way to test this is not to
- // ask tria.n_levels()==1, since this is
- // something that can happen on one
- // processor without being true on
- // all. however, we can ask for the global
- // number of active cells and use that
-#ifdef DEAL_II_WITH_P4EST
+ // we can't deal with distributed meshes since we don't have all
+ // vertices locally. there is one exception, however: if the mesh has
+ // never been refined. the way to test this is not to ask
+ // tria.n_levels()==1, since this is something that can happen on one
+ // processor without being true on all. however, we can ask for the
+ // global number of active cells and use that
+#if defined(DEAL_II_WITH_P4EST) && defined(DEBUG)
if (const parallel::distributed::Triangulation<dim,spacedim> *p_tria
= dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>(&tria))
Assert (p_tria->n_global_active_cells() == tria.n_cells(0),
ExcNotImplemented());
#endif
- // the algorithm used simply
- // traverses all cells and picks
- // out the boundary vertices. it
- // may or may not be faster to
- // simply get all vectors, don't
- // mark boundary vertices, and
- // compute the distances thereof,
- // but at least as the mesh is
- // refined, it seems better to
- // first mark boundary nodes, as
- // marking is O(N) in the number of
- // cells/vertices, while computing
- // the maximal distance is O(N*N)
+ // the algorithm used simply traverses all cells and picks out the
+ // boundary vertices. it may or may not be faster to simply get all
+ // vectors, don't mark boundary vertices, and compute the distances
+ // thereof, but at least as the mesh is refined, it seems better to
+ // first mark boundary nodes, as marking is O(N) in the number of
+ // cells/vertices, while computing the maximal distance is O(N*N)
const std::vector<Point<spacedim> > &vertices = tria.get_vertices ();
std::vector<bool> boundary_vertices (vertices.size(), false);
for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_face; ++i)
boundary_vertices[cell->face(face)->vertex_index(i)] = true;
- // now traverse the list of
- // boundary vertices and check
- // distances. since distances are
- // symmetric, we only have to check
- // one half
+ // now traverse the list of boundary vertices and check distances.
+ // since distances are symmetric, we only have to check one half
double max_distance_sqr = 0;
std::vector<bool>::const_iterator pi = boundary_vertices.begin();
const unsigned int N = boundary_vertices.size();
additional_data.constant_modes[0].size() == n_rows;
const size_type n_relevant_rows =
constant_modes_are_global ? n_rows : additional_data.constant_modes[0].size();
- (void)n_relevant_rows;
const size_type my_size = domain_map.NumMyElements();
if (constant_modes_are_global == false)
Assert (n_relevant_rows == my_size,
static_cast<size_type>(global_length(distributed_constant_modes)),
ExcDimensionMismatch(n_rows,
global_length(distributed_constant_modes)));
+
+ (void)n_relevant_rows;
(void)global_length;
// Reshape null space as a contiguous vector of doubles so that
ExcDimensionMismatch(n_rows,
global_length(distributed_constant_modes)));
+ (void)n_relevant_rows;
+ (void)global_length;
+
// Reshape null space as a contiguous vector of doubles so that
// Trilinos can read from it.
for (size_type d=0; d<constant_modes_dimension; ++d)