From: turcksin Date: Fri, 8 Mar 2013 18:11:21 +0000 (+0000) Subject: Merge from mainline. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51f2f682e9dd1960e4e500c0256da6cf3d3b22d2;p=dealii-svn.git Merge from mainline. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28824 0785d39b-7218-0410-832d-ea1e28bc413d --- 51f2f682e9dd1960e4e500c0256da6cf3d3b22d2 diff --cc deal.II/include/deal.II/fe/fe_tools.h index 364d83b55f,926eaa6e50..7f5c0b1109 --- a/deal.II/include/deal.II/fe/fe_tools.h +++ b/deal.II/include/deal.II/fe/fe_tools.h @@@ -168,9 -168,9 +168,9 @@@ namespace FETool */ template void compute_block_renumbering ( - const FiniteElement &fe, + const FiniteElement &fe, - std::vector &renumbering, - std::vector &block_data, + std::vector &renumbering, + std::vector &block_data, bool return_start_indices = true); /** diff --cc deal.II/include/deal.II/grid/grid_generator.h index 054d3c6735,96ab4a635a..702bb1e01f --- a/deal.II/include/deal.II/grid/grid_generator.h +++ b/deal.II/include/deal.II/grid/grid_generator.h @@@ -635,8 -629,8 +634,8 @@@ public * @param R The radius of the circle, which forms the middle line of the torus containing the loop of cells. Must be greater than @p r. * @param r The radius of the cylinder bend together as loop. */ - static void moebius (Triangulation<3,3> &tria, + static void moebius (Triangulation<3,3> &tria, - const unsigned int n_cells, + const size_type n_cells, const unsigned int n_rotations, const double R, const double r); diff --cc deal.II/include/deal.II/lac/block_indices.h index bb2567c2ea,19c836bb6c..5fca62c6a2 --- a/deal.II/include/deal.II/lac/block_indices.h +++ b/deal.II/include/deal.II/lac/block_indices.h @@@ -403,12 -398,13 +403,13 @@@ BlockIndices::push_back(const size_typ inline -std::pair -BlockIndices::global_to_local (const unsigned int i) const +std::pair +BlockIndices::global_to_local (const size_type i) const { Assert (i 0, ExcLowerRange(i, 1)); - int block = n_blocks-1; + unsigned int block = n_blocks-1; while (i < start_indices[block]) --block; diff --cc deal.II/include/deal.II/lac/block_matrix_base.h index 49dd041fba,1f796a01fc..18cfc16e5e --- a/deal.II/include/deal.II/lac/block_matrix_base.h +++ b/deal.II/include/deal.II/lac/block_matrix_base.h @@@ -1318,9 -1303,9 +1318,9 @@@ namespace BlockMatrixIterator template inline Accessor::Accessor ( - const BlockMatrix *matrix, + const BlockMatrix *matrix, - const unsigned int row, - const unsigned int col) + const size_type row, + const size_type col) : matrix(matrix), base_iterator(matrix->block(0,0).begin()) @@@ -1527,9 -1512,9 +1527,9 @@@ template inline Accessor::Accessor ( - BlockMatrix *matrix, + BlockMatrix *matrix, - const unsigned int row, - const unsigned int col) + const size_type row, + const size_type col) : matrix(matrix), base_iterator(matrix->block(0,0).begin()) diff --cc deal.II/include/deal.II/lac/constraint_matrix.h index aec4c1ebc7,40d824c3d5..c4df71fa0e --- a/deal.II/include/deal.II/lac/constraint_matrix.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.h @@@ -1771,8 -1766,8 +1771,8 @@@ private * row indices. */ void - make_sorted_row_list (const std::vector &local_dof_indices, + make_sorted_row_list (const std::vector &local_dof_indices, - internals::GlobalRowsFromLocal &global_rows) const; + internals::GlobalRowsFromLocal &global_rows) const; /** * Internal helper function for diff --cc deal.II/include/deal.II/lac/constraint_matrix.templates.h index 35c6b4155a,76268dcdcb..0357c3df5b --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@@ -2117,10 -2113,10 +2117,10 @@@ add_this_index // are related to it. void ConstraintMatrix:: -make_sorted_row_list (const std::vector &local_dof_indices, +make_sorted_row_list (const std::vector &local_dof_indices, - internals::GlobalRowsFromLocal &global_rows) const + internals::GlobalRowsFromLocal &global_rows) const { - const unsigned int n_local_dofs = local_dof_indices.size(); + const size_type n_local_dofs = local_dof_indices.size(); AssertDimension (n_local_dofs, global_rows.size()); // when distributing the local data to diff --cc deal.II/include/deal.II/lac/parallel_vector.h index df1c55c903,088d0528e0..4c2dde075a --- a/deal.II/include/deal.II/lac/parallel_vector.h +++ b/deal.II/include/deal.II/lac/parallel_vector.h @@@ -656,8 -656,8 +656,8 @@@ namespace paralle * indices. */ template - void add (const std::vector &indices, + void add (const std::vector &indices, - const std::vector &values); + const std::vector &values); /** * This is a second collective @@@ -680,9 -680,9 +680,9 @@@ * functions above. */ template - void add (const unsigned int n_elements, - const unsigned int *indices, + void add (const size_type n_elements, + const size_type *indices, - const OtherNumber *values); + const OtherNumber *values); /** * Addition of @p s to all @@@ -1592,8 -1589,8 +1592,8 @@@ template inline void - Vector::add (const std::vector &indices, + Vector::add (const std::vector &indices, - const std::vector &values) + const std::vector &values) { AssertDimension (indices.size(), values.size()); add (indices.size(), &indices[0], &values[0]); @@@ -1618,11 -1615,11 +1618,11 @@@ template inline void - Vector::add (const unsigned int n_indices, - const unsigned int *indices, + Vector::add (const size_type n_indices, + const size_type *indices, - const OtherNumber *values) + const OtherNumber *values) { - for (unsigned int i=0; i::clear_mpi_requests () { - #ifdef DEAL_II_COMPILER_SUPPORTS_MPI + #ifdef DEAL_II_WITH_MPI - for (unsigned int j=0; jget_communicator()); - for (unsigned int i=partitioner->this_mpi_process()+1; + for (size_type i=partitioner->this_mpi_process()+1; in_mpi_processes(); i++) MPI_Barrier (partitioner->get_communicator()); #endif diff --cc deal.II/include/deal.II/lac/petsc_matrix_base.h index f3c7f5200d,7715d722dd..f273b38939 --- a/deal.II/include/deal.II/lac/petsc_matrix_base.h +++ b/deal.II/include/deal.II/lac/petsc_matrix_base.h @@@ -445,10 -431,10 +445,10 @@@ namespace PETScWrapper * false, i.e., even zero * values are inserted/replaced. */ - void set (const unsigned int row, - const std::vector &col_indices, + void set (const size_type row, + const std::vector &col_indices, - const std::vector &values, + const std::vector &values, - const bool elide_zero_values = false); + const bool elide_zero_values = false); /** * Set several elements to values @@@ -476,11 -462,11 +476,11 @@@ * false, i.e., even zero * values are inserted/replaced. */ - void set (const unsigned int row, - const unsigned int n_cols, - const unsigned int *col_indices, + void set (const size_type row, + const size_type n_cols, + const size_type *col_indices, - const PetscScalar *values, + const PetscScalar *values, - const bool elide_zero_values = false); + const bool elide_zero_values = false); /** * Add @p value to the element @@@ -581,10 -567,10 +581,10 @@@ * i.e., zero values won't be added * into the matrix. */ - void add (const unsigned int row, - const std::vector &col_indices, + void add (const size_type row, + const std::vector &col_indices, - const std::vector &values, + const std::vector &values, - const bool elide_zero_values = true); + const bool elide_zero_values = true); /** * Add an array of values given by @@@ -613,12 -599,12 +613,12 @@@ * i.e., zero values won't be added * into the matrix. */ - void add (const unsigned int row, - const unsigned int n_cols, - const unsigned int *col_indices, + void add (const size_type row, + const size_type n_cols, + const size_type *col_indices, - const PetscScalar *values, + const PetscScalar *values, - const bool elide_zero_values = true, - const bool col_indices_are_sorted = false); + const bool elide_zero_values = true, + const bool col_indices_are_sorted = false); /** * Remove all elements from @@@ -1537,10 -1523,10 +1537,10 @@@ inline void - MatrixBase::set (const unsigned int row, - const std::vector &col_indices, + MatrixBase::set (const size_type row, + const std::vector &col_indices, - const std::vector &values, + const std::vector &values, - const bool elide_zero_values) + const bool elide_zero_values) { Assert (col_indices.size() == values.size(), ExcDimensionMismatch(col_indices.size(), values.size())); @@@ -1553,11 -1539,11 +1553,11 @@@ inline void - MatrixBase::set (const unsigned int row, - const unsigned int n_cols, - const unsigned int *col_indices, + MatrixBase::set (const size_type row, + const size_type n_cols, + const size_type *col_indices, - const PetscScalar *values, + const PetscScalar *values, - const bool elide_zero_values) + const bool elide_zero_values) { prepare_action(LastAction::insert); @@@ -1686,10 -1672,10 +1686,10 @@@ inline void - MatrixBase::add (const unsigned int row, - const std::vector &col_indices, + MatrixBase::add (const size_type row, + const std::vector &col_indices, - const std::vector &values, + const std::vector &values, - const bool elide_zero_values) + const bool elide_zero_values) { Assert (col_indices.size() == values.size(), ExcDimensionMismatch(col_indices.size(), values.size())); @@@ -1702,11 -1688,11 +1702,11 @@@ inline void - MatrixBase::add (const unsigned int row, - const unsigned int n_cols, - const unsigned int *col_indices, + MatrixBase::add (const size_type row, + const size_type n_cols, + const size_type *col_indices, - const PetscScalar *values, + const PetscScalar *values, - const bool elide_zero_values, + const bool elide_zero_values, const bool /*col_indices_are_sorted*/) { prepare_action(LastAction::add); diff --cc deal.II/include/deal.II/lac/petsc_vector_base.h index 2e00dc1c06,3d22318d1a..c64fdd6717 --- a/deal.II/include/deal.II/lac/petsc_vector_base.h +++ b/deal.II/include/deal.II/lac/petsc_vector_base.h @@@ -89,12 -83,10 +89,12 @@@ namespace PETScWrapper * as to only allow the actual vector * class to create it. */ - VectorReference (const VectorBase &vector, + VectorReference (const VectorBase &vector, - const unsigned int index); + const size_type index); - public: + + public: + /** * This looks like a copy operator, * but does something different than @@@ -449,8 -441,8 +449,8 @@@ * the corresponding values in the * second. */ - void set (const std::vector &indices, + void set (const std::vector &indices, - const std::vector &values); + const std::vector &values); /** * A collective add operation: This @@@ -458,8 -450,8 +458,8 @@@ * stored in @p values to the vector * components specified by @p indices. */ - void add (const std::vector &indices, + void add (const std::vector &indices, - const std::vector &values); + const std::vector &values); /** * This is a second collective @@@ -480,9 -472,9 +480,9 @@@ * other two add() * functions above. */ - void add (const unsigned int n_elements, - const unsigned int *indices, + void add (const size_type n_elements, + const size_type *indices, - const PetscScalar *values); + const PetscScalar *values); /** * Return the scalar product of two @@@ -888,10 -880,10 +888,10 @@@ * @p add_values flag set to the * corresponding value. */ - void do_set_add_operation (const unsigned int n_elements, - const unsigned int *indices, + void do_set_add_operation (const size_type n_elements, + const size_type *indices, - const PetscScalar *values, + const PetscScalar *values, - const bool add_values); + const bool add_values); }; @@@ -918,8 -910,8 +918,8 @@@ namespace internal { inline - VectorReference::VectorReference (const VectorBase &vector, + VectorReference::VectorReference (const VectorBase &vector, - const unsigned int index) + const size_type index) : vector (vector), index (index) diff --cc deal.II/include/deal.II/lac/sparse_direct.h index bd21d92236,5a5d9d673e..14adaac7ce --- a/deal.II/include/deal.II/lac/sparse_direct.h +++ b/deal.II/include/deal.II/lac/sparse_direct.h @@@ -1310,16 -1300,16 +1310,16 @@@ class SparseDirectMUMP { private: - #ifdef DEAL_II_USE_MUMPS + #ifdef DEAL_II_WITH_MUMPS DMUMPS_STRUC_C id; - #endif // DEAL_II_USE_MUMPS + #endif // DEAL_II_WITH_MUMPS - double *a; - double *rhs; - int *irn; - int *jcn; - unsigned int n; - unsigned int nz; + double *a; + double *rhs; + int *irn; + int *jcn; + types::global_dof_index n; + types::global_dof_index nz; /** * This function initializes a MUMPS instance diff --cc deal.II/include/deal.II/lac/sparse_matrix.templates.h index c049fdb823,8e75a8ad9f..afc371164f --- a/deal.II/include/deal.II/lac/sparse_matrix.templates.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.templates.h @@@ -387,17 -385,17 +387,17 @@@ namespace interna template - void vmult_on_subrange (const unsigned int begin_row, - const unsigned int end_row, - const number *values, + void vmult_on_subrange (const size_type begin_row, + const size_type end_row, + const number *values, - const std::size_t *rowstart, + const std::size_t *rowstart, - const unsigned int *colnums, - const InVector &src, - OutVector &dst, - const bool add) + const size_type *colnums, + const InVector &src, + OutVector &dst, + const bool add) { - const number *val_ptr = &values[rowstart[begin_row]]; - const unsigned int *colnum_ptr = &colnums[rowstart[begin_row]]; + const number *val_ptr = &values[rowstart[begin_row]]; + const size_type *colnum_ptr = &colnums[rowstart[begin_row]]; typename OutVector::iterator dst_ptr = dst.begin() + begin_row; if (add == false) @@@ -772,12 -770,12 +772,12 @@@ namespace interna */ template - number matrix_norm_sqr_on_subrange (const unsigned int begin_row, - const unsigned int end_row, - const number *values, + number matrix_norm_sqr_on_subrange (const size_type begin_row, + const size_type end_row, + const number *values, - const std::size_t *rowstart, + const std::size_t *rowstart, - const unsigned int *colnums, - const InVector &v) + const size_type *colnums, + const InVector &v) { number norm_sqr=0.; @@@ -835,13 -833,13 +835,13 @@@ namespace interna */ template - number matrix_scalar_product_on_subrange (const unsigned int begin_row, - const unsigned int end_row, - const number *values, + number matrix_scalar_product_on_subrange (const size_type begin_row, + const size_type end_row, + const number *values, - const std::size_t *rowstart, + const std::size_t *rowstart, - const unsigned int *colnums, - const InVector &u, - const InVector &v) + const size_type *colnums, + const InVector &u, + const InVector &v) { number norm_sqr=0.; @@@ -1219,14 -1217,14 +1219,14 @@@ namespace interna template - number residual_sqr_on_subrange (const unsigned int begin_row, - const unsigned int end_row, - const number *values, + number residual_sqr_on_subrange (const size_type begin_row, + const size_type end_row, + const number *values, - const std::size_t *rowstart, + const std::size_t *rowstart, - const unsigned int *colnums, - const InVector &u, - const InVector &b, - OutVector &dst) + const size_type *colnums, + const InVector &u, + const InVector &b, + OutVector &dst) { number norm_sqr=0.; @@@ -1287,10 -1285,10 +1287,10 @@@ SparseMatrix::precondition_Jaco AssertDimension (dst.size(), n()); AssertDimension (src.size(), n()); - const unsigned int n = src.size(); - somenumber *dst_ptr = dst.begin(); - const somenumber *src_ptr = src.begin(); + const size_type n = src.size(); + somenumber *dst_ptr = dst.begin(); + const somenumber *src_ptr = src.begin(); - const std::size_t *rowstart_ptr = &cols->rowstart[0]; + const std::size_t *rowstart_ptr = &cols->rowstart[0]; // optimize the following loop for // the case that the relaxation diff --cc deal.II/include/deal.II/lac/sparse_vanka.templates.h index af510e256a,6ae96146b4..d8586758bd --- a/deal.II/include/deal.II/lac/sparse_vanka.templates.h +++ b/deal.II/include/deal.II/lac/sparse_vanka.templates.h @@@ -62,66 -62,65 +62,65 @@@ template ::compute_inverses () { - if (!DEAL_II_USE_MT) - compute_inverses (0, matrix->m()); - else - { - const size_type n_inverses = std::count (selected.begin(), - selected.end(), - true); + #ifndef DEAL_II_WITH_THREADS + compute_inverses (0, matrix->m()); + #else - const unsigned int n_inverses = std::count (selected.begin(), - selected.end(), - true); ++ const size_type n_inverses = std::count (selected.begin(), ++ selected.end(), ++ true); - const size_type n_inverses_per_thread = std::max(n_inverses / n_threads, - const unsigned int n_inverses_per_thread = std::max(n_inverses / n_threads, - 1U); ++ const size_type n_inverses_per_thread = std::max(n_inverses / n_threads, + static_cast (1U)); - // set up start and end index - // for each of the - // threads. note that we have - // to work somewhat to get this - // appropriate, since the - // indices for which inverses - // have to be computed may not - // be evenly distributed in the - // vector. as an extreme - // example consider numbering - // of DoFs by component, then - // all indices for which we - // have to do work will be - // consecutive, with other - // consecutive regions where we - // do not have to do something - std::vector > blocking (n_threads); + // set up start and end index + // for each of the + // threads. note that we have + // to work somewhat to get this + // appropriate, since the + // indices for which inverses + // have to be computed may not + // be evenly distributed in the + // vector. as an extreme + // example consider numbering + // of DoFs by component, then + // all indices for which we + // have to do work will be + // consecutive, with other + // consecutive regions where we + // do not have to do something - std::vector > blocking (n_threads); ++ std::vector > blocking (n_threads); - unsigned int c = 0; - unsigned int thread = 0; - blocking[0].first = 0; + unsigned int c = 0; + unsigned int thread = 0; + blocking[0].first = 0; - for (size_type i=0; (im()) && (thread+1m()) && (thread+1m()) && (thread+1m(); - - typedef void (SparseVanka::*FunPtr)(const size_type, - const size_type); - const FunPtr fun_ptr = &SparseVanka::compute_inverses; - - // Now spawn the threads - Threads::ThreadGroup<> threads; - for (unsigned int i=0; im(); + - typedef void (SparseVanka::*FunPtr)(const unsigned int, - const unsigned int); ++ typedef void (SparseVanka::*FunPtr)(const size_type, ++ const size_type); + const FunPtr fun_ptr = &SparseVanka::compute_inverses; + + // Now spawn the threads + Threads::ThreadGroup<> threads; + for (unsigned int i=0; i &new_indices, - const std::vector &starting_indices = std::vector()); + std::vector &new_indices, + const std::vector &starting_indices = std::vector()); - #ifdef DEAL_II_COMPILER_SUPPORTS_MPI + #ifdef DEAL_II_WITH_MPI /** * Communciate rows in a compressed * sparsity pattern over MPI. diff --cc deal.II/include/deal.II/lac/trilinos_vector_base.h index 6a13d093a2,172bc10777..4b021208dc --- a/deal.II/include/deal.II/lac/trilinos_vector_base.h +++ b/deal.II/include/deal.II/lac/trilinos_vector_base.h @@@ -653,8 -648,8 +653,8 @@@ namespace TrilinosWrapper * argument, the corresponding * values in the second. */ - void set (const std::vector &indices, + void set (const std::vector &indices, - const std::vector &values); + const std::vector &values); /** * This is a second collective @@@ -1330,8 -1325,8 +1330,8 @@@ inline void - VectorBase::set (const std::vector &indices, + VectorBase::set (const std::vector &indices, - const std::vector &values) + const std::vector &values) { // if we have ghost values, do not allow // writing to this vector at all. @@@ -1399,8 -1394,8 +1399,8 @@@ inline void - VectorBase::add (const std::vector &indices, + VectorBase::add (const std::vector &indices, - const std::vector &values) + const std::vector &values) { // if we have ghost values, do not allow // writing to this vector at all. diff --cc deal.II/include/deal.II/lac/vector.h index eb42a71694,05ebaa680d..24c83ea22d --- a/deal.II/include/deal.II/lac/vector.h +++ b/deal.II/include/deal.II/lac/vector.h @@@ -707,8 -707,8 +707,8 @@@ public * indices. */ template - void add (const std::vector &indices, + void add (const std::vector &indices, - const std::vector &values); + const std::vector &values); /** * This is a second collective @@@ -731,9 -731,9 +731,9 @@@ * functions above. */ template - void add (const unsigned int n_elements, - const unsigned int *indices, + void add (const size_type n_elements, + const size_type *indices, - const OtherNumber *values); + const OtherNumber *values); /** * Addition of @p s to all @@@ -1303,8 -1303,8 +1303,8 @@@ template inline void -Vector::add (const std::vector &indices, +Vector::add (const std::vector &indices, - const std::vector &values) + const std::vector &values) { Assert (indices.size() == values.size(), ExcDimensionMismatch(indices.size(), values.size())); @@@ -1331,11 -1331,11 +1331,11 @@@ template inline void -Vector::add (const unsigned int n_indices, - const unsigned int *indices, +Vector::add (const size_type n_indices, + const size_type *indices, - const OtherNumber *values) + const OtherNumber *values) { - for (unsigned int i=0; i indices; + std::vector indices; /** - * The DoF indices on the - * current cell, organized by - * local blocks + * The DoF indices on the current cell, organized by local blocks. + * The size of this vector is zero, unless local blocks are used. */ - std::vector > indices_by_block; + std::vector > indices_by_block; /** * Constructor setting the @@@ -136,33 -133,29 +133,29 @@@ template void reinit(const DHCellIterator &c, const DHFaceIterator &f, - const unsigned int n); + const unsigned int face_no); /** - * Set the current subface - * and fill @p indices if the - * #cell changed. + * Set the current subface and fill @p indices if the #cell + * changed. */ template void reinit(const DHCellIterator &c, const DHFaceIterator &f, - const unsigned int n, - const unsigned int s); + const unsigned int face_no, + const unsigned int subface_no); /** - * Switch to a new face of the - * same cell. Does not change - * @p indices and does not reset - * data in LocalResults. + * Switch to a new face of the same cell. Does not change @p + * indices and does not reset data in LocalResults. */ template void set_face (const DHFaceIterator &f, - const unsigned int n); + const unsigned int face_no); + /** - * Switch to a new subface of the - * same cell. Does not change - * @p indices and does not reset - * data in LocalResults. + * Switch to a new subface of the same cell. Does not change @p + * indices and does not reset data in LocalResults. */ template void set_subface (const DHFaceIterator &f, @@@ -194,11 -183,8 +183,8 @@@ template void get_indices(const DHCellIterator &c); - /// Fill index vector with level indices - //void get_indices(const typename MGDoFHandler::cell_iterator& c); - /// Auxiliary vector - std::vector indices_org; + std::vector indices_org; /** * An auxiliary local diff --cc deal.II/include/deal.II/numerics/matrix_tools.h index 3418b0c618,38be9336e2..e0afde78de --- a/deal.II/include/deal.II/numerics/matrix_tools.h +++ b/deal.II/include/deal.II/numerics/matrix_tools.h @@@ -805,8 -805,8 +805,8 @@@ namespace MatrixTool */ template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - SparseMatrix &matrix, + SparseMatrix &matrix, Vector &solution, Vector &right_hand_side, const bool eliminate_columns = true); @@@ -867,10 -867,10 +867,10 @@@ * step-18. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - PETScWrappers::SparseMatrix &matrix, - PETScWrappers::Vector &solution, - PETScWrappers::Vector &right_hand_side, + PETScWrappers::SparseMatrix &matrix, + PETScWrappers::Vector &solution, + PETScWrappers::Vector &right_hand_side, const bool eliminate_columns = true); /** @@@ -878,10 -878,10 +878,10 @@@ * matrices. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - PETScWrappers::MPI::SparseMatrix &matrix, - PETScWrappers::MPI::Vector &solution, - PETScWrappers::MPI::Vector &right_hand_side, + PETScWrappers::MPI::SparseMatrix &matrix, + PETScWrappers::MPI::Vector &solution, + PETScWrappers::MPI::Vector &right_hand_side, const bool eliminate_columns = true); /** @@@ -910,10 -910,10 +910,10 @@@ * to this function is the same. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - PETScWrappers::MPI::SparseMatrix &matrix, + PETScWrappers::MPI::SparseMatrix &matrix, PETScWrappers::Vector &solution, - PETScWrappers::MPI::Vector &right_hand_side, + PETScWrappers::MPI::Vector &right_hand_side, const bool eliminate_columns = true); /** @@@ -968,8 -968,8 +968,8 @@@ * across an MPI system. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - TrilinosWrappers::SparseMatrix &matrix, + TrilinosWrappers::SparseMatrix &matrix, TrilinosWrappers::Vector &solution, TrilinosWrappers::Vector &right_hand_side, const bool eliminate_columns = true); @@@ -980,8 -980,8 +980,8 @@@ * working on block structures. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - TrilinosWrappers::BlockSparseMatrix &matrix, + TrilinosWrappers::BlockSparseMatrix &matrix, TrilinosWrappers::BlockVector &solution, TrilinosWrappers::BlockVector &right_hand_side, const bool eliminate_columns = true); @@@ -1023,8 -1023,8 +1023,8 @@@ * types. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - TrilinosWrappers::SparseMatrix &matrix, + TrilinosWrappers::SparseMatrix &matrix, TrilinosWrappers::MPI::Vector &solution, TrilinosWrappers::MPI::Vector &right_hand_side, const bool eliminate_columns = true); @@@ -1035,8 -1035,8 +1035,8 @@@ * on block structures. */ void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - TrilinosWrappers::BlockSparseMatrix &matrix, + TrilinosWrappers::BlockSparseMatrix &matrix, TrilinosWrappers::MPI::BlockVector &solution, TrilinosWrappers::MPI::BlockVector &right_hand_side, const bool eliminate_columns = true); diff --cc deal.II/source/dofs/dof_renumbering.cc index 618c6cbdfd,8295743bfa..92aedf95fe --- a/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/source/dofs/dof_renumbering.cc @@@ -719,8 -718,8 +719,8 @@@ namespace DoFRenumberin = (dynamic_cast*> (&start->get_dof_handler().get_tria()))) { - #ifdef DEAL_II_USE_P4EST + #ifdef DEAL_II_WITH_P4EST - std::vector local_dof_count(n_buckets); + std::vector local_dof_count(n_buckets); for (unsigned int c=0; c*> (&start->get_dof_handler().get_tria()))) { - #ifdef DEAL_II_USE_P4EST + #ifdef DEAL_II_WITH_P4EST - std::vector local_dof_count(n_buckets); + std::vector local_dof_count(n_buckets); for (unsigned int c=0; c void count_dofs_per_block (const DH &dof_handler, - std::vector &dofs_per_block, + std::vector &dofs_per_block, - const std::vector &target_block_) + const std::vector &target_block_) { std::vector target_block = target_block_; @@@ -5419,11 -5419,11 +5419,11 @@@ template void map_dofs_to_support_points(const hp::MappingCollection &mapping, - const DH &dof_handler, - std::vector > &support_points) + const DH &dof_handler, + std::vector > &support_points) { // get the data in the form of the map as above - std::map > x_support_points; + std::map > x_support_points; map_dofs_to_support_points(mapping, dof_handler, x_support_points); // now convert from the map to the linear vector. make sure every diff --cc deal.II/source/grid/grid_generator.cc index da5e36333f,9f80cc3422..809b330497 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@@ -181,8 -181,8 +181,8 @@@ void GridGenerator::hyper_cube (Triangu void GridGenerator::moebius ( - Triangulation<3> &tria, + Triangulation<3> &tria, - const unsigned int n_cells, + const size_type n_cells, const unsigned int n_rotations, const double R, const double r) diff --cc deal.II/source/lac/constraint_matrix.inst.in index 0000000000,400f44cd4f..72131b5396 mode 000000,100644..100644 --- a/deal.II/source/lac/constraint_matrix.inst.in +++ b/deal.II/source/lac/constraint_matrix.inst.in @@@ -1,0 -1,59 +1,59 @@@ + for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES) + { + template void ConstraintMatrix::condense >(const T &, T &) const; + template void ConstraintMatrix::condense >(T &vec) const; + template void ConstraintMatrix::distribute_local_to_global > ( - const Vector&, const std::vector &, T &, const FullMatrix&) const; ++ const Vector&, const std::vector &, T &, const FullMatrix&) const; + template void ConstraintMatrix::distribute >(const T &, T &) const; + template void ConstraintMatrix::distribute >(T &) const; + template void ConstraintMatrix::set_zero >(T &) const; + } + + + for (S: REAL_SCALARS; T : DEAL_II_VEC_TEMPLATES) + { + template void ConstraintMatrix::condense >(const parallel::distributed::T &, parallel::distributed::T &) const; + template void ConstraintMatrix::condense >(parallel::distributed::T &vec) const; + template void ConstraintMatrix::distribute_local_to_global > ( - const Vector&, const std::vector &, parallel::distributed::T &, const FullMatrix&) const; ++ const Vector&, const std::vector &, parallel::distributed::T &, const FullMatrix&) const; + template void ConstraintMatrix::distribute >(const parallel::distributed::T &, parallel::distributed::T &) const; + template void ConstraintMatrix::distribute >(parallel::distributed::T &) const; + template void ConstraintMatrix::set_zero >(parallel::distributed::T &) const; + } + + + for (V: EXTERNAL_SEQUENTIAL_VECTORS) + { + template void ConstraintMatrix::condense(const V&, V&) const; + template void ConstraintMatrix::condense(V&vec) const; + template void ConstraintMatrix::distribute_local_to_global ( - const Vector&, const std::vector &, V&, const FullMatrix&) const; ++ const Vector&, const std::vector &, V&, const FullMatrix&) const; + template void ConstraintMatrix::distribute(const V&, V&) const; + template void ConstraintMatrix::distribute(V&) const; + template void ConstraintMatrix::set_zero(V&) const; + } + + + for (V: EXTERNAL_PARALLEL_VECTORS) + { + template void ConstraintMatrix::set_zero(V&) const; + } + + + for (S : REAL_SCALARS) + { + template void ConstraintMatrix::condense(const SparseMatrix&, SparseMatrix &) const; + template void ConstraintMatrix::condense(SparseMatrix&) const; + template void ConstraintMatrix::condense(BlockSparseMatrix&) const; + } + + + for (S1 : REAL_SCALARS; S2 : REAL_SCALARS) + { + template void ConstraintMatrix::condense >(SparseMatrix&, Vector&) const; + template void ConstraintMatrix::condense >(BlockSparseMatrix&, BlockVector&) const; + template void ConstraintMatrix::condense >( + const SparseMatrix&, const Vector&, SparseMatrix &, Vector&) const; + template void ConstraintMatrix::condense >( + const SparseMatrix&, const BlockVector&, SparseMatrix &, BlockVector&) const; + } diff --cc deal.II/source/lac/petsc_parallel_vector.cc index 5f8bc77c80,cf3bd0c4e7..cdb723e811 --- a/deal.II/source/lac/petsc_parallel_vector.cc +++ b/deal.II/source/lac/petsc_parallel_vector.cc @@@ -52,9 -52,9 +52,9 @@@ namespace PETScWrapper - Vector::Vector (const MPI_Comm &communicator, + Vector::Vector (const MPI_Comm &communicator, - const VectorBase &v, + const VectorBase &v, - const unsigned int local_size) + const size_type local_size) : communicator (communicator) { diff --cc deal.II/source/lac/petsc_vector_base.cc index e0de106e1b,439a6bfcab..5cd88bb7ea --- a/deal.II/source/lac/petsc_vector_base.cc +++ b/deal.II/source/lac/petsc_vector_base.cc @@@ -316,8 -316,8 +316,8 @@@ namespace PETScWrapper void - VectorBase::set (const std::vector &indices, + VectorBase::set (const std::vector &indices, - const std::vector &values) + const std::vector &values) { Assert (indices.size() == values.size(), ExcMessage ("Function called with arguments of different sizes")); @@@ -327,8 -327,8 +327,8 @@@ void - VectorBase::add (const std::vector &indices, + VectorBase::add (const std::vector &indices, - const std::vector &values) + const std::vector &values) { Assert (indices.size() == values.size(), ExcMessage ("Function called with arguments of different sizes")); diff --cc deal.II/source/lac/sparsity_tools.cc index bb82de0bde,218f348d8e..d4bb86da9c --- a/deal.II/source/lac/sparsity_tools.cc +++ b/deal.II/source/lac/sparsity_tools.cc @@@ -374,10 -374,10 +374,10 @@@ namespace SparsityTool ExcInternalError()); } - #ifdef DEAL_II_COMPILER_SUPPORTS_MPI + #ifdef DEAL_II_WITH_MPI template void distribute_sparsity_pattern(CSP_t &csp, - const std::vector &rows_per_cpu, + const std::vector &rows_per_cpu, const MPI_Comm &mpi_comm, const IndexSet &myrange) { diff --cc deal.II/source/lac/trilinos_sparse_matrix.cc index 41631c5486,f01ada3dcc..25e6f8665f --- a/deal.II/source/lac/trilinos_sparse_matrix.cc +++ b/deal.II/source/lac/trilinos_sparse_matrix.cc @@@ -111,8 -111,8 +111,8 @@@ namespace TrilinosWrapper - SparseMatrix::SparseMatrix (const Epetra_Map &input_map, + SparseMatrix::SparseMatrix (const Epetra_Map &input_map, - const unsigned int n_max_entries_per_row) + const size_type n_max_entries_per_row) : column_space_map (new Epetra_Map (input_map)), matrix (new Epetra_FECrsMatrix(Copy, *column_space_map, @@@ -137,9 -137,9 +137,9 @@@ - SparseMatrix::SparseMatrix (const Epetra_Map &input_row_map, - const Epetra_Map &input_col_map, + SparseMatrix::SparseMatrix (const Epetra_Map &input_row_map, + const Epetra_Map &input_col_map, - const unsigned int n_max_entries_per_row) + const size_type n_max_entries_per_row) : column_space_map (new Epetra_Map (input_col_map)), matrix (new Epetra_FECrsMatrix(Copy, input_row_map, diff --cc deal.II/source/lac/trilinos_sparsity_pattern.cc index cea1e9f5cd,f1d858b8d2..08dcfc7df4 --- a/deal.II/source/lac/trilinos_sparsity_pattern.cc +++ b/deal.II/source/lac/trilinos_sparsity_pattern.cc @@@ -92,8 -92,8 +92,8 @@@ namespace TrilinosWrapper } - SparsityPattern::SparsityPattern (const Epetra_Map &input_map, + SparsityPattern::SparsityPattern (const Epetra_Map &input_map, - const unsigned int n_entries_per_row) + const size_type n_entries_per_row) { reinit (input_map, input_map, n_entries_per_row); } @@@ -108,9 -108,9 +108,9 @@@ - SparsityPattern::SparsityPattern (const Epetra_Map &input_row_map, - const Epetra_Map &input_col_map, + SparsityPattern::SparsityPattern (const Epetra_Map &input_row_map, + const Epetra_Map &input_col_map, - const unsigned int n_entries_per_row) + const size_type n_entries_per_row) { reinit (input_row_map, input_col_map, n_entries_per_row); } diff --cc deal.II/source/lac/trilinos_vector.cc index ac53f93a92,badd19f289..9e6f68e532 --- a/deal.II/source/lac/trilinos_vector.cc +++ b/deal.II/source/lac/trilinos_vector.cc @@@ -398,9 -397,9 +398,9 @@@ namespace TrilinosWrapper const MPI_Comm &communicator) { last_action = Zero; - Epetra_LocalMap map (static_cast(partitioning.size()), + Epetra_LocalMap map (static_cast(partitioning.size()), 0, - #ifdef DEAL_II_COMPILER_SUPPORTS_MPI + #ifdef DEAL_II_WITH_MPI Epetra_MpiComm(communicator)); #else Epetra_SerialComm()); @@@ -488,11 -487,11 +488,11 @@@ 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_COMPILER_SUPPORTS_MPI + #ifdef DEAL_II_WITH_MPI Epetra_MpiComm(communicator)); #else Epetra_SerialComm()); diff --cc deal.II/source/numerics/matrix_tools.cc index e5dca7807a,776031f0f5..14a3e2cfd4 --- a/deal.II/source/numerics/matrix_tools.cc +++ b/deal.II/source/numerics/matrix_tools.cc @@@ -1122,13 -1122,13 +1122,13 @@@ namespace MatrixCreato template void - create_boundary_mass_matrix (const Mapping &mapping, + create_boundary_mass_matrix (const Mapping &mapping, const DoFHandler &dof, const Quadrature &q, - SparseMatrix &matrix, - const typename FunctionMap::type &boundary_functions, + SparseMatrix &matrix, + const typename FunctionMap::type &boundary_functions, Vector &rhs_vector, - std::vector &dof_to_boundary_mapping, + std::vector &dof_to_boundary_mapping, const Function *const coefficient, std::vector component_mapping) { @@@ -1941,8 -1941,8 +1941,8 @@@ namespace MatrixTool //TODO:[WB] I don't think that the optimized storage of diagonals is needed (GK) template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - SparseMatrix &matrix, + SparseMatrix &matrix, Vector &solution, Vector &right_hand_side, const bool eliminate_columns) @@@ -2095,8 -2095,8 +2095,8 @@@ template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - BlockSparseMatrix &matrix, + BlockSparseMatrix &matrix, BlockVector &solution, BlockVector &right_hand_side, const bool eliminate_columns) @@@ -2927,30 -2927,30 +2927,30 @@@ namespace MatrixTool { template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - SparseMatrix &matrix, + SparseMatrix &matrix, Vector &solution, Vector &right_hand_side, const bool eliminate_columns); template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - SparseMatrix &matrix, + SparseMatrix &matrix, Vector &solution, Vector &right_hand_side, const bool eliminate_columns); template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - BlockSparseMatrix &matrix, + BlockSparseMatrix &matrix, BlockVector &solution, BlockVector &right_hand_side, const bool eliminate_columns); template void - apply_boundary_values (const std::map &boundary_values, + apply_boundary_values (const std::map &boundary_values, - BlockSparseMatrix &matrix, + BlockSparseMatrix &matrix, BlockVector &solution, BlockVector &right_hand_side, const bool eliminate_columns);