*/
explicit IndexSet (const types::global_dof_index size);
+
+#ifdef DEAL_II_WITH_TRILINOS
+ /**
+ * Constructor from a trilinos Epetra_Map.
+ */
+ IndexSet(const Epetra_Map &map);
+#endif
+
/**
* Remove all indices from this index set. The index set retains its size,
* however.
+
+#ifdef DEAL_II_WITH_TRILINOS
+inline
+IndexSet::IndexSet (const Epetra_Map &map)
+ :
+ is_compressed (true),
+ index_space_size (map.NumGlobalElements()),
+ largest_range (numbers::invalid_unsigned_int)
+{
+ int *map_indices = map.MyGlobalElements();
+ for (int i=0; i<map.NumMyElements(); ++i)
+ add_index((size_type)map_indices[i]);
+ compress();
+}
+#endif
+
+
+
inline
void
IndexSet::clear ()
}
+
inline
void
IndexSet::set_size (const types::global_dof_index sz)
TrilinosWrappers::MPI::Vector &v,
bool fast)
{
- v.reinit(matrix.range_partitioner(), fast);
+ v.reinit(IndexSet(matrix.range_partitioner()), MPI_COMM_WORLD, fast);
}
template <typename Matrix>
TrilinosWrappers::MPI::Vector &v,
bool fast)
{
- v.reinit(matrix.domain_partitioner(), fast);
+ v.reinit(IndexSet(matrix.domain_partitioner()), MPI_COMM_WORLD, fast);
}
};
TrilinosWrappers::Vector &v,
bool fast)
{
- v.reinit(matrix.range_partitioner(), fast);
+ v.reinit(IndexSet(matrix.range_partitioner()), MPI_COMM_WORLD, fast);
}
template <typename Matrix>
TrilinosWrappers::Vector &v,
bool fast)
{
- v.reinit(matrix.domain_partitioner(), fast);
+ v.reinit(IndexSet(matrix.domain_partitioner()), MPI_COMM_WORLD, fast);
}
};