// add the possibility to insert new values,
// and in the second we just replace
// data.
- if (row_partitioner().MyGID(row) == true)
+ if (row_partitioner().MyGID(static_cast<int>(row)) == true)
{
if (matrix->Filled() == false)
{
// can directly call the Epetra_CrsMatrix
// input function, which is much faster
// than the Epetra_FECrsMatrix function.
- if (row_partitioner().MyGID(row) == true)
+ if (row_partitioner().MyGID(static_cast<int>(row)) == true)
{
ierr = matrix->Epetra_CrsMatrix::SumIntoGlobalValues(row, n_columns,
const_cast<double*>(col_value_ptr),
std::cout << std::endl << std::endl;
std::cout << "Matrix row has the following indices:" << std::endl;
int n_indices, *indices;
- trilinos_sparsity_pattern().ExtractMyRowView(row_partitioner().LID(row),
+ trilinos_sparsity_pattern().ExtractMyRowView(row_partitioner().LID(static_cast<int>(row)),
n_indices,
indices);
for (int i=0; i<n_indices; ++i)
for (unsigned int i=0; i<n_elements; ++i)
{
const unsigned int row = indices[i];
- const int local_row = vector->Map().LID(indices[i]);
+ const int local_row = vector->Map().LID(static_cast<int>(row));
if (local_row == -1)
{
const int ierr = vector->ReplaceGlobalValues (1,
for (unsigned int i=0; i<n_elements; ++i)
{
const unsigned int row = indices[i];
- const int local_row = vector->Map().LID(row);
+ const int local_row = vector->Map().LID(static_cast<int>(row));
if (local_row == -1)
{
const int ierr = vector->SumIntoGlobalValues (1,
compress ();
if ((is_contiguous() == true) && (!overlapping))
- return Epetra_Map (size(),
- n_elements(),
+ return Epetra_Map (static_cast<int>(size()),
+ static_cast<int>(n_elements()),
0,
#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
Epetra_MpiComm(communicator));
fill_index_vector(indices);
return Epetra_Map (-1,
- n_elements(),
+ static_cast<int>(n_elements()),
(n_elements() > 0
?
reinterpret_cast<int*>(&indices[0])
std::vector<Epetra_Map> parallel_partitioning;
for (unsigned int i=0; i<block_sparsity_pattern.n_block_rows(); ++i)
parallel_partitioning.push_back
- (Epetra_Map(block_sparsity_pattern.block(i,0).n_rows(),
+ (Epetra_Map(static_cast<int>(block_sparsity_pattern.block(i,0).n_rows()),
0,
Utilities::Trilinos::comm_self()));
std::vector<Epetra_Map> parallel_partitioning;
for (unsigned int i=0; i<dealii_block_sparse_matrix.n_block_rows(); ++i)
- parallel_partitioning.push_back (Epetra_Map(dealii_block_sparse_matrix.block(i,0).m(),
+ parallel_partitioning.push_back (Epetra_Map(static_cast<int>(dealii_block_sparse_matrix.block(i,0).m()),
0,
trilinos_communicator));
// equidistributed map; avoid
// storing the nonzero
// elements.
- vector_distributor.reset (new Epetra_Map(n_rows, 0, communicator));
+ vector_distributor.reset (new Epetra_Map(static_cast<int>(n_rows), 0, communicator));
if (trilinos_matrix.get() == 0)
trilinos_matrix.reset (new SparseMatrix());
const unsigned int n,
const unsigned int n_max_entries_per_row)
:
- column_space_map (new Epetra_Map (n, 0,
+ column_space_map (new Epetra_Map (static_cast<int>(n), 0,
Utilities::Trilinos::comm_self())),
// on one processor only, we know how the
// information from columns is only
// available when entries have been added
matrix (new Epetra_FECrsMatrix(Copy,
- Epetra_Map (m, 0,
+ Epetra_Map (static_cast<int>(m), 0,
Utilities::Trilinos::comm_self()),
*column_space_map,
n_max_entries_per_row,
const unsigned int n,
const std::vector<unsigned int> &n_entries_per_row)
:
- column_space_map (new Epetra_Map (n, 0,
+ column_space_map (new Epetra_Map (static_cast<int>(n), 0,
Utilities::Trilinos::comm_self())),
matrix (new Epetra_FECrsMatrix(Copy,
- Epetra_Map (m, 0,
+ Epetra_Map (static_cast<int>(m), 0,
Utilities::Trilinos::comm_self()),
*column_space_map,
(int*)const_cast<unsigned int*>(&(n_entries_per_row[0])),
void
SparseMatrix::reinit (const SparsityType &sparsity_pattern)
{
- const Epetra_Map rows (sparsity_pattern.n_rows(),
+ const Epetra_Map rows (static_cast<int>(sparsity_pattern.n_rows()),
0,
Utilities::Trilinos::comm_self());
- const Epetra_Map columns (sparsity_pattern.n_cols(),
+ const Epetra_Map columns (static_cast<int>(sparsity_pattern.n_cols()),
0,
Utilities::Trilinos::comm_self());
const bool copy_values,
const ::dealii::SparsityPattern *use_this_sparsity)
{
- const Epetra_Map rows (dealii_sparse_matrix.m(),
+ const Epetra_Map rows (static_cast<int>(dealii_sparse_matrix.m()),
0,
Utilities::Trilinos::comm_self());
- const Epetra_Map columns (dealii_sparse_matrix.n(),
+ const Epetra_Map columns (static_cast<int>(dealii_sparse_matrix.n()),
0,
Utilities::Trilinos::comm_self());
reinit (rows, columns, dealii_sparse_matrix, drop_tolerance,
std::size_t in_index, index;
for (unsigned int row=0; row<n_rows; ++row)
- if (input_row_map.MyGID(row))
+ if (input_row_map.MyGID(static_cast<int>(row)))
{
index = rowstart_indices[row];
in_index = in_rowstart_indices[row];
// Only do this on the rows owned
// locally on this processor.
- int local_row = matrix->LRID(row);
+ int local_row = matrix->LRID(static_cast<int>(row));
if (local_row >= 0)
{
TrilinosScalar *values;
{
// Extract local indices in
// the matrix.
- int trilinos_i = matrix->LRID(i), trilinos_j = matrix->LCID(j);
+ int trilinos_i = matrix->LRID(static_cast<int>(i)), trilinos_j = matrix->LCID(static_cast<int>(j));
TrilinosScalar value = 0.;
// If the data is not on the
{
// Extract local indices in
// the matrix.
- int trilinos_i = matrix->LRID(i), trilinos_j = matrix->LCID(j);
+ int trilinos_i = matrix->LRID(static_cast<int>(i)), trilinos_j = matrix->LCID(static_cast<int>(j));
TrilinosScalar value = 0.;
// If the data is not on the
// get a representation of the
// present row
int ncols = -1;
- int local_row = matrix->LRID(row);
+ int local_row = matrix->LRID(static_cast<int>(row));
// on the processor who owns this
// row, we'll have a non-negative
ExcDimensionMismatch(matrix->NumGlobalEntries(row),
rhs.matrix->NumGlobalEntries(row)));
- const int row_local = matrix->RowMap().LID(row);
+ const int row_local = matrix->RowMap().LID(static_cast<int>(row));
int n_entries, rhs_n_entries;
TrilinosScalar *value_ptr, *rhs_value_ptr;
for (unsigned int row=local_range.first;
row < local_range.second; ++row)
{
- const int row_local = matrix->RowMap().LID(row);
+ const int row_local = matrix->RowMap().LID(static_cast<int>(row));
int n_entries;
ierr = rhs.matrix->ExtractMyRowCopy (row_local, max_row_length,
const unsigned int n,
const unsigned int n_entries_per_row)
{
- const Epetra_Map rows (m, 0, Utilities::Trilinos::comm_self());
- const Epetra_Map columns (n, 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map rows (static_cast<int>(m), 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map columns (static_cast<int>(n), 0, Utilities::Trilinos::comm_self());
reinit (rows, columns, n_entries_per_row);
}
const unsigned int n,
const std::vector<unsigned int> &n_entries_per_row)
{
- const Epetra_Map rows (m, 0, Utilities::Trilinos::comm_self());
- const Epetra_Map columns (n, 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map rows (static_cast<int>(m), 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map columns (static_cast<int>(n), 0, Utilities::Trilinos::comm_self());
reinit (rows, columns, n_entries_per_row);
}
void
SparsityPattern::copy_from (const SparsityType &sp)
{
- const Epetra_Map rows (sp.n_rows(), 0, Utilities::Trilinos::comm_self());
- const Epetra_Map columns (sp.n_cols(), 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map rows (static_cast<int>(sp.n_rows()), 0, Utilities::Trilinos::comm_self());
+ const Epetra_Map columns (static_cast<int>(sp.n_cols()), 0, Utilities::Trilinos::comm_self());
reinit (rows, columns, sp);
}
{
// Extract local indices in
// the matrix.
- int trilinos_i = graph->LRID(i), trilinos_j = graph->LCID(j);
+ int trilinos_i = graph->LRID(static_cast<int>(i)), trilinos_j = graph->LCID(static_cast<int>(j));
// If the data is not on the
// present processor, we throw
// get a representation of the
// present row
int ncols = -1;
- int local_row = graph->LRID(row);
+ int local_row = graph->LRID(static_cast<int>(row));
// on the processor who owns this
// row, we'll have a non-negative
// j horizontal, gnuplot output is
// x-y, that is we have to exchange
// the order of output
- out << indices[graph->GRID(j)] << " " << -static_cast<signed int>(row)
+ out << indices[graph->GRID(static_cast<int>(j))] << " " << -static_cast<signed int>(row)
<< std::endl;
}
const MPI_Comm &communicator)
{
last_action = Zero;
- Epetra_LocalMap map (partitioning.size(),
+ Epetra_LocalMap map (static_cast<int>(partitioning.size()),
0,
#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
Epetra_MpiComm(communicator));
if (vector->Map().NumGlobalElements() !=
static_cast<int>(partitioning.size()))
{
- Epetra_LocalMap map (partitioning.size(),
+ Epetra_LocalMap map (static_cast<int>(partitioning.size()),
0,
#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
Epetra_MpiComm(communicator));
// we can use []. Note that we
// can only get local values.
- const int local_index = vector.vector->Map().LID(index);
+ const int local_index = vector.vector->Map().LID(static_cast<int>(index));
Assert (local_index >= 0,
ExcAccessToNonLocalElement (index,
vector.vector->Map().MinMyGID(),
{
// Extract local indices in
// the vector.
- int trilinos_i = vector->Map().LID(index);
+ int trilinos_i = vector->Map().LID(static_cast<int>(index));
TrilinosScalar value = 0.;
// If the element is not
{
// Extract local indices in
// the vector.
- int trilinos_i = vector->Map().LID(index);
+ int trilinos_i = vector->Map().LID(static_cast<int>(index));
TrilinosScalar value = 0.;
// If the element is not present