* index set with the interval, shifted
* to the range <tt>[0,
* end-begin)</tt>.
+ *
+ * In other words, the result of this operation is the
+ * intersection of the set represented by the current object
+ * and the interval <tt>[begin, end)</tt>, as seen
+ * <i>within the interval <tt>[begin, end)</tt></i> by
+ * shifting the result of the intersection operation to
+ * the left by <tt>begin</tt>. This corresponds to the notion
+ * of a <i>view</i>: The interval <tt>[begin, end)</tt> is
+ * a <i>window</i> through which we see the set represented
+ * by the current object.
*/
- IndexSet get_view (const unsigned int begin,
- const unsigned int end) const;
+ IndexSet get_view (const types::global_dof_index begin,
+ const types::global_dof_index end) const;
/**
SolverBase::solve (const PETScWrappers::MatrixBase &A,
std::vector<double> &kr,
std::vector<OutputVector> &vr,
- const unsigned int n_eigenvectors = 1)
+ const size_type n_eigenvectors = 1)
{
- unsigned int n_converged = 0;
+ // Panic if no eigenpairs are wanted.
+ AssertThrow (n_eigenvectors != 0, ExcSLEPcWrappersUsageError());
+
+ size_type n_converged = 0;
// Set the matrices of the problem
set_matrices (A);
const PETScWrappers::MatrixBase &B,
std::vector<double> &kr,
std::vector<OutputVector> &vr,
- const unsigned int n_eigenvectors = 1)
+ const size_type n_eigenvectors = 1)
{
- unsigned int n_converged = 0;
+ // Panic if no eigenpairs are wanted.
+ AssertThrow (n_eigenvectors != 0, ExcSLEPcWrappersUsageError());
+
+ size_type n_converged = 0;
// Set the matrices of the problem
set_matrices (A, B);
// class.
if (preset_nonzero_locations == true)
{
- #ifdef PETSC_USE_64BIT_INDICES
- std::vector<PetscInt>
- #else
- std::vector<int>
- #endif
- row_entries;
+ std::vector<PetscInt> row_entries;
std::vector<PetscScalar> row_values;
-
- for (unsigned int i=0; i<sparsity_pattern.n_rows(); ++i)
+ for (size_type i=0; i<sparsity_pattern.n_rows(); ++i)
{
row_entries.resize (row_lengths[i]);
row_values.resize (row_lengths[i], 0.0);
- for (unsigned int j=0; j<row_lengths[i]; ++j)
+ for (size_type j=0; j<row_lengths[i]; ++j)
row_entries[j] = sparsity_pattern.column_number (i,j);
- #ifdef PETSC_USE_64BIT_INDICES
- const PetscInt
- #else
- const int
- #endif
- int_row = i;
+ const PetscInt int_row = i;
MatSetValues (matrix, 1, &int_row,
row_lengths[i], &row_entries[0],
&row_values[0], INSERT_VALUES);
column_space_map.reset (new Epetra_Map (input_col_map));
- const size_t first_row = input_row_map.MinMyGID(),
- const unsigned int first_row = input_row_map.MinMyGID(),
++ const size_type first_row = input_row_map.MinMyGID(),
last_row = input_row_map.MaxMyGID()+1;
- std::vector<int> n_entries_per_row(last_row-first_row);
+ std::vector<TrilinosWrappers::types::int_type> n_entries_per_row(last_row-first_row);
- for (unsigned int row=first_row; row<last_row; ++row)
+ for (size_type row=first_row; row<last_row; ++row)
n_entries_per_row[row-first_row] = sparsity_pattern.row_length(row);
// The deal.II notation of a Sparsity pattern corresponds to the Epetra