SparseMatrix::in_local_range (const size_type index) const
{
TrilinosWrappers::types::int_type begin, end;
- begin = matrix->RowMap().MinMyGID();
- end = matrix->RowMap().MaxMyGID()+1;
+ begin = matrix->RowMap().MinMyGID64();
+ end = matrix->RowMap().MaxMyGID64()+1;
return ((index >= static_cast<size_type>(begin)) &&
(index < static_cast<size_type>(end)));
* entries per row on the current
* processor.
*/
- size_type max_entries_per_row () const;
+ unsigned int max_entries_per_row () const;
/**
* Return the number of rows in this
SparsityPattern::in_local_range (const size_type index) const
{
TrilinosWrappers::types::int_type begin, end;
- begin = graph->RowMap().MinMyGID();
- end = graph->RowMap().MaxMyGID()+1;
+ begin = graph->RowMap().MinMyGID64();
+ end = graph->RowMap().MaxMyGID64()+1;
return ((index >= static_cast<size_type>(begin)) &&
(index < static_cast<size_type>(end)));
VectorBase::local_range () const
{
TrilinosWrappers::types::int_type begin, end;
- begin = vector->Map().MinMyGID();
- end = vector->Map().MaxMyGID()+1;
+ begin = vector->Map().MinMyGID64();
+ end = vector->Map().MaxMyGID64()+1;
return std::make_pair (begin, end);
}
Assert (n_relevant_rows == my_size,
ExcDimensionMismatch(n_relevant_rows, my_size));
Assert (n_rows ==
- static_cast<size_type>(distributed_constant_modes.GlobalLength()),
+ static_cast<size_type>(distributed_constant_modes.GlobalLength64()),
ExcDimensionMismatch(n_rows,
- distributed_constant_modes.GlobalLength()));
+ distributed_constant_modes.GlobalLength64()));
// Reshape null space as a
// contiguous vector of
namespace TrilinosWrappers
{
- namespace
- {
- // define a helper function that queries the size of an Epetra_Map object
- // by calling either the 32- or 64-bit function necessary, and returns the
- // result in the correct data type so that we can use it in calling other
- // Epetra member functions that are overloaded by index type
-#ifndef DEAL_II_USE_LARGE_INDEX_TYPE
- int n_global_elements (const Epetra_BlockMap &map)
- {
- return map.NumGlobalElements();
- }
-#else
- long long int n_global_elements (const Epetra_BlockMap &map)
- {
- return map.NumGlobalElements64();
- }
-#endif
- }
-
namespace SparsityPatternIterators
{
// get a representation of the present
// row
int ncols;
+ // TODO: casting a size_type to an int, could be a problem
int colnums = sparsity_pattern->n_cols();
int ierr;
// release memory before reallocation
graph.reset ();
AssertDimension (n_entries_per_row.size(),
- static_cast<size_type>(n_global_elements(input_row_map)));
+ static_cast<size_type>(input_row_map.NumGlobalElements64()));
column_space_map.reset (new Epetra_Map (input_col_map));
compressed = false;
graph.reset ();
AssertDimension (sp.n_rows(),
- static_cast<size_type>(n_global_elements(input_row_map)));
+ static_cast<size_type>(input_row_map.NumGlobalElements64()));
AssertDimension (sp.n_cols(),
- static_cast<size_type>(n_global_elements(input_col_map)));
+ static_cast<size_type>(input_col_map.NumGlobalElements64()));
column_space_map.reset (new Epetra_Map (input_col_map));
compressed = false;
{
TrilinosWrappers::types::int_type n_cols;
if (graph->Filled() == true)
- n_cols = graph -> NumGlobalCols();
+ n_cols = graph -> NumGlobalCols64();
else
- n_cols = n_global_elements(*column_space_map);
+ n_cols = column_space_map->NumGlobalElements64();
return n_cols;
}
SparsityPattern::size_type
SparsityPattern::n_nonzero_elements () const
{
- TrilinosWrappers::types::int_type nnz = graph->NumGlobalEntries();
+ TrilinosWrappers::types::int_type nnz = graph->NumGlobalEntries64();
return static_cast<size_type>(nnz);
}
- SparsityPattern::size_type
+ unsigned int
SparsityPattern::max_entries_per_row () const
{
- TrilinosWrappers::types::int_type nnz = graph->MaxNumIndices();
+ int nnz = graph->MaxNumIndices();
- return static_cast<size_type>(nnz);
+ return static_cast<unsigned int>(nnz);
}
namespace TrilinosWrappers
{
- namespace
- {
- // define a helper function that queries the size of an Epetra_Map object
- // by calling either the 32- or 64-bit function necessary, and returns the
- // result in the correct data type so that we can use it in calling other
- // Epetra member functions that are overloaded by index type
-#ifndef DEAL_II_USE_LARGE_INDEX_TYPE
- int n_global_elements (const Epetra_BlockMap &map)
- {
- return map.NumGlobalElements();
- }
-#else
- long long int n_global_elements (const Epetra_BlockMap &map)
- {
- return map.NumGlobalElements64();
- }
-#endif
- }
-
namespace MPI
{
:
VectorBase()
{
- AssertThrow (n_global_elements(input_map) == n_global_elements(v.vector->Map()),
- ExcDimensionMismatch (n_global_elements(input_map),
- n_global_elements(v.vector->Map())));
+ AssertThrow (input_map.NumGlobalElements64() == v.vector->Map().NumGlobalElements64(),
+ ExcDimensionMismatch (input_map.NumGlobalElements64(),
+ v.vector->Map().NumGlobalElements64()));
last_action = Zero;
:
VectorBase()
{
- AssertThrow ((size_type)parallel_partitioner.size() == n_global_elements(v.vector->Map()),
+ AssertThrow (parallel_partitioner.size() ==
+ static_cast<size_type>(v.vector->Map().NumGlobalElements64()),
ExcDimensionMismatch (parallel_partitioner.size(),
- n_global_elements(v.vector->Map())));
+ v.vector->Map().NumGlobalElements64()));
last_action = Zero;
if (import_data == true)
{
- AssertThrow (static_cast<size_type>(actual_vec->GlobalLength())
+ AssertThrow (static_cast<size_type>(actual_vec->GlobalLength64())
== v.size(),
- ExcDimensionMismatch (actual_vec->GlobalLength(),
+ ExcDimensionMismatch (actual_vec->GlobalLength64(),
v.size()));
Epetra_Import data_exchange (vector->Map(), actual_vec->Map());
Vector::Vector (const Epetra_Map &input_map)
{
last_action = Zero;
- Epetra_LocalMap map (n_global_elements(input_map),
+ Epetra_LocalMap map (input_map.NumGlobalElements64(),
input_map.IndexBase(),
input_map.Comm());
vector.reset (new Epetra_FEVector(map));
Vector::Vector (const VectorBase &v)
{
last_action = Zero;
- Epetra_LocalMap map (n_global_elements(v.vector->Map()),
+ Epetra_LocalMap map (v.vector->Map().NumGlobalElements64(),
v.vector->Map().IndexBase(),
v.vector->Map().Comm());
vector.reset (new Epetra_FEVector(map));
Vector::reinit (const Epetra_Map &input_map,
const bool fast)
{
- if (n_global_elements(vector->Map()) != n_global_elements(input_map))
+ if (vector->Map().NumGlobalElements64() != input_map.NumGlobalElements64())
{
- Epetra_LocalMap map (n_global_elements(input_map),
+ Epetra_LocalMap map (input_map.NumGlobalElements64(),
input_map.IndexBase(),
input_map.Comm());
vector.reset (new Epetra_FEVector (map));
const MPI_Comm &communicator,
const bool fast)
{
- if (n_global_elements(vector->Map()) !=
+ if (vector->Map().NumGlobalElements64() !=
static_cast<TrilinosWrappers::types::int_type>(partitioning.size()))
{
Epetra_LocalMap map (static_cast<TrilinosWrappers::types::int_type>(partitioning.size()),
{
if (local_range() != v.local_range())
{
- Epetra_LocalMap map (v.vector->GlobalLength(),
+ Epetra_LocalMap map (v.vector->GlobalLength64(),
v.vector->Map().IndexBase(),
v.vector->Comm());
vector.reset (new Epetra_FEVector(map));
{
if (size() != v.size())
{
- Epetra_LocalMap map (n_global_elements(v.vector->Map()),
+ Epetra_LocalMap map (v.vector->Map().NumGlobalElements64(),
v.vector->Map().IndexBase(),
v.vector->Comm());
vector.reset (new Epetra_FEVector(map));
{
if (size() != v.size())
{
- Epetra_LocalMap map (n_global_elements(v.vector->Map()),
+ Epetra_LocalMap map (v.vector->Map().NumGlobalElements64(),
v.vector->Map().IndexBase(),
v.vector->Comm());
vector.reset (new Epetra_FEVector(map));
void
VectorBase::print (const char *format) const
{
- Assert (vector->GlobalLength()!=0, ExcEmptyObject());
+ Assert (vector->GlobalLength64()!=0, ExcEmptyObject());
for (size_type j=0; j<size(); ++j)
{