From: Matthias Maier Date: Fri, 25 May 2018 18:09:26 +0000 (-0500) Subject: RCM: Update dofs, part 1: dof_accessor X-Git-Tag: v9.1.0-rc1~1067^2~29 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6d1152093f4854b10275d6c8defd3d4c8ae99f7;p=dealii.git RCM: Update dofs, part 1: dof_accessor --- diff --git a/include/deal.II/dofs/dof_accessor.h b/include/deal.II/dofs/dof_accessor.h index 4e79a35b2c..cf4a50abc5 100644 --- a/include/deal.II/dofs/dof_accessor.h +++ b/include/deal.II/dofs/dof_accessor.h @@ -33,7 +33,8 @@ template class FullMatrix; template class Vector; -class ConstraintMatrix; +template +class AffineConstraints; template class TriaRawIterator; @@ -1555,16 +1556,18 @@ public: * or a BlockVector, or a PETSc or Trilinos vector if deal.II is * compiled to support these libraries. It is in the responsibility of the * caller to assure that the types of the numbers stored in input and output - * vectors are compatible and with similar accuracy. The ConstraintMatrix - * passed as an argument to this function makes sure that constraints are - * correctly distributed when the dof values are calculated. + * vectors are compatible and with similar accuracy. The + * AffineConstraints object passed as an argument to this function makes + * sure that constraints are correctly distributed when the dof values + * are calculated. */ template void - get_dof_values(const ConstraintMatrix &constraints, - const InputVector & values, - ForwardIterator local_values_begin, - ForwardIterator local_values_end) const; + get_dof_values( + const AffineConstraints &constraints, + const InputVector & values, + ForwardIterator local_values_begin, + ForwardIterator local_values_end) const; /** * This function is the counterpart to get_dof_values(): it takes a vector @@ -1723,15 +1726,16 @@ public: * * The elements are added up to the elements in the global vector, * rather than just set, since this is usually what one wants. Moreover, the - * ConstraintMatrix passed to this function makes sure that also constraints - * are eliminated in this process. + * AffineConstraints object passed to this function makes sure that also + * constraints are eliminated in this process. */ template void - distribute_local_to_global(const ConstraintMatrix &constraints, - ForwardIterator local_source_begin, - ForwardIterator local_source_end, - OutputVector & global_destination) const; + distribute_local_to_global( + const AffineConstraints &constraints, + ForwardIterator local_source_begin, + ForwardIterator local_source_end, + OutputVector & global_destination) const; /** * This function does much the same as the diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 5267254b03..633b541bad 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -3096,11 +3096,11 @@ namespace internal static void distribute_local_to_global( const DoFCellAccessor, - level_dof_access> &accessor, - const ConstraintMatrix & constraints, - ForwardIterator local_source_begin, - ForwardIterator local_source_end, - OutputVector & global_destination) + level_dof_access> & accessor, + const AffineConstraints &constraints, + ForwardIterator local_source_begin, + ForwardIterator local_source_end, + OutputVector & global_destination) { Assert( accessor.dof_handler != nullptr, @@ -3136,11 +3136,11 @@ namespace internal static void distribute_local_to_global( const DoFCellAccessor, - level_dof_access> &accessor, - const ConstraintMatrix & constraints, - ForwardIterator local_source_begin, - ForwardIterator local_source_end, - OutputVector & global_destination) + level_dof_access> & accessor, + const AffineConstraints &constraints, + ForwardIterator local_source_begin, + ForwardIterator local_source_end, + OutputVector & global_destination) { Assert( accessor.dof_handler != nullptr, @@ -3352,10 +3352,10 @@ namespace internal const unsigned int n_dofs = local_matrix.size(); - // TODO[WB/MK]: This function could me made more efficient because it - // allocates memory, which could be avoided by passing in another - // argument as a scratch array. Comment(GK) Do not bother and leave this - // to ConstraintMatrix or MeshWorker::Assembler + // TODO[WB/MK]: This function could me made more efficient because + // it allocates memory, which could be avoided by passing in + // another argument as a scratch array. Comment(GK) Do not bother + // and leave this to AffineConstraints or MeshWorker::Assembler // get indices of dofs std::vector dofs(n_dofs); @@ -3627,10 +3627,10 @@ template template inline void DoFCellAccessor::get_dof_values( - const ConstraintMatrix &constraints, - const InputVector & values, - ForwardIterator local_values_begin, - ForwardIterator local_values_end) const + const AffineConstraints &constraints, + const InputVector & values, + ForwardIterator local_values_begin, + ForwardIterator local_values_end) const { Assert(this->is_artificial() == false, ExcMessage("Can't ask for DoF indices on artificial cells.")); @@ -3793,10 +3793,10 @@ template template inline void DoFCellAccessor::distribute_local_to_global( - const ConstraintMatrix &constraints, - ForwardIterator local_source_begin, - ForwardIterator local_source_end, - OutputVector & global_destination) const + const AffineConstraints &constraints, + ForwardIterator local_source_begin, + ForwardIterator local_source_end, + OutputVector & global_destination) const { dealii::internal::DoFCellAccessorImplementation::Implementation:: distribute_local_to_global(*this,