From: David Wells Date: Thu, 23 Aug 2018 17:12:17 +0000 (-0400) Subject: Remove all references to 'constraint matrix'. X-Git-Tag: v9.1.0-rc1~771^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7107%2Fhead;p=dealii.git Remove all references to 'constraint matrix'. --- diff --git a/examples/doxygen/block_dynamic_sparsity_pattern.cc b/examples/doxygen/block_dynamic_sparsity_pattern.cc index 7f931f53c7..9b9b76653a 100644 --- a/examples/doxygen/block_dynamic_sparsity_pattern.cc +++ b/examples/doxygen/block_dynamic_sparsity_pattern.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2006 - 2015 by the deal.II authors +// Copyright (C) 2006 - 2018 by the deal.II authors // // This file is part of the deal.II library. // @@ -18,7 +18,7 @@ // example #include -#include +#include #include #include #include @@ -49,7 +49,7 @@ int main() DoFRenumbering::Cuthill_McKee(dof); DoFRenumbering::component_wise(dof); - ConstraintMatrix constraints; + AffineConstraints constraints; DoFTools::make_hanging_node_constraints(dof, constraints); constraints.close(); diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index 6a49ce7a17..5e1927c0e6 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -466,11 +466,11 @@ namespace Step22 // Dirichlet conditions are to be set for the velocity only. To this end, // we use a ComponentMask that only selects the velocity components. The // component mask is obtained from the finite element by specifying the - // particular components we want. Since we use adaptively refined grids - // the constraint matrix needs to be first filled with hanging node + // particular components we want. Since we use adaptively refined grids, + // the affine constraints object needs to be first filled with hanging node // constraints generated from the DoF handler. Note the order of the two // functions — we first compute the hanging node constraints, and - // then insert the boundary values into the constraint matrix. This makes + // then insert the boundary values into the constraints object. This makes // sure that we respect H1 conformity on boundaries with // hanging nodes (in three space dimensions), where the hanging node needs // to dominate the Dirichlet boundary values. diff --git a/examples/step-45/doc/intro.dox b/examples/step-45/doc/intro.dox index 8ac06e13fd..722c6f0c88 100644 --- a/examples/step-45/doc/intro.dox +++ b/examples/step-45/doc/intro.dox @@ -129,7 +129,7 @@ constrained: using namespace DoFTools; make_periodicity_constraints(face_1, face_2, - constraint_matrix, + affine_constraints, component_mask = ; face_orientation = , face_flip = , @@ -140,7 +140,7 @@ Here, we need to specify the orientation of the two faces using @p face_orientation, @p face_flip and @p face_orientation. For a closer description have a look at the documentation of DoFTools::make_periodicity_constraints. The remaining parameters are the same as for the high level interface apart -from the self-explaining @p component_mask and @p constraint_matrix. +from the self-explaining @p component_mask and @p affine_constraints. diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 908244c760..379cdc5f18 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -764,11 +764,11 @@ namespace DoFTools /** * This function does essentially the same as the previous - * make_flux_sparsity_pattern() function but allows the application of - * a constraint matrix. This is useful in the case where some components - * of a finite element are continuous and some discontinuous, allowing - * constraints to be imposed on the continuous part while also building - * the flux terms needed for the discontinuous part. + * make_flux_sparsity_pattern() function but allows the application of an + * AffineConstraints object. This is useful in the case where some + * components of a finite element are continuous and some discontinuous, + * allowing constraints to be imposed on the continuous part while also + * building the flux terms needed for the discontinuous part. */ template Interpolation matrices in two dimensions * - * In addition to the fields discussed above for 1D, a constraint matrix is - * needed to describe hanging node constraints if the finite element has + * In addition to the fields discussed above for 1D, a constraint matrix + * is needed to describe hanging node constraints if the finite element has * degrees of freedom located on edges or vertices. These constraints are * represented by an $m\times n$-matrix #interface_constraints, where m * is the number of degrees of freedom on the refined side without the corner @@ -415,9 +415,9 @@ class FESystem; * weights. This is sometimes tricky since the nodes on the edge may have * different local numbers. * - * For the constraint matrix this means the following: if a degree of freedom - * on one edge of a face is constrained by some other nodes on the same edge - * with some weights, then the weights have to be exactly the same as those + * For the constraint matrix this means the following: if a degree of + * freedom on one edge of a face is constrained by some other nodes on the same + * edge with some weights, then the weights have to be exactly the same as those * for constrained nodes on the three other edges with respect to the * corresponding nodes on these edges. If this isn't the case, you will get * into trouble with the AffineConstraints class that is the primary consumer diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index f4ee98406d..798b6f2cc3 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -281,9 +281,9 @@ public: * numbering of all (global) DoFs that are elements in the filter. * * If, for example, the filter represents the range [10,20), and - * the constraint matrix @p constraints_in includes the global indices + * the constraints object @p constraints_in includes the global indices * {7,13,14}, the indices {3,4} are added to the calling - * constraint matrix (since 13 and 14 are elements in the filter and element + * constraints object (since 13 and 14 are elements in the filter and element * 13 is the fourth element in the index, and 14 is the fifth). * * This function provides an easy way to create a AffineConstraints for @@ -631,9 +631,8 @@ public: * system. * * Since this function adds new nonzero entries to the sparsity pattern, the - * given sparsity pattern must not be compressed. The constraint matrix - * (i.e., the current object) must be closed. The sparsity pattern is - * compressed at the end of the function. + * given sparsity pattern must not be compressed. The current object must be + * closed. The sparsity pattern is compressed at the end of the function. */ void condense(SparsityPattern &sparsity) const; @@ -706,7 +705,7 @@ public: * condensed and compressed. This function is the appropriate choice for * applying inhomogeneous constraints. * - * The constraint matrix object must be closed to call this function. + * The current object object must be closed to call this function. * * See the general documentation of this class for more detailed * information. @@ -1093,8 +1092,8 @@ public: * of freedom. * * This function is not typically called from user code, but is used in the - * DoFTools::make_sparsity_pattern() function when passed a constraint - * matrix object. + * DoFTools::make_sparsity_pattern() function when passed an + * AffineConstraints object. * * @note This function in itself is thread-safe, i.e., it works properly * also when several threads call it simultaneously. However, the function @@ -1182,7 +1181,7 @@ public: */ /** - * This class represents one line of a constraint matrix. + * This class represents one constraint in an AffineConstraints object. */ struct ConstraintLine { @@ -1374,7 +1373,7 @@ public: */ DeclException1(ExcRowNotStoredHere, size_type, - << "The index set given to this constraint matrix indicates " + << "The index set given to this constraints object indicates " << "constraints for degree of freedom " << arg1 << " should not be stored by this object, but a constraint " << "is being added."); @@ -1387,7 +1386,7 @@ public: DeclException2(ExcColumnNotStoredHere, size_type, size_type, - << "The index set given to this constraint matrix indicates " + << "The index set given to this constraints object indicates " << "constraints using degree of freedom " << arg2 << " should not be stored by this object, but a constraint " << "for degree of freedom " << arg1 << " uses it."); diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 9807792007..19e98f70ef 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -281,7 +281,8 @@ AffineConstraints::add_selected_constraints( return; Assert(filter.size() > constraints.lines.back().index, - ExcMessage("Filter needs to be larger than constraint matrix size.")); + ExcMessage( + "The filter must be larger than the given constraints object.")); for (const ConstraintLine &line : constraints.lines) if (filter.is_element(line.index)) { @@ -984,7 +985,7 @@ AffineConstraints::condense(SparsityPattern &sparsity) const // store for each index whether it must be distributed or not. If entry // is numbers::invalid_unsigned_int, no distribution is necessary. - // otherwise, the number states which line in the constraint matrix + // otherwise, the number states which line in the AffineConstraints object // handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); @@ -1079,7 +1080,7 @@ AffineConstraints::condense(BlockSparsityPattern &sparsity) const // store for each index whether it must be distributed or not. If entry // is numbers::invalid_unsigned_int, no distribution is necessary. - // otherwise, the number states which line in the constraint matrix + // otherwise, the number states which line in the AffineConstraints object // handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); @@ -1189,7 +1190,7 @@ AffineConstraints::condense(DynamicSparsityPattern &sparsity) const // store for each index whether it must be distributed or not. If entry // is numbers::invalid_unsigned_int, no distribution is necessary. - // otherwise, the number states which line in the constraint matrix + // otherwise, the number states which line in the constraints object // handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); @@ -1289,7 +1290,7 @@ AffineConstraints::condense(BlockDynamicSparsityPattern &sparsity) const // store for each index whether it must be distributed or not. If entry // is numbers::invalid_unsigned_int, no distribution is necessary. - // otherwise, the number states which line in the constraint matrix + // otherwise, the number states which line in the constraints object // handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); @@ -1490,7 +1491,7 @@ AffineConstraints::condense(SparseMatrix &uncondensed, // store for each index whether it must be distributed or not. If entry // is invalid_size_type, no distribution is necessary. otherwise, the - // number states which line in the constraint matrix handles this index + // number states which line in the constraints object handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); @@ -1676,7 +1677,7 @@ AffineConstraints::condense(BlockSparseMatrix &uncondensed, // store for each index whether it must be distributed or not. If entry // is numbers::invalid_size_type, no distribution is necessary. - // otherwise, the number states which line in the constraint matrix + // otherwise, the number states which line in the constraints object // handles this index std::vector distribute(sparsity.n_rows(), numbers::invalid_size_type); diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 72fc4121d3..3942a756fa 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -153,18 +153,18 @@ namespace MatrixFreeOperators * then added to the initial guess. This setup can be realized by using a * vector of two pointers pointing to the same DoFHandler object and a * vector of two pointers to the two AffineConstraints objects. If the first - * constraint matrix is the one including the zero Dirichlet constraints, - * one would give a std::vector(1, 0) to the initialize() - * function, i.e., a vector of length 1 that selects exactly the first - * constraint matrix with index 0. + * AffineConstraints object is the one including the zero Dirichlet + * constraints, one would give a std::vector(1, 0) to the + * initialize() function, i.e., a vector of length 1 that selects exactly the + * first AffineConstraints object with index 0. * * For systems of PDEs where the different blocks of MatrixFree are * associated with different physical components of the equations, adding * another block with a different AffineConstraints argument solely for the * purpose of boundary conditions might lead to cumbersome index * handling. Instead, one could set up a second MatrixFree instance with the - * different constraint matrix but the same interpretation of blocks, and - * use that for interpolating inhomogeneous boundary conditions (see also + * different AffineConstraints object but the same interpretation of blocks, + * and use that for interpolating inhomogeneous boundary conditions (see also * the discussion in the results section of the step-37 tutorial program): * * @code diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index b5b2956320..40f2cd7c0d 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -55,8 +55,8 @@ public: * * Furthermore, this call sets up an AffineConstraints object on each * level that contains possible periodicity constraints in case those - * have been added to the underlying triangulation. The constraint matrix - * can be queried by get_level_constraint_matrix(level). Note that the + * have been added to the underlying triangulation. The AffineConstraints + * object can be queried by get_level_constraints(level). Note that the * current implementation of periodicity constraints in this class does * not support rotation matrices in the periodicity definition, i.e., the * respective argument in the GridTools::collect_periodic_faces() may not @@ -157,10 +157,20 @@ public: have_boundary_indices() const; /** - * Return the level constraint matrix for a given level, containing + * Return the AffineConstraints object for a given level, containing * periodicity constraints (if enabled on the triangulation). */ const AffineConstraints & + get_level_constraints(const unsigned int level) const; + + /** + * Return the AffineConstraints object for a given level, containing + * periodicity constraints (if enabled on the triangulation). + * + * @deprecated Use get_level_constraints instead, which has a more descriptive name. + */ + DEAL_II_DEPRECATED + const AffineConstraints & get_level_constraint_matrix(const unsigned int level) const; private: @@ -240,11 +250,11 @@ MGConstrainedDoFs::initialize(const DoFHandler &dof) ->face(cell->periodic_neighbor_face_no(f)) ->get_mg_dof_indices(l, dofs_1, 0); cell->face(f)->get_mg_dof_indices(l, dofs_2, 0); - // Store periodicity information in the level constraint - // matrix Skip DoFs for which we've previously entered - // periodicity constraints already; this can happen, for - // example, for a vertex dof at a periodic boundary that we - // visit from more than one cell + // Store periodicity information in the level + // AffineConstraints object. Skip DoFs for which we've + // previously entered periodicity constraints already; this + // can happen, for example, for a vertex dof at a periodic + // boundary that we visit from more than one cell for (unsigned int i = 0; i < dofs_per_face; ++i) if (level_constraints[l].can_store_line(dofs_2[i]) && level_constraints[l].can_store_line(dofs_1[i]) && @@ -383,7 +393,7 @@ MGConstrainedDoFs::have_boundary_indices() const inline const AffineConstraints & -MGConstrainedDoFs::get_level_constraint_matrix(const unsigned int level) const +MGConstrainedDoFs::get_level_constraints(const unsigned int level) const { AssertIndexRange(level, level_constraints.size()); return level_constraints[level]; @@ -391,6 +401,14 @@ MGConstrainedDoFs::get_level_constraint_matrix(const unsigned int level) const +inline const AffineConstraints & +MGConstrainedDoFs::get_level_constraint_matrix(const unsigned int level) const +{ + return get_level_constraints(level); +} + + + DEAL_II_NAMESPACE_CLOSE #endif diff --git a/include/deal.II/numerics/matrix_tools.h b/include/deal.II/numerics/matrix_tools.h index 8aae306fe0..7bd27d40f9 100644 --- a/include/deal.II/numerics/matrix_tools.h +++ b/include/deal.II/numerics/matrix_tools.h @@ -133,15 +133,15 @@ namespace TrilinosWrappers * distribute_local_to_global into the global matrix and vector. This way, * adding several matrices from different sources is more complicated and * you should make sure that you do not mix different ways of applying - * constraints. Particular caution is necessary when the given constraint - * matrix contains inhomogeneous constraints: In that case, the matrix - * assembled this way must be the only matrix (or you need to assemble the - * same right hand side for every matrix you generate and add - * together). + * constraints. Particular caution is necessary when the given + * AffineConstraints object contains inhomogeneous constraints: In that case, + * the matrix assembled this way must be the only matrix (or you need to + * assemble the same right hand side for every matrix you + * generate and add together). * * If you want to use boundary conditions with the matrices generated by the * functions of this namespace in addition to the ones in a possible - * constraint matrix, you have to use a function like + * AffineConstraints object, you have to use a function like * apply_boundary_values with the matrix, solution, and right hand * side. * diff --git a/include/deal.II/numerics/solution_transfer.h b/include/deal.II/numerics/solution_transfer.h index 947fc1b576..259295cd51 100644 --- a/include/deal.II/numerics/solution_transfer.h +++ b/include/deal.II/numerics/solution_transfer.h @@ -278,7 +278,7 @@ DEAL_II_NAMESPACE_OPEN * Whether this is a problem you need to worry about or not depends on your * application. The situation is easily corrected, of course, by applying * AffineConstraints::distribute() to your solution vector after transfer, - * using a constraint matrix object computed on the new DoFHandler object (you + * using a constraints object computed on the new DoFHandler object (you * probably need to create this object anyway if you have hanging nodes). This * is also what is done, for example, in step-15. * diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 8980930b52..2c6840c1cf 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -1054,7 +1054,7 @@ namespace VectorTools SparseMatrix mass_matrix(sparsity); Vector tmp(mass_matrix.n()); - // If the constraint matrix does not conflict with the given boundary + // If the constraints object does not conflict with the given boundary // values (i.e., it either does not contain boundary values or it contains // the same as boundary_values), we can let it call // distribute_local_to_global straight away, otherwise we need to first @@ -4006,7 +4006,7 @@ namespace VectorTools /** * Add the constraint $(\vec u-\vec u_\Gamma) \| \vec t$ to the list of * constraints. In 2d, this is a single constraint, in 3d these are two - * constraints + * constraints. * * Here, $\vec u$ is represented by the set of given DoF indices, and * $\vec t$ by the vector specified as the second argument. @@ -4924,12 +4924,9 @@ namespace VectorTools cell->face(face)->get_dof_indices( face_dof_indices, cell->active_fe_index()); - // Add the computed - // constraints to the - // constraint matrix, - // if the degree of - // freedom is not - // already constrained. + // Add the computed constraints to the constraints + // object, if the degree of freedom is not already + // constrained. for (unsigned int dof = 0; dof < dofs_per_face; ++dof) if (dofs_processed[dof] && constraints.can_store_line(face_dof_indices[dof]) && @@ -6133,9 +6130,9 @@ namespace VectorTools cell->face(face)->get_dof_indices( face_dof_indices, cell->active_fe_index()); - // Add the computed constraints to the constraint - // matrix, assuming the degree of freedom is not - // already constrained. + // Add the computed constraints to the + // AffineConstraints object, assuming the degree + // of freedom is not already constrained. for (unsigned int dof = 0; dof < dofs_per_face; ++dof) { @@ -7312,7 +7309,7 @@ namespace VectorTools } // so all components of this vector dof are constrained. enter - // this into the constraint matrix + // this into the AffineConstraints object // // ignore dofs already constrained const internal::VectorDoFTuple &dof_indices = diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 8bec7b6007..f00260acca 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -469,14 +469,14 @@ namespace DoFTools /** - * Copy constraints into a constraint matrix object. + * Copy constraints into an AffineConstraints object. * * This function removes zero constraints and those, which constrain a DoF * which was already eliminated in one of the previous steps of the hp * hanging node procedure. * - * It also suppresses very small entries in the constraint matrix to avoid - * making the sparsity pattern fuller than necessary. + * It also suppresses very small entries in the AffineConstraints object + * to avoid making the sparsity pattern fuller than necessary. */ template void @@ -752,7 +752,7 @@ namespace DoFTools Assert(dofs_on_children.size() <= n_dofs_on_children, ExcInternalError()); - // for each row in the constraint matrix for this line: + // for each row in the AffineConstraints object for this line: for (unsigned int row = 0; row != dofs_on_children.size(); ++row) { @@ -990,7 +990,7 @@ namespace DoFTools Assert(dofs_on_children.size() <= n_dofs_on_children, ExcInternalError()); - // for each row in the constraint matrix for this line: + // for each row in the AffineConstraints object for this line: for (unsigned int row = 0; row != dofs_on_children.size(); ++row) { @@ -1169,7 +1169,7 @@ namespace DoFTools cell->face(face)->get_dof_indices( master_dofs, cell->active_fe_index()); - // Now create constraint matrix for the subfaces and + // Now create constraints for the subfaces and // assemble it. ignore all interfaces with artificial // cells because we can only get to such interfaces if // the current cell is a ghost cell @@ -1245,7 +1245,8 @@ namespace DoFTools subface_interpolation_matrices [cell->active_fe_index()][subface_fe_index][c]); - // Add constraints to global constraint matrix. + // Add constraints to global AffineConstraints + // object. filter_constraints(master_dofs, slave_dofs, *(subface_interpolation_matrices @@ -1802,7 +1803,7 @@ namespace DoFTools const FaceIterator & face_1, const typename identity::type &face_2, const FullMatrix & transformation, - AffineConstraints & constraint_matrix, + AffineConstraints & affine_constraints, const ComponentMask & component_mask, const bool face_orientation, const bool face_flip, @@ -1841,7 +1842,7 @@ namespace DoFTools set_periodicity_constraints(face_1, face_2->child(c), child_transformation, - constraint_matrix, + affine_constraints, component_mask, face_orientation, face_flip, @@ -2026,7 +2027,7 @@ namespace DoFTools if (dofs_2[i] == dofs_1[j]) if (!(is_identity_constrained && target == i)) { - constraint_matrix.add_line(dofs_2[i]); + affine_constraints.add_line(dofs_2[i]); constraint_set = true; } } @@ -2049,7 +2050,7 @@ namespace DoFTools face_flip, face_rotation)]; - if (constraint_matrix.is_constrained(dofs_2[i])) + if (affine_constraints.is_constrained(dofs_2[i])) { // if the two aren't already identity constrained // (whichever way around) or already identical (in @@ -2059,16 +2060,17 @@ namespace DoFTools bool enter_constraint = false; // see if this would add an identity constraint // cycle - if (!constraint_matrix.is_constrained(dofs_1[j])) + if (!affine_constraints.is_constrained(dofs_1[j])) { types::global_dof_index new_dof = dofs_2[i]; while (new_dof != dofs_1[j]) - if (constraint_matrix.is_constrained(new_dof)) + if (affine_constraints.is_constrained( + new_dof)) { const std::vector< std::pair> *constraint_entries = - constraint_matrix + affine_constraints .get_constraint_entries(new_dof); if (constraint_entries->size() == 1) new_dof = @@ -2088,8 +2090,8 @@ namespace DoFTools if (enter_constraint) { - constraint_matrix.add_line(dofs_1[j]); - constraint_matrix.add_entry( + affine_constraints.add_line(dofs_1[j]); + affine_constraints.add_entry( dofs_1[j], dofs_2[i], is_identity_constrained ? 1.0 : -1.0); @@ -2103,7 +2105,7 @@ namespace DoFTools // enter the constraint. otherwise there is nothing // for us still to do bool enter_constraint = false; - if (!constraint_matrix.is_constrained(dofs_1[j])) + if (!affine_constraints.is_constrained(dofs_1[j])) { if (dofs_2[i] != dofs_1[j]) enter_constraint = true; @@ -2114,7 +2116,7 @@ namespace DoFTools const std::vector< std::pair> *constraint_entries = - constraint_matrix.get_constraint_entries( + affine_constraints.get_constraint_entries( dofs_1[j]); if (constraint_entries->size() == 1 && (*constraint_entries)[0].first == dofs_2[i]) @@ -2131,7 +2133,7 @@ namespace DoFTools // this pair of constraints means that // both dofs have to be constrained to // 0. - constraint_matrix.add_line(dofs_2[i]); + affine_constraints.add_line(dofs_2[i]); } } else @@ -2140,13 +2142,13 @@ namespace DoFTools // constraint cycle types::global_dof_index new_dof = dofs_1[j]; while (new_dof != dofs_2[i]) - if (constraint_matrix.is_constrained( + if (affine_constraints.is_constrained( new_dof)) { const std::vector> *constraint_entries = - constraint_matrix + affine_constraints .get_constraint_entries(new_dof); if (constraint_entries->size() == 1) new_dof = @@ -2167,19 +2169,19 @@ namespace DoFTools if (enter_constraint) { - constraint_matrix.add_line(dofs_2[i]); - constraint_matrix.add_entry( + affine_constraints.add_line(dofs_2[i]); + affine_constraints.add_entry( dofs_2[i], dofs_1[j], is_identity_constrained ? 1.0 : -1.0); } } } - else if (!constraint_matrix.is_constrained(dofs_2[i])) + else if (!affine_constraints.is_constrained(dofs_2[i])) { // this is just a regular constraint. enter it piece by // piece - constraint_matrix.add_line(dofs_2[i]); + affine_constraints.add_line(dofs_2[i]); for (unsigned int jj = 0; jj < dofs_per_face; ++jj) { // Query the correct face_index on face_1 respecting @@ -2195,7 +2197,7 @@ namespace DoFTools // And finally constrain the two DoFs respecting // component_mask: if (transformation(i, jj) != 0) - constraint_matrix.add_entry( + affine_constraints.add_entry( dofs_2[i], dofs_1[j], transformation(i, jj)); } } @@ -2310,7 +2312,7 @@ namespace DoFTools make_periodicity_constraints( const FaceIterator & face_1, const typename identity::type &face_2, - AffineConstraints & constraint_matrix, + AffineConstraints & affine_constraints, const ComponentMask & component_mask, const bool face_orientation, const bool face_flip, @@ -2448,7 +2450,7 @@ namespace DoFTools make_periodicity_constraints(face_1->child(i), face_2->child(j), - constraint_matrix, + affine_constraints, component_mask, face_orientation, face_flip, @@ -2487,7 +2489,7 @@ namespace DoFTools set_periodicity_constraints(face_2, face_1, transformation, - constraint_matrix, + affine_constraints, component_mask, face_orientation, face_flip, @@ -2501,7 +2503,7 @@ namespace DoFTools set_periodicity_constraints(face_2, face_1, inverse, - constraint_matrix, + affine_constraints, component_mask, face_orientation, face_flip, @@ -2521,7 +2523,7 @@ namespace DoFTools set_periodicity_constraints(face_1, face_2, transformation, - constraint_matrix, + affine_constraints, component_mask, face_orientation, face_orientation ? diff --git a/source/fe/fe_q_base.cc b/source/fe/fe_q_base.cc index 274a5b3925..93590f38f0 100644 --- a/source/fe/fe_q_base.cc +++ b/source/fe/fe_q_base.cc @@ -376,9 +376,9 @@ struct FE_Q_Base::Implementation constraint_point(k) = 1. * coord_int / interval; // The following lines of code should eliminate the problems with - // the Constraint-Matrix, which appeared for P>=4. The + // the constraints object which appeared for P>=4. The // AffineConstraints class complained about different constraints - // for the same entry of the Constraint-Matrix. Actually this + // for the same entry: Actually, this // difference could be attributed to FP errors, as it was in the // range of 1.0e-16. These errors originate in the loss of // symmetry in the FP approximation of the shape-functions. diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index 6388af60ae..b884e92f71 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -543,17 +543,17 @@ namespace internal std::vector &dof_indices) { if (mg_constrained_dofs != nullptr && - mg_constrained_dofs->get_level_constraint_matrix(level) - .n_constraints() > 0) + mg_constrained_dofs->get_level_constraints(level).n_constraints() > + 0) for (auto &ind : dof_indices) - if (mg_constrained_dofs->get_level_constraint_matrix(level) + if (mg_constrained_dofs->get_level_constraints(level) .is_identity_constrained(ind)) { - Assert(mg_constrained_dofs->get_level_constraint_matrix(level) + Assert(mg_constrained_dofs->get_level_constraints(level) .get_constraint_entries(ind) ->size() == 1, ExcInternalError()); - ind = mg_constrained_dofs->get_level_constraint_matrix(level) + ind = mg_constrained_dofs->get_level_constraints(level) .get_constraint_entries(ind) ->front() .first; diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 7a56e84a47..f2d89d9d54 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -137,17 +137,16 @@ namespace std::vector &dof_indices) { if (mg_constrained_dofs != nullptr && - mg_constrained_dofs->get_level_constraint_matrix(level) - .n_constraints() > 0) + mg_constrained_dofs->get_level_constraints(level).n_constraints() > 0) for (auto &ind : dof_indices) - if (mg_constrained_dofs->get_level_constraint_matrix(level) + if (mg_constrained_dofs->get_level_constraints(level) .is_identity_constrained(ind)) { - Assert(mg_constrained_dofs->get_level_constraint_matrix(level) + Assert(mg_constrained_dofs->get_level_constraints(level) .get_constraint_entries(ind) ->size() == 1, ExcInternalError()); - ind = mg_constrained_dofs->get_level_constraint_matrix(level) + ind = mg_constrained_dofs->get_level_constraints(level) .get_constraint_entries(ind) ->front() .first;