From: Bruno Turcksin Date: Mon, 25 Mar 2013 22:38:21 +0000 (+0000) Subject: Fix test 52 of Trilinos to use 64 bits and fix a bug in trilinos_vector. X-Git-Tag: v8.0.0~316^2~100 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f79dd47b40103172a5be85af18ecf48af2ccac0;p=dealii.git Fix test 52 of Trilinos to use 64 bits and fix a bug in trilinos_vector. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29031 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/trilinos_vector.h b/deal.II/include/deal.II/lac/trilinos_vector.h index 86930ab101..592815da7b 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_vector.h @@ -515,13 +515,13 @@ namespace TrilinosWrappers has_ghosts = vector->Map().UniqueGIDs()==false; - const TrilinosWrappers::types::int_type size = parallel_partitioner.NumMyElements(); + const int size = parallel_partitioner.NumMyElements(); // Need to copy out values, since the // deal.II might not use doubles, so // that a direct access is not possible. - for (TrilinosWrappers::types::int_type i=0; i(v.size()), 0, + (static_cast(v.size()), 0, #ifdef DEAL_II_WITH_MPI Epetra_MpiComm(MPI_COMM_SELF) #else diff --git a/deal.II/include/deal.II/lac/trilinos_vector_base.h b/deal.II/include/deal.II/lac/trilinos_vector_base.h index 2f66baca89..f38ba80582 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector_base.h +++ b/deal.II/include/deal.II/lac/trilinos_vector_base.h @@ -1470,8 +1470,8 @@ namespace TrilinosWrappers VectorBase::size_type VectorBase::size () const { - return (size_type) (vector->Map().MaxAllGID() + 1 - - vector->Map().MinAllGID()); + return (size_type) (vector->Map().MaxAllGID64() + 1 - + vector->Map().MinAllGID64()); } diff --git a/deal.II/source/lac/trilinos_sparse_matrix.cc b/deal.II/source/lac/trilinos_sparse_matrix.cc index 4d97382db3..e19e1d8a61 100644 --- a/deal.II/source/lac/trilinos_sparse_matrix.cc +++ b/deal.II/source/lac/trilinos_sparse_matrix.cc @@ -1377,7 +1377,7 @@ namespace TrilinosWrappers { matrix->ExtractMyRowView (i, num_entries, values, indices); for (TrilinosWrappers::types::int_type j=0; jGRID(i) << "," << matrix->GCID(indices[j]) << ") " + out << "(" << matrix->GRID64(i) << "," << matrix->GCID64(indices[j]) << ") " << values[j] << std::endl; } } diff --git a/deal.II/source/lac/trilinos_sparsity_pattern.cc b/deal.II/source/lac/trilinos_sparsity_pattern.cc index 5a172195db..5c5d4acf76 100644 --- a/deal.II/source/lac/trilinos_sparsity_pattern.cc +++ b/deal.II/source/lac/trilinos_sparsity_pattern.cc @@ -654,7 +654,7 @@ namespace TrilinosWrappers { graph->ExtractMyRowView (i, num_entries, indices); for (TrilinosWrappers::types::int_type j=0; jGRID(j)] << ") " + out << "(" << i << "," << indices[graph->GRID64(j)] << ") " << std::endl; } } @@ -680,7 +680,7 @@ namespace TrilinosWrappers // j horizontal, gnuplot output is // x-y, that is we have to exchange // the order of output - out << indices[graph->GRID(static_cast(j))] + out << indices[graph->GRID64(static_cast(j))] << " " << -static_cast(row) << std::endl; } diff --git a/tests/trilinos/52.cc b/tests/trilinos/52.cc index df522f69c8..ed469755c3 100644 --- a/tests/trilinos/52.cc +++ b/tests/trilinos/52.cc @@ -64,10 +64,10 @@ int main (int argc,char **argv) try { { - std::vector row_lengths (5, - static_cast(3)); + std::vector row_lengths (5,3U); row_lengths.back() = 2; - TrilinosWrappers::SparseMatrix m (5U,5U,row_lengths); + TrilinosWrappers::SparseMatrix m (static_cast(5U), + static_cast(5U),row_lengths); test (m); } }