From: bangerth Date: Sat, 23 Mar 2013 01:02:12 +0000 (+0000) Subject: Rename namespace TrilinosWrapper::types to TrilinosWrappers::types, to match the... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10f907f970e7e23c15ab38d37980308b50f70116;p=dealii-svn.git Rename namespace TrilinosWrapper::types to TrilinosWrappers::types, to match the pre-existing namespace. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28996 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/development/cmake.html b/deal.II/doc/development/cmake.html index 27ba5a0175..538a7c46fd 100644 --- a/deal.II/doc/development/cmake.html +++ b/deal.II/doc/development/cmake.html @@ -402,13 +402,14 @@ just take the second as hints but errors out if LAPACK can't be used with the given library (if you are sure that the path works, you can then omit the first command). An example of use is to select BLAS - and LAPACK as follows: + and LAPACK as follows (here, these libraries have been compiled with the + gfortran compiler and need its support library):
 
     cmake -DBLAS_FOUND=true \
-          -DBLAS_LIBRARIES=/apps/GotoBLAS/lib64/libgoto.so \
+          -DBLAS_LIBRARIES="-L/apps/GotoBLAS/lib64 -lgoto -lgfortran" \
           -DLAPACK_FOUND=true \
-          -DLAPACK_LIBRARIES=/apps/lapack-3.2.1/lib64/liblapack.so
+          -DLAPACK_LIBRARIES="-L/apps/lapack-3.2.1/lib64 -llapack -L/apps/GotoBLAS/lib64 -lgoto -lgfortran"
       
You can set these values on the command line, with ccmake diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index 2e4c516020..6f29d80955 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -141,7 +141,7 @@ namespace types } -namespace TrilinosWrapper +namespace TrilinosWrappers { namespace types { @@ -188,9 +188,9 @@ namespace numbers * Representation of the * largest number that * can be put into a - * size_type. This value - * is used throughout - * the library as a + * size_type. This value + * is used throughout + * the library as a * marker for an * invalid size_type * value, such as diff --git a/deal.II/include/deal.II/lac/trilinos_precondition.h b/deal.II/include/deal.II/lac/trilinos_precondition.h index 17c1f2e743..10ae869c3b 100644 --- a/deal.II/include/deal.II/lac/trilinos_precondition.h +++ b/deal.II/include/deal.II/lac/trilinos_precondition.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2008, 2010, 2012 by the deal.II authors +// Copyright (C) 2008, 2010, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -74,8 +74,8 @@ namespace TrilinosWrappers public: /** * Declare the type for container size. - */ - typedef types::global_dof_index size_type; + */ + typedef dealii::types::global_dof_index size_type; /** * Standardized data struct to @@ -1563,9 +1563,9 @@ namespace TrilinosWrappers void PreconditionBase::vmult (dealii::Vector &dst, const dealii::Vector &src) const { - AssertDimension (static_cast(dst.size()), + AssertDimension (static_cast(dst.size()), preconditioner->OperatorDomainMap().NumMyElements()); - AssertDimension (static_cast(src.size()), + AssertDimension (static_cast(src.size()), preconditioner->OperatorRangeMap().NumMyElements()); Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(), dst.begin()); @@ -1581,9 +1581,9 @@ namespace TrilinosWrappers void PreconditionBase::Tvmult (dealii::Vector &dst, const dealii::Vector &src) const { - AssertDimension (static_cast(dst.size()), + AssertDimension (static_cast(dst.size()), preconditioner->OperatorDomainMap().NumMyElements()); - AssertDimension (static_cast(src.size()), + AssertDimension (static_cast(src.size()), preconditioner->OperatorRangeMap().NumMyElements()); Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(), dst.begin()); @@ -1603,9 +1603,9 @@ namespace TrilinosWrappers PreconditionBase::vmult (parallel::distributed::Vector &dst, const parallel::distributed::Vector &src) const { - AssertDimension (static_cast(dst.local_size()), + AssertDimension (static_cast(dst.local_size()), preconditioner->OperatorDomainMap().NumMyElements()); - AssertDimension (static_cast(src.local_size()), + AssertDimension (static_cast(src.local_size()), preconditioner->OperatorRangeMap().NumMyElements()); Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(), dst.begin()); @@ -1621,9 +1621,9 @@ namespace TrilinosWrappers PreconditionBase::Tvmult (parallel::distributed::Vector &dst, const parallel::distributed::Vector &src) const { - AssertDimension (static_cast(dst.local_size()), + AssertDimension (static_cast(dst.local_size()), preconditioner->OperatorDomainMap().NumMyElements()); - AssertDimension (static_cast(src.local_size()), + AssertDimension (static_cast(src.local_size()), preconditioner->OperatorRangeMap().NumMyElements()); Epetra_Vector tril_dst (View, preconditioner->OperatorDomainMap(), dst.begin()); diff --git a/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h b/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h index 176910aa14..40b7aade7f 100644 --- a/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2008, 2009, 2010, 2011, 2012 by the deal.II authors +// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -101,7 +101,7 @@ namespace TrilinosWrappers /** * Declare the type for container size. */ - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; /** * Constructor. @@ -383,7 +383,7 @@ namespace TrilinosWrappers /** * Declare type for container size. */ - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; /** * Typedef for the matrix type @@ -514,7 +514,7 @@ namespace TrilinosWrappers /** * Declare the type for container size. */ - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; /** * A structure that describes @@ -3026,7 +3026,7 @@ namespace TrilinosWrappers bool SparseMatrix::in_local_range (const size_type index) const { - TrilinosWrapper::types::int_type begin, end; + TrilinosWrappers::types::int_type begin, end; begin = matrix->RowMap().MinMyGID(); end = matrix->RowMap().MaxMyGID()+1; @@ -3182,15 +3182,15 @@ namespace TrilinosWrappers last_action = Insert; - TrilinosWrapper::types::int_type *col_index_ptr; + TrilinosWrappers::types::int_type *col_index_ptr; TrilinosScalar const *col_value_ptr; - TrilinosWrapper::types::int_type n_columns; + TrilinosWrappers::types::int_type n_columns; // If we don't elide zeros, the pointers // are already available... if (elide_zero_values == false) { - col_index_ptr = (TrilinosWrapper::types::int_type *)col_indices; + col_index_ptr = (TrilinosWrappers::types::int_type *)col_indices; col_value_ptr = values; n_columns = n_cols; } @@ -3218,9 +3218,9 @@ namespace TrilinosWrappers } } - Assert(n_columns <= (TrilinosWrapper::types::int_type)n_cols, ExcInternalError()); + Assert(n_columns <= (TrilinosWrappers::types::int_type)n_cols, ExcInternalError()); - col_index_ptr = (TrilinosWrapper::types::int_type *)&column_indices[0]; + col_index_ptr = (TrilinosWrappers::types::int_type *)&column_indices[0]; col_value_ptr = &column_values[0]; } @@ -3239,7 +3239,7 @@ namespace TrilinosWrappers // add the possibility to insert new values, // and in the second we just replace // data. - if (row_partitioner().MyGID(static_cast(row)) == true) + if (row_partitioner().MyGID(static_cast(row)) == true) { if (matrix->Filled() == false) { @@ -3276,8 +3276,8 @@ namespace TrilinosWrappers if (matrix->Filled() == false) { - ierr = matrix->InsertGlobalValues (1, - (TrilinosWrapper::types::int_type *)&row, + ierr = matrix->InsertGlobalValues (1, + (TrilinosWrappers::types::int_type *)&row, n_columns, col_index_ptr, &col_value_ptr, Epetra_FECrsMatrix::ROW_MAJOR); @@ -3285,8 +3285,8 @@ namespace TrilinosWrappers ierr = 0; } else - ierr = matrix->ReplaceGlobalValues (1, - (TrilinosWrapper::types::int_type *)&row, + ierr = matrix->ReplaceGlobalValues (1, + (TrilinosWrappers::types::int_type *)&row, n_columns, col_index_ptr, &col_value_ptr, Epetra_FECrsMatrix::ROW_MAJOR); @@ -3412,15 +3412,15 @@ namespace TrilinosWrappers last_action = Add; - TrilinosWrapper::types::int_type *col_index_ptr; + TrilinosWrappers::types::int_type *col_index_ptr; TrilinosScalar const *col_value_ptr; - TrilinosWrapper::types::int_type n_columns; + TrilinosWrappers::types::int_type n_columns; // If we don't elide zeros, the pointers // are already available... if (elide_zero_values == false) { - col_index_ptr = (TrilinosWrapper::types::int_type *)col_indices; + col_index_ptr = (TrilinosWrappers::types::int_type *)col_indices; col_value_ptr = values; n_columns = n_cols; #ifdef DEBUG @@ -3451,9 +3451,9 @@ namespace TrilinosWrappers } } - Assert(n_columns <= (TrilinosWrapper::types::int_type)n_cols, ExcInternalError()); + Assert(n_columns <= (TrilinosWrappers::types::int_type)n_cols, ExcInternalError()); - col_index_ptr = (TrilinosWrapper::types::int_type *)&column_indices[0]; + col_index_ptr = (TrilinosWrappers::types::int_type *)&column_indices[0]; col_value_ptr = &column_values[0]; } @@ -3462,7 +3462,7 @@ namespace TrilinosWrappers // can directly call the Epetra_CrsMatrix // input function, which is much faster // than the Epetra_FECrsMatrix function. - if (row_partitioner().MyGID(static_cast(row)) == true) + if (row_partitioner().MyGID(static_cast(row)) == true) { ierr = matrix->Epetra_CrsMatrix::SumIntoGlobalValues(row, n_columns, const_cast(col_value_ptr), @@ -3482,8 +3482,8 @@ namespace TrilinosWrappers // one element at a time). compressed = false; - ierr = matrix->SumIntoGlobalValues (1, - (TrilinosWrapper::types::int_type *)&row, n_columns, + ierr = matrix->SumIntoGlobalValues (1, + (TrilinosWrappers::types::int_type *)&row, n_columns, col_index_ptr, &col_value_ptr, Epetra_FECrsMatrix::ROW_MAJOR); @@ -3497,15 +3497,15 @@ namespace TrilinosWrappers std::cout << "Got error " << ierr << " in row " << row << " of proc " << row_partitioner().Comm().MyPID() << " when trying to add the columns:" << std::endl; - for (TrilinosWrapper::types::int_type i=0; i(row)), + TrilinosWrappers::types::int_type n_indices, *indices; + trilinos_sparsity_pattern().ExtractMyRowView(row_partitioner().LID(static_cast(row)), n_indices, indices); - for (TrilinosWrapper::types::int_type i=0; iRowMap().MinMyGID(); end = graph->RowMap().MaxMyGID()+1; @@ -1642,14 +1642,14 @@ namespace TrilinosWrappers if (begin == end) return; - TrilinosWrapper::types::int_type *col_index_ptr = - (TrilinosWrapper::types::int_type *)(&*begin); - const TrilinosWrapper::types::int_type n_cols = - static_cast(end - begin); + TrilinosWrappers::types::int_type *col_index_ptr = + (TrilinosWrappers::types::int_type *)(&*begin); + const TrilinosWrappers::types::int_type n_cols = + static_cast(end - begin); compressed = false; - const int ierr = graph->InsertGlobalIndices (1, - (TrilinosWrapper::types::int_type *)&row, + const int ierr = graph->InsertGlobalIndices (1, + (TrilinosWrappers::types::int_type *)&row, n_cols, col_index_ptr); AssertThrow (ierr >= 0, ExcTrilinosError(ierr)); diff --git a/deal.II/include/deal.II/lac/trilinos_vector.h b/deal.II/include/deal.II/lac/trilinos_vector.h index 7ce20c91a2..86930ab101 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_vector.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2008, 2009, 2010, 2012 by the deal.II authors +// Copyright (C) 2008, 2009, 2010, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -169,7 +169,7 @@ namespace TrilinosWrappers /** * Declare type for container size. */ - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; /** * @name Basic constructors and initalization. @@ -515,12 +515,12 @@ namespace TrilinosWrappers has_ghosts = vector->Map().UniqueGIDs()==false; - const TrilinosWrapper::types::int_type size = parallel_partitioner.NumMyElements(); + const TrilinosWrappers::types::int_type 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 (TrilinosWrapper::types::int_type i=0; i Vector::Vector (const dealii::Vector &v) { - Epetra_LocalMap map ((TrilinosWrapper::types::int_type)v.size(), 0, Utilities::Trilinos::comm_self()); + Epetra_LocalMap map ((TrilinosWrappers::types::int_type)v.size(), 0, Utilities::Trilinos::comm_self()); vector.reset (new Epetra_FEVector(map)); *this = v; } @@ -807,13 +807,13 @@ namespace TrilinosWrappers { vector.reset(); - Epetra_LocalMap map ((TrilinosWrapper::types::int_type)v.size(), 0, + Epetra_LocalMap map ((TrilinosWrappers::types::int_type)v.size(), 0, Utilities::Trilinos::comm_self()); vector.reset (new Epetra_FEVector(map)); } const Epetra_Map &map = vector_partitioner(); - const TrilinosWrapper::types::int_type size = map.NumMyElements(); + const TrilinosWrappers::types::int_type size = map.NumMyElements(); Assert (map.MaxLID() == size-1, ExcDimensionMismatch(map.MaxLID(), size-1)); @@ -821,7 +821,7 @@ namespace TrilinosWrappers // Need to copy out values, since the // deal.II might not use doubles, so // that a direct access is not possible. - for (TrilinosWrapper::types::int_type i=0; iMap().LID(static_cast(row)); + const TrilinosWrappers::types::int_type local_row = vector->Map().LID(static_cast(row)); if (local_row == -1) { const int ierr = vector->ReplaceGlobalValues (1, - (const TrilinosWrapper::types::int_type *)(&row), + (const TrilinosWrappers::types::int_type *)(&row), &values[i]); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); compressed = false; @@ -1450,11 +1450,11 @@ namespace TrilinosWrappers for (size_type i=0; iMap().LID(static_cast(row)); + const TrilinosWrappers::types::int_type local_row = vector->Map().LID(static_cast(row)); if (local_row == -1) { const int ierr = vector->SumIntoGlobalValues (1, - (const TrilinosWrapper::types::int_type *)(&row), + (const TrilinosWrappers::types::int_type *)(&row), &values[i]); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); compressed = false; @@ -1489,7 +1489,7 @@ namespace TrilinosWrappers std::pair VectorBase::local_range () const { - TrilinosWrapper::types::int_type begin, end; + TrilinosWrappers::types::int_type begin, end; begin = vector->Map().MinMyGID(); end = vector->Map().MaxMyGID()+1; return std::make_pair (begin, end); diff --git a/deal.II/source/lac/trilinos_block_sparse_matrix.cc b/deal.II/source/lac/trilinos_block_sparse_matrix.cc index 7cd896a529..8db28fc610 100644 --- a/deal.II/source/lac/trilinos_block_sparse_matrix.cc +++ b/deal.II/source/lac/trilinos_block_sparse_matrix.cc @@ -148,7 +148,7 @@ namespace TrilinosWrappers std::vector parallel_partitioning; for (size_type i=0; i(block_sparsity_pattern.block(i,0).n_rows()), + (Epetra_Map(static_cast(block_sparsity_pattern.block(i,0).n_rows()), 0, Utilities::Trilinos::comm_self())); @@ -240,7 +240,7 @@ namespace TrilinosWrappers std::vector parallel_partitioning; for (size_type i=0; i(dealii_block_sparse_matrix.block(i,0).m()), + parallel_partitioning.push_back (Epetra_Map(static_cast(dealii_block_sparse_matrix.block(i,0).m()), 0, trilinos_communicator)); diff --git a/deal.II/source/lac/trilinos_precondition.cc b/deal.II/source/lac/trilinos_precondition.cc index b7c046c054..6a8e1d5242 100644 --- a/deal.II/source/lac/trilinos_precondition.cc +++ b/deal.II/source/lac/trilinos_precondition.cc @@ -602,7 +602,7 @@ namespace TrilinosWrappers for (size_type d=0; d(n_rows), + vector_distributor.reset (new Epetra_Map(static_cast(n_rows), 0, communicator)); if (trilinos_matrix.get() == 0) diff --git a/deal.II/source/lac/trilinos_sparse_matrix.cc b/deal.II/source/lac/trilinos_sparse_matrix.cc index 0dc763db30..391e7ae9ed 100644 --- a/deal.II/source/lac/trilinos_sparse_matrix.cc +++ b/deal.II/source/lac/trilinos_sparse_matrix.cc @@ -54,8 +54,8 @@ namespace TrilinosWrappers // get a representation of the present // row - TrilinosWrapper::types::int_type ncols; - TrilinosWrapper::types::int_type colnums = matrix->n(); + TrilinosWrappers::types::int_type ncols; + TrilinosWrappers::types::int_type colnums = matrix->n(); if (value_cache.get() == 0) { value_cache.reset (new std::vector (matrix->n())); @@ -68,10 +68,10 @@ namespace TrilinosWrappers } int ierr = matrix->trilinos_matrix(). - ExtractGlobalRowCopy((TrilinosWrapper::types::int_type)this->a_row, + ExtractGlobalRowCopy((TrilinosWrappers::types::int_type)this->a_row, colnums, ncols, &((*value_cache)[0]), - reinterpret_cast(&((*colnum_cache)[0]))); + reinterpret_cast(&((*colnum_cache)[0]))); value_cache->resize (ncols); colnum_cache->resize (ncols); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); @@ -116,7 +116,7 @@ namespace TrilinosWrappers : column_space_map (new Epetra_Map (input_map)), matrix (new Epetra_FECrsMatrix(Copy, *column_space_map, - TrilinosWrapper::types::int_type(n_max_entries_per_row), false)), + TrilinosWrappers::types::int_type(n_max_entries_per_row), false)), last_action (Zero), compressed (false) {} @@ -129,7 +129,7 @@ namespace TrilinosWrappers column_space_map (new Epetra_Map (input_map)), matrix (new Epetra_FECrsMatrix (Copy, *column_space_map, - (TrilinosWrapper::types::int_type *)const_cast(&(n_entries_per_row[0])), + (TrilinosWrappers::types::int_type *)const_cast(&(n_entries_per_row[0])), false)), last_action (Zero), compressed (false) @@ -143,7 +143,7 @@ namespace TrilinosWrappers : column_space_map (new Epetra_Map (input_col_map)), matrix (new Epetra_FECrsMatrix(Copy, input_row_map, - TrilinosWrapper::types::int_type(n_max_entries_per_row), false)), + TrilinosWrappers::types::int_type(n_max_entries_per_row), false)), last_action (Zero), compressed (false) {} @@ -156,7 +156,7 @@ namespace TrilinosWrappers : column_space_map (new Epetra_Map (input_col_map)), matrix (new Epetra_FECrsMatrix(Copy, input_row_map, - (TrilinosWrapper::types::int_type *)const_cast(&(n_entries_per_row[0])), + (TrilinosWrappers::types::int_type *)const_cast(&(n_entries_per_row[0])), false)), last_action (Zero), compressed (false) @@ -168,7 +168,7 @@ namespace TrilinosWrappers const size_type n, const size_type n_max_entries_per_row) : - column_space_map (new Epetra_Map (static_cast(n), 0, + column_space_map (new Epetra_Map (static_cast(n), 0, Utilities::Trilinos::comm_self())), // on one processor only, we know how the @@ -180,7 +180,7 @@ namespace TrilinosWrappers // information from columns is only // available when entries have been added matrix (new Epetra_FECrsMatrix(Copy, - Epetra_Map (static_cast(m), 0, + Epetra_Map (static_cast(m), 0, Utilities::Trilinos::comm_self()), *column_space_map, n_max_entries_per_row, @@ -195,13 +195,13 @@ namespace TrilinosWrappers const size_type n, const std::vector &n_entries_per_row) : - column_space_map (new Epetra_Map (static_cast(n), 0, + column_space_map (new Epetra_Map (static_cast(n), 0, Utilities::Trilinos::comm_self())), matrix (new Epetra_FECrsMatrix(Copy, - Epetra_Map (static_cast(m), 0, + Epetra_Map (static_cast(m), 0, Utilities::Trilinos::comm_self()), *column_space_map, - (TrilinosWrapper::types::int_type *)const_cast(&(n_entries_per_row[0])), + (TrilinosWrappers::types::int_type *)const_cast(&(n_entries_per_row[0])), false)), last_action (Zero), compressed (false) @@ -233,7 +233,7 @@ namespace TrilinosWrappers make_trilinos_map(communicator, false))), matrix (new Epetra_FECrsMatrix(Copy, *column_space_map, - (TrilinosWrapper::types::int_type *)const_cast(&(n_entries_per_row[0])), + (TrilinosWrappers::types::int_type *)const_cast(&(n_entries_per_row[0])), false)), last_action (Zero), compressed (false) @@ -269,7 +269,7 @@ namespace TrilinosWrappers matrix (new Epetra_FECrsMatrix(Copy, row_parallel_partitioning. make_trilinos_map(communicator, false), - (TrilinosWrapper::types::int_type *)const_cast(&(n_entries_per_row[0])), + (TrilinosWrappers::types::int_type *)const_cast(&(n_entries_per_row[0])), false)), last_action (Zero), compressed (false) @@ -338,10 +338,10 @@ namespace TrilinosWrappers void SparseMatrix::reinit (const SparsityType &sparsity_pattern) { - const Epetra_Map rows (static_cast(sparsity_pattern.n_rows()), + const Epetra_Map rows (static_cast(sparsity_pattern.n_rows()), 0, Utilities::Trilinos::comm_self()); - const Epetra_Map columns (static_cast(sparsity_pattern.n_cols()), + const Epetra_Map columns (static_cast(sparsity_pattern.n_cols()), 0, Utilities::Trilinos::comm_self()); @@ -370,7 +370,7 @@ namespace TrilinosWrappers template void copy_row (const Sparsity &csp, const size_type row, - std::vector &row_indices) + std::vector &row_indices) { typename Sparsity::row_iterator col_num = csp.row_begin (row); for (size_type col=0; col_num != csp.row_end (row); ++col_num, ++col) @@ -379,7 +379,7 @@ namespace TrilinosWrappers void copy_row (const dealii::SparsityPattern &csp, const size_type row, - std::vector &row_indices) + std::vector &row_indices) { dealii::SparsityPattern::iterator col_num = csp.begin (row); for (size_type col=0; col_num != csp.end (row); ++col_num, ++col) @@ -428,7 +428,7 @@ namespace TrilinosWrappers const size_t first_row = input_row_map.MinMyGID(), last_row = input_row_map.MaxMyGID()+1; - std::vector n_entries_per_row(last_row-first_row); + std::vector n_entries_per_row(last_row-first_row); for (size_type row=first_row; row row_indices; + std::vector row_indices; for (size_type row=first_row; row(dealii_sparse_matrix.m()), + const Epetra_Map rows (static_cast(dealii_sparse_matrix.m()), 0, Utilities::Trilinos::comm_self()); - const Epetra_Map columns (static_cast(dealii_sparse_matrix.n()), + const Epetra_Map columns (static_cast(dealii_sparse_matrix.n()), 0, Utilities::Trilinos::comm_self()); reinit (rows, columns, dealii_sparse_matrix, drop_tolerance, @@ -581,10 +581,10 @@ namespace TrilinosWrappers const size_type n_rows = dealii_sparse_matrix.m(); - Assert (input_row_map.NumGlobalElements() == (TrilinosWrapper::types::int_type)n_rows, + Assert (input_row_map.NumGlobalElements() == (TrilinosWrappers::types::int_type)n_rows, ExcDimensionMismatch (input_row_map.NumGlobalElements(), n_rows)); - Assert (input_col_map.NumGlobalElements() == (TrilinosWrapper::types::int_type)dealii_sparse_matrix.n(), + Assert (input_col_map.NumGlobalElements() == (TrilinosWrappers::types::int_type)dealii_sparse_matrix.n(), ExcDimensionMismatch (input_col_map.NumGlobalElements(), dealii_sparse_matrix.n())); @@ -612,7 +612,7 @@ namespace TrilinosWrappers for (size_type row=0; row(row)) == true) + if (input_row_map.MyGID(static_cast(row)) == true) { ::dealii::SparsityPattern::iterator select_index = sparsity_pattern.begin(row); @@ -720,25 +720,25 @@ namespace TrilinosWrappers // Only do this on the rows owned // locally on this processor. - TrilinosWrapper::types::int_type local_row = - matrix->LRID(static_cast(row)); + TrilinosWrappers::types::int_type local_row = + matrix->LRID(static_cast(row)); if (local_row >= 0) { TrilinosScalar *values; - TrilinosWrapper::types::int_type *col_indices; - TrilinosWrapper::types::int_type num_entries; + TrilinosWrappers::types::int_type *col_indices; + TrilinosWrappers::types::int_type num_entries; const int ierr = matrix->ExtractMyRowView(local_row, num_entries, values, col_indices); Assert (ierr == 0, ExcTrilinosError(ierr)); - TrilinosWrapper::types::int_type *diag_find = std::find(col_indices, + TrilinosWrappers::types::int_type *diag_find = std::find(col_indices, col_indices+num_entries,local_row); - TrilinosWrapper::types::int_type diag_index = - (TrilinosWrapper::types::int_type)(diag_find - col_indices); + TrilinosWrappers::types::int_type diag_index = + (TrilinosWrappers::types::int_type)(diag_find - col_indices); - for (TrilinosWrapper::types::int_type j=0; jLRID(static_cast(i)), - trilinos_j = matrix->LCID(static_cast(j)); + TrilinosWrappers::types::int_type trilinos_i = matrix->LRID(static_cast(i)), + trilinos_j = matrix->LCID(static_cast(j)); TrilinosScalar value = 0.; // If the data is not on the @@ -798,9 +798,9 @@ namespace TrilinosWrappers // Prepare pointers for extraction // of a view of the row. - TrilinosWrapper::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i); - TrilinosWrapper::types::int_type nnz_extracted; - TrilinosWrapper::types::int_type *col_indices; + TrilinosWrappers::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i); + TrilinosWrappers::types::int_type nnz_extracted; + TrilinosWrappers::types::int_type *col_indices; TrilinosScalar *values; // Generate the view and make @@ -817,11 +817,11 @@ namespace TrilinosWrappers // look for the value, and then // finally get it. - TrilinosWrapper::types::int_type *el_find = std::find(col_indices, + TrilinosWrappers::types::int_type *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j); - TrilinosWrapper::types::int_type local_col_index = - (TrilinosWrapper::types::int_type)(el_find - col_indices); + TrilinosWrappers::types::int_type local_col_index = + (TrilinosWrappers::types::int_type)(el_find - col_indices); // This is actually the only // difference to the el(i,j) @@ -850,9 +850,9 @@ namespace TrilinosWrappers { // Extract local indices in // the matrix. - TrilinosWrapper::types::int_type trilinos_i = - matrix->LRID(static_cast(i)), - trilinos_j = matrix->LCID(static_cast(j)); + TrilinosWrappers::types::int_type trilinos_i = + matrix->LRID(static_cast(i)), + trilinos_j = matrix->LCID(static_cast(j)); TrilinosScalar value = 0.; // If the data is not on the @@ -873,9 +873,9 @@ namespace TrilinosWrappers // Prepare pointers for extraction // of a view of the row. - TrilinosWrapper::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i); - TrilinosWrapper::types::int_type nnz_extracted; - TrilinosWrapper::types::int_type *col_indices; + TrilinosWrappers::types::int_type nnz_present = matrix->NumMyEntries(trilinos_i); + TrilinosWrappers::types::int_type nnz_extracted; + TrilinosWrappers::types::int_type *col_indices; TrilinosScalar *values; // Generate the view and make @@ -891,11 +891,11 @@ namespace TrilinosWrappers // Search the index where we // look for the value, and then // finally get it. - TrilinosWrapper::types::int_type *el_find = std::find(col_indices, + TrilinosWrappers::types::int_type *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j); - TrilinosWrapper::types::int_type local_col_index = - (TrilinosWrapper::types::int_type)(el_find - col_indices); + TrilinosWrappers::types::int_type local_col_index = + (TrilinosWrappers::types::int_type)(el_find - col_indices); // This is actually the only @@ -944,9 +944,9 @@ namespace TrilinosWrappers // get a representation of the // present row - TrilinosWrapper::types::int_type ncols = -1; - TrilinosWrapper::types::int_type local_row = - matrix->LRID(static_cast(row)); + TrilinosWrappers::types::int_type ncols = -1; + TrilinosWrappers::types::int_type local_row = + matrix->LRID(static_cast(row)); // on the processor who owns this // row, we'll have a non-negative @@ -964,7 +964,7 @@ namespace TrilinosWrappers namespace internals { - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; void perform_mmult (const SparseMatrix &inputleft, const SparseMatrix &inputright, @@ -1014,15 +1014,15 @@ namespace TrilinosWrappers ExcMessage ("Parallel distribution of matrix B and vector V " "does not match.")); - const TrilinosWrapper::types::int_type local_N = inputright.local_size(); - for (TrilinosWrapper::types::int_type i=0; iExtractMyRowView (i, N_entries, new_data); inputright.trilinos_matrix().ExtractMyRowView (i, N_entries, B_data); double value = V.trilinos_vector()[0][i]; - for (TrilinosWrapper::types::int_type j=0; j= 0, ExcInternalError()); const size_type GID = inputleft.row_partitioner().GID(i); - for (TrilinosWrapper::types::int_type j=0; j= 0, ExcInternalError()); const size_type GID = inputleft.row_partitioner().GID(i); - for (TrilinosWrapper::types::int_type j=0; jinvec_leng; + TrilinosWrappers::types::int_type max_per_proc; + TrilinosWrappers::types::int_type N_input_vector = B_->invec_leng; getrow_comm = B_->getrow->pre_comm; if ( getrow_comm != NULL) - for (TrilinosWrapper::types::int_type i = 0; i < getrow_comm->N_neighbors; i++) - for (TrilinosWrapper::types::int_type j = 0; j < getrow_comm->neighbors[i].N_send; j++) + for (TrilinosWrappers::types::int_type i = 0; i < getrow_comm->N_neighbors; i++) + for (TrilinosWrappers::types::int_type j = 0; j < getrow_comm->neighbors[i].N_send; j++) AssertThrow (getrow_comm->neighbors[i].send_list[j] < N_input_vector, ExcInternalError()); @@ -1222,9 +1222,9 @@ namespace TrilinosWrappers ExcDimensionMismatch(matrix->NumGlobalEntries(row), rhs.matrix->NumGlobalEntries(row))); - const TrilinosWrapper::types::int_type row_local = - matrix->RowMap().LID(static_cast(row)); - TrilinosWrapper::types::int_type n_entries, rhs_n_entries; + const TrilinosWrappers::types::int_type row_local = + matrix->RowMap().LID(static_cast(row)); + TrilinosWrappers::types::int_type n_entries, rhs_n_entries; TrilinosScalar *value_ptr, *rhs_value_ptr; // In debug mode, we want to check @@ -1236,7 +1236,7 @@ namespace TrilinosWrappers // indices is relatively slow compared to // just working with the values. #ifdef DEBUG - TrilinosWrapper::types::int_type *index_ptr, *rhs_index_ptr; + TrilinosWrappers::types::int_type *index_ptr, *rhs_index_ptr; ierr = rhs.matrix->ExtractMyRowView (row_local, rhs_n_entries, rhs_value_ptr, rhs_index_ptr); Assert (ierr == 0, ExcTrilinosError(ierr)); @@ -1252,7 +1252,7 @@ namespace TrilinosWrappers AssertThrow (n_entries == rhs_n_entries, ExcDimensionMismatch (n_entries, rhs_n_entries)); - for (TrilinosWrapper::types::int_type i=0; i(rhs.matrix->NumGlobalEntries(row))); - std::vector column_indices (max_row_length); + std::vector column_indices (max_row_length); std::vector values (max_row_length); if (matrix->Filled() == true && rhs.matrix->Filled() == true && @@ -1285,9 +1285,9 @@ namespace TrilinosWrappers for (size_type row=local_range.first; row < local_range.second; ++row) { - const TrilinosWrapper::types::int_type row_local = - matrix->RowMap().LID(static_cast(row)); - TrilinosWrapper::types::int_type n_entries; + const TrilinosWrappers::types::int_type row_local = + matrix->RowMap().LID(static_cast(row)); + TrilinosWrappers::types::int_type n_entries; ierr = rhs.matrix->ExtractMyRowCopy (row_local, max_row_length, n_entries, @@ -1295,7 +1295,7 @@ namespace TrilinosWrappers &column_indices[0]); Assert (ierr == 0, ExcTrilinosError(ierr)); - for (TrilinosWrapper::types::int_type i=0; iEpetra_CrsMatrix::ExtractGlobalRowCopy - ((TrilinosWrapper::types::int_type)row, max_row_length, + ((TrilinosWrappers::types::int_type)row, max_row_length, n_entries, &values[0], &column_indices[0]); Assert (ierr == 0, ExcTrilinosError(ierr)); - for (TrilinosWrapper::types::int_type i=0; iEpetra_CrsMatrix::SumIntoGlobalValues - ((TrilinosWrapper::types::int_type)row, n_entries, + ((TrilinosWrappers::types::int_type)row, n_entries, &values[0], &column_indices[0]); Assert (ierr == 0, ExcTrilinosError(ierr)); } @@ -1375,13 +1375,13 @@ namespace TrilinosWrappers else { double *values; - TrilinosWrapper::types::int_type *indices; - TrilinosWrapper::types::int_type num_entries; + TrilinosWrappers::types::int_type *indices; + TrilinosWrappers::types::int_type num_entries; - for (TrilinosWrapper::types::int_type i=0; iNumMyRows(); ++i) + for (TrilinosWrappers::types::int_type i=0; iNumMyRows(); ++i) { matrix->ExtractMyRowView (i, num_entries, values, indices); - for (TrilinosWrapper::types::int_type j=0; jGRID(i) << "," << matrix->GCID(indices[j]) << ") " << values[j] << std::endl; } @@ -1397,7 +1397,7 @@ namespace TrilinosWrappers { size_type static_memory = sizeof(this) + sizeof (*matrix) + sizeof(*matrix->Graph().DataPtr()); - return ((sizeof(TrilinosScalar)+sizeof(TrilinosWrapper::types::int_type))* + return ((sizeof(TrilinosScalar)+sizeof(TrilinosWrappers::types::int_type))* matrix->NumMyNonzeros() + sizeof(int)*local_size() + static_memory); } } diff --git a/deal.II/source/lac/trilinos_sparsity_pattern.cc b/deal.II/source/lac/trilinos_sparsity_pattern.cc index 3a43219d58..814b883399 100644 --- a/deal.II/source/lac/trilinos_sparsity_pattern.cc +++ b/deal.II/source/lac/trilinos_sparsity_pattern.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2008, 2009, 2010, 2011, 2012 by the deal.II authors +// Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -48,14 +48,14 @@ namespace TrilinosWrappers // get a representation of the present // row - TrilinosWrapper::types::int_type ncols; - TrilinosWrapper::types::int_type colnums = sparsity_pattern->n_cols(); + TrilinosWrappers::types::int_type ncols; + TrilinosWrappers::types::int_type colnums = sparsity_pattern->n_cols(); int ierr; - ierr = sparsity_pattern->graph->ExtractGlobalRowCopy((TrilinosWrapper::types::int_type)this->a_row, + ierr = sparsity_pattern->graph->ExtractGlobalRowCopy((TrilinosWrappers::types::int_type)this->a_row, colnums, ncols, - (TrilinosWrapper::types::int_type *)&(*colnum_cache)[0]); + (TrilinosWrappers::types::int_type *)&(*colnum_cache)[0]); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); // copy it into our caches if the @@ -177,8 +177,8 @@ namespace TrilinosWrappers const size_type n, const size_type n_entries_per_row) { - const Epetra_Map rows (static_cast(m), 0, Utilities::Trilinos::comm_self()); - const Epetra_Map columns (static_cast(n), 0, Utilities::Trilinos::comm_self()); + const Epetra_Map rows (static_cast(m), 0, Utilities::Trilinos::comm_self()); + const Epetra_Map columns (static_cast(n), 0, Utilities::Trilinos::comm_self()); reinit (rows, columns, n_entries_per_row); } @@ -227,9 +227,9 @@ namespace TrilinosWrappers const size_type n, const std::vector &n_entries_per_row) { - const Epetra_Map rows (static_cast(m), 0, + const Epetra_Map rows (static_cast(m), 0, Utilities::Trilinos::comm_self()); - const Epetra_Map columns (static_cast(n), 0, + const Epetra_Map columns (static_cast(n), 0, Utilities::Trilinos::comm_self()); reinit (rows, columns, n_entries_per_row); @@ -277,13 +277,13 @@ namespace TrilinosWrappers { namespace { - typedef types::global_dof_index size_type; + typedef dealii::types::global_dof_index size_type; // distinguish between compressed sparsity types that define row_begin() // and SparsityPattern that uses begin() as iterator type template void copy_row (const Sparsity &csp, const size_type row, - std::vector &row_indices) + std::vector &row_indices) { typename Sparsity::row_iterator col_num = csp.row_begin (row); for (size_type col=0; col_num != csp.row_end (row); ++col_num, ++col) @@ -292,7 +292,7 @@ namespace TrilinosWrappers void copy_row (const dealii::SparsityPattern &csp, const size_type row, - std::vector &row_indices) + std::vector &row_indices) { dealii::SparsityPattern::iterator col_num = csp.begin (row); for (size_type col=0; col_num != csp.end (row); ++col_num, ++col) @@ -325,7 +325,7 @@ namespace TrilinosWrappers const size_type first_row = input_row_map.MinMyGID(), last_row = input_row_map.MaxMyGID()+1; - std::vector n_entries_per_row(last_row - first_row); + std::vector n_entries_per_row(last_row - first_row); for (size_type row=first_row; row(graph->NumGlobalRows())); - std::vector row_indices; + std::vector row_indices; // Include possibility to exchange data // since CompressedSimpleSparsityPattern is @@ -350,7 +350,7 @@ namespace TrilinosWrappers if (exchange_data==false) for (size_type row=first_row; rowInsertGlobalIndices (1, - reinterpret_cast(&row), + graph->InsertGlobalIndices (1, + reinterpret_cast(&row), row_length, &row_indices[0]); } @@ -391,8 +391,8 @@ namespace TrilinosWrappers void SparsityPattern::copy_from (const SparsityType &sp) { - const Epetra_Map rows (static_cast(sp.n_rows()), 0, Utilities::Trilinos::comm_self()); - const Epetra_Map columns (static_cast(sp.n_cols()), 0, Utilities::Trilinos::comm_self()); + const Epetra_Map rows (static_cast(sp.n_rows()), 0, Utilities::Trilinos::comm_self()); + const Epetra_Map columns (static_cast(sp.n_cols()), 0, Utilities::Trilinos::comm_self()); reinit (rows, columns, sp); } @@ -440,9 +440,9 @@ namespace TrilinosWrappers { // Extract local indices in // the matrix. - TrilinosWrapper::types::int_type trilinos_i = - graph->LRID(static_cast(i)), - trilinos_j = graph->LCID(static_cast(j)); + TrilinosWrappers::types::int_type trilinos_i = + graph->LRID(static_cast(i)), + trilinos_j = graph->LCID(static_cast(j)); // If the data is not on the // present processor, we throw @@ -461,9 +461,9 @@ namespace TrilinosWrappers // local indices. if (graph->Filled() == false) { - TrilinosWrapper::types::int_type nnz_present = graph->NumGlobalIndices(i); - TrilinosWrapper::types::int_type nnz_extracted; - TrilinosWrapper::types::int_type *col_indices; + TrilinosWrappers::types::int_type nnz_present = graph->NumGlobalIndices(i); + TrilinosWrappers::types::int_type nnz_extracted; + TrilinosWrappers::types::int_type *col_indices; // Generate the view and make // sure that we have not generated @@ -475,11 +475,11 @@ namespace TrilinosWrappers ExcDimensionMismatch(nnz_present, nnz_extracted)); // Search the index - TrilinosWrapper::types::int_type *el_find = + TrilinosWrappers::types::int_type *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j); - TrilinosWrapper::types::int_type local_col_index = - (TrilinosWrapper::types::int_type)(el_find - col_indices); + TrilinosWrappers::types::int_type local_col_index = + (TrilinosWrappers::types::int_type)(el_find - col_indices); if (local_col_index == nnz_present) return false; @@ -488,9 +488,9 @@ namespace TrilinosWrappers { // Prepare pointers for extraction // of a view of the row. - TrilinosWrapper::types::int_type nnz_present = graph->NumGlobalIndices(i); - TrilinosWrapper::types::int_type nnz_extracted; - TrilinosWrapper::types::int_type *col_indices; + TrilinosWrappers::types::int_type nnz_present = graph->NumGlobalIndices(i); + TrilinosWrappers::types::int_type nnz_extracted; + TrilinosWrappers::types::int_type *col_indices; // Generate the view and make // sure that we have not generated @@ -503,11 +503,11 @@ namespace TrilinosWrappers ExcDimensionMismatch(nnz_present, nnz_extracted)); // Search the index - TrilinosWrapper::types::int_type *el_find = std::find(col_indices, + TrilinosWrappers::types::int_type *el_find = std::find(col_indices, col_indices + nnz_present, trilinos_j); - TrilinosWrapper::types::int_type local_col_index = - (TrilinosWrapper::types::int_type)(el_find - col_indices); + TrilinosWrappers::types::int_type local_col_index = + (TrilinosWrappers::types::int_type)(el_find - col_indices); if (local_col_index == nnz_present) return false; @@ -523,19 +523,19 @@ namespace TrilinosWrappers SparsityPattern::bandwidth () const { size_type local_b=0; - TrilinosWrapper::types::int_type global_b=0; + TrilinosWrappers::types::int_type global_b=0; for (size_type i=0; iExtractMyRowView(i, num_entries, indices); for (size_type j=0; j<(size_type)num_entries; ++j) { - if (static_cast(std::abs(static_cast(i-indices[j]))) > local_b) - local_b = std::abs(static_cast(i-indices[j])); + if (static_cast(std::abs(static_cast(i-indices[j]))) > local_b) + local_b = std::abs(static_cast(i-indices[j])); } } - graph->Comm().MaxAll((TrilinosWrapper::types::int_type *)&local_b, &global_b, 1); + graph->Comm().MaxAll((TrilinosWrappers::types::int_type *)&local_b, &global_b, 1); return static_cast(global_b); } @@ -544,7 +544,7 @@ namespace TrilinosWrappers SparsityPattern::size_type SparsityPattern::n_rows () const { - const TrilinosWrapper::types::int_type n_rows = graph -> NumGlobalRows(); + const TrilinosWrappers::types::int_type n_rows = graph -> NumGlobalRows(); return n_rows; } @@ -553,7 +553,7 @@ namespace TrilinosWrappers SparsityPattern::size_type SparsityPattern::n_cols () const { - TrilinosWrapper::types::int_type n_cols; + TrilinosWrappers::types::int_type n_cols; if (graph->Filled() == true) n_cols = graph -> NumGlobalCols(); else @@ -567,7 +567,7 @@ namespace TrilinosWrappers SparsityPattern::size_type SparsityPattern::local_size () const { - TrilinosWrapper::types::int_type n_rows = graph -> NumMyRows(); + TrilinosWrappers::types::int_type n_rows = graph -> NumMyRows(); return n_rows; } @@ -589,7 +589,7 @@ namespace TrilinosWrappers SparsityPattern::size_type SparsityPattern::n_nonzero_elements () const { - TrilinosWrapper::types::int_type nnz = graph->NumGlobalEntries(); + TrilinosWrappers::types::int_type nnz = graph->NumGlobalEntries(); return static_cast(nnz); } @@ -599,7 +599,7 @@ namespace TrilinosWrappers SparsityPattern::size_type SparsityPattern::max_entries_per_row () const { - TrilinosWrapper::types::int_type nnz = graph->MaxNumIndices(); + TrilinosWrappers::types::int_type nnz = graph->MaxNumIndices(); return static_cast(nnz); } @@ -613,9 +613,9 @@ namespace TrilinosWrappers // get a representation of the // present row - TrilinosWrapper::types::int_type ncols = -1; - TrilinosWrapper::types::int_type local_row = - graph->LRID(static_cast(row)); + TrilinosWrappers::types::int_type ncols = -1; + TrilinosWrappers::types::int_type local_row = + graph->LRID(static_cast(row)); // on the processor who owns this // row, we'll have a non-negative @@ -647,13 +647,13 @@ namespace TrilinosWrappers out << *graph; else { - TrilinosWrapper::types::int_type *indices; - TrilinosWrapper::types::int_type num_entries; + TrilinosWrappers::types::int_type *indices; + TrilinosWrappers::types::int_type num_entries; - for (TrilinosWrapper::types::int_type i=0; iNumMyRows(); ++i) + for (TrilinosWrappers::types::int_type i=0; iNumMyRows(); ++i) { graph->ExtractMyRowView (i, num_entries, indices); - for (TrilinosWrapper::types::int_type j=0; jGRID(j)] << ") " << std::endl; } @@ -670,8 +670,8 @@ namespace TrilinosWrappers Assert (graph->Filled() == true, ExcInternalError()); for (size_type row=0; rowExtractMyRowView (row, num_entries, indices); for (size_type j=0; j<(size_type)num_entries; ++j) @@ -680,8 +680,8 @@ 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))] - << " " << -static_cast(row) + out << indices[graph->GRID(static_cast(j))] + << " " << -static_cast(row) << std::endl; } diff --git a/deal.II/source/lac/trilinos_vector.cc b/deal.II/source/lac/trilinos_vector.cc index 9e6f68e532..3085659ecd 100644 --- a/deal.II/source/lac/trilinos_vector.cc +++ b/deal.II/source/lac/trilinos_vector.cc @@ -231,10 +231,10 @@ namespace TrilinosWrappers size_type n_elements = 0, added_elements = 0, block_offset = 0; for (size_type block=0; block global_ids (n_elements, -1); + std::vector global_ids (n_elements, -1); for (size_type block=0; block(partitioning.size()), + Epetra_LocalMap map (static_cast(partitioning.size()), 0, #ifdef DEAL_II_WITH_MPI Epetra_MpiComm(communicator)); @@ -437,7 +437,7 @@ namespace TrilinosWrappers { if (size() != n) { - Epetra_LocalMap map ((TrilinosWrapper::types::int_type)n, 0, + Epetra_LocalMap map ((TrilinosWrappers::types::int_type)n, 0, Utilities::Trilinos::comm_self()); vector.reset (new Epetra_FEVector (map)); } @@ -488,9 +488,9 @@ namespace TrilinosWrappers const bool fast) { if (vector->Map().NumGlobalElements() != - static_cast(partitioning.size())) + static_cast(partitioning.size())) { - Epetra_LocalMap map (static_cast(partitioning.size()), + Epetra_LocalMap map (static_cast(partitioning.size()), 0, #ifdef DEAL_II_WITH_MPI Epetra_MpiComm(communicator)); diff --git a/deal.II/source/lac/trilinos_vector_base.cc b/deal.II/source/lac/trilinos_vector_base.cc index 65aded69e6..f8f8675422 100644 --- a/deal.II/source/lac/trilinos_vector_base.cc +++ b/deal.II/source/lac/trilinos_vector_base.cc @@ -40,8 +40,8 @@ namespace TrilinosWrappers // we can use []. Note that we // can only get local values. - const TrilinosWrapper::types::int_type local_index = - vector.vector->Map().LID(static_cast(index)); + const TrilinosWrappers::types::int_type local_index = + vector.vector->Map().LID(static_cast(index)); Assert (local_index >= 0, ExcAccessToNonLocalElement (index, vector.vector->Map().MinMyGID(), @@ -168,8 +168,8 @@ namespace TrilinosWrappers { // Extract local indices in // the vector. - TrilinosWrapper::types::int_type trilinos_i = - vector->Map().LID(static_cast(index)); + TrilinosWrappers::types::int_type trilinos_i = + vector->Map().LID(static_cast(index)); TrilinosScalar value = 0.; // If the element is not @@ -197,8 +197,8 @@ namespace TrilinosWrappers { // Extract local indices in // the vector. - TrilinosWrapper::types::int_type trilinos_i = - vector->Map().LID(static_cast(index)); + TrilinosWrappers::types::int_type trilinos_i = + vector->Map().LID(static_cast(index)); TrilinosScalar value = 0.; // If the element is not present @@ -426,7 +426,7 @@ namespace TrilinosWrappers //entry. return sizeof(*this) + this->local_size()*( sizeof(double)+ - sizeof(TrilinosWrapper::types::int_type) ); + sizeof(TrilinosWrappers::types::int_type) ); } } /* end of namespace TrilinosWrappers */