From: heister Date: Thu, 13 Dec 2012 23:30:31 +0000 (+0000) Subject: merge from mainline X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3395ba9aa551d34dbb4302e6e38b27a5fa8f646;p=dealii-svn.git merge from mainline git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@27817 0785d39b-7218-0410-832d-ea1e28bc413d --- f3395ba9aa551d34dbb4302e6e38b27a5fa8f646 diff --cc deal.II/examples/step-6/step-6.cc index 3708b7c482,068fe9a410..11e9f79ee4 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@@ -444,16 -430,10 +444,16 @@@ void Step6::assemble_system ( // @p cell_rhs into the global objects. cell->get_dof_indices (local_dof_indices); constraints.distribute_local_to_global(cell_matrix, - cell_rhs, - local_dof_indices, - system_matrix, system_rhs); + cell_rhs, + local_dof_indices, + system_matrix, system_rhs); } + +#ifdef USE_PETSC_LA + system_matrix.compress(); + system_rhs.compress(); +#endif + // Now we are done assembling the linear system. The constrained nodes are // still in the linear system (there is a one on the diagonal of the matrix // and all other entries for this line are set to zero) but the computed diff --cc deal.II/include/deal.II/lac/sparse_matrix.h index 2d77baf4b0,9092530630..add3c01108 --- a/deal.II/include/deal.II/lac/sparse_matrix.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.h @@@ -610,24 -484,17 +484,17 @@@ public explicit SparseMatrix (const SparsityPattern &sparsity); /** - * Copy constructor: initialize - * the matrix with the identity - * matrix. This constructor will - * throw an exception if the - * sizes of the sparsity pattern - * and the identity matrix do not - * coincide, or if the sparsity - * pattern does not provide for - * nonzero entries on the entire - * diagonal. + * Copy constructor: initialize the matrix with the identity matrix. This + * constructor will throw an exception if the sizes of the sparsity pattern + * and the identity matrix do not coincide, or if the sparsity pattern does + * not provide for nonzero entries on the entire diagonal. */ SparseMatrix (const SparsityPattern &sparsity, - const IdentityMatrix &id); + const IdentityMatrix &id); /** - * Destructor. Free all memory, but do not - * release the memory of the sparsity - * structure. + * Destructor. Free all memory, but do not release the memory of the + * sparsity structure. */ virtual ~SparseMatrix (); @@@ -653,34 -510,21 +510,21 @@@ SparseMatrix &operator = (const SparseMatrix &); /** - * Copy operator: initialize - * the matrix with the identity - * matrix. This operator will - * throw an exception if the - * sizes of the sparsity pattern - * and the identity matrix do not - * coincide, or if the sparsity - * pattern does not provide for - * nonzero entries on the entire - * diagonal. + * Copy operator: initialize the matrix with the identity matrix. This + * operator will throw an exception if the sizes of the sparsity pattern and + * the identity matrix do not coincide, or if the sparsity pattern does not + * provide for nonzero entries on the entire diagonal. */ SparseMatrix & - operator= (const IdentityMatrix &id); + operator= (const IdentityMatrix &id); /** - * This operator assigns a scalar to - * a matrix. Since this does usually - * not make much sense (should we set - * all matrix entries to this value? - * Only the nonzero entries of the - * sparsity pattern?), this operation - * is only allowed if the actual - * value to be assigned is zero. This - * operator only exists to allow for - * the obvious notation - * matrix=0, which sets all - * elements of the matrix to zero, - * but keep the sparsity pattern + * This operator assigns a scalar to a matrix. Since this does usually not + * make much sense (should we set all matrix entries to this value? Only + * the nonzero entries of the sparsity pattern?), this operation is only + * allowed if the actual value to be assigned is zero. This operator only + * exists to allow for the obvious notation matrix=0, which sets + * all elements of the matrix to zero, but keep the sparsity pattern * previously used. */ SparseMatrix &operator = (const double d); diff --cc deal.II/include/deal.II/lac/sparsity_pattern.h index 0eb8828807,fe87da3f19..5c13c278e0 --- a/deal.II/include/deal.II/lac/sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/sparsity_pattern.h @@@ -496,46 -385,26 +385,26 @@@ public /** * Make a copy with extra off-diagonals. * - * This constructs objects intended for - * the application of the ILU(n)-method - * or other incomplete decompositions. - * Therefore, additional to the original - * entry structure, space for - * extra_off_diagonals - * side-diagonals is provided on both - * sides of the main diagonal. - * - * max_per_row is the - * maximum number of nonzero - * elements per row which this - * structure is to hold. It is - * assumed that this number is - * sufficiently large to - * accommodate both the elements - * in original as well - * as the new off-diagonal - * elements created by this - * constructor. You will usually - * want to give the same number - * as you gave for - * original plus the - * number of side diagonals times - * two. You may however give a - * larger value if you wish to - * add further nonzero entries - * for the decomposition based on - * other criteria than their - * being on side-diagonals. - * - * This function requires that - * original refers to a - * quadratic matrix structure. - * It must be compressed. The - * matrix structure is not - * compressed after this function - * finishes. + * This constructs objects intended for the application of the ILU(n)-method + * or other incomplete decompositions. Therefore, additional to the + * original entry structure, space for extra_off_diagonals + * side-diagonals is provided on both sides of the main diagonal. + * + * max_per_row is the maximum number of nonzero elements per row + * which this structure is to hold. It is assumed that this number is + * sufficiently large to accommodate both the elements in original + * as well as the new off-diagonal elements created by this constructor. You + * will usually want to give the same number as you gave for + * original plus the number of side diagonals times two. You may + * however give a larger value if you wish to add further nonzero entries + * for the decomposition based on other criteria than their being on + * side-diagonals. + * + * This function requires that original refers to a quadratic + * matrix structure. It must be compressed. The matrix structure is not + * compressed after this function finishes. */ - SparsityPattern (const SparsityPattern &original, + SparsityPattern (const SparsityPattern &original, const unsigned int max_per_row, const unsigned int extra_off_diagonals); diff --cc deal.II/source/dofs/dof_tools.cc index 7310c51a8b,619d478814..bf8ecfb8ec --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@@ -1947,28 -1781,26 +1781,26 @@@ namespace DoFTool void - make_hp_hanging_node_constraints (const dealii::hp::DoFHandler<1> & /*dof_handler*/, - ConstraintMatrix & /*constraints*/) + make_hp_hanging_node_constraints (const dealii::hp::DoFHandler<1> &/*dof_handler*/, + ConstraintMatrix &/*constraints*/) { - // we may have to compute - // constraints for - // vertices. gotta think about + // we may have to compute constraints for vertices. gotta think about // that a bit more - //TODO[WB]: think about what to do here... + + //TODO[WB]: think about what to do here... } void - make_oldstyle_hanging_node_constraints (const dealii::hp::DoFHandler<1> & /*dof_handler*/, - ConstraintMatrix & /*constraints*/, + make_oldstyle_hanging_node_constraints (const dealii::hp::DoFHandler<1> &/*dof_handler*/, + ConstraintMatrix &/*constraints*/, dealii::internal::int2type<1>) { - // we may have to compute - // constraints for - // vertices. gotta think about + // we may have to compute constraints for vertices. gotta think about // that a bit more - //TODO[WB]: think about what to do here... + + //TODO[WB]: think about what to do here... }