34 :
public DirichletBC<Basis, Path, Path, ValueGridFct>
37 using GridView =
typename Basis::GridView;
38 using Intersection =
typename GridView::Intersection;
48 :
Base(FWD(basis), path, path, std::move(boundarySubset), std::move(values))
51 template <
class Mat,
class Sol,
class Rhs>
52 void apply(Mat& matrix, Sol& solution, Rhs& rhs)
54 if (this->rowIndices_ != this->colIndices_)
55 error_exit(
"SymmetricDirichletBC requires identical row/col DOF sets.");
56 std::vector<typename Sol::value_type> solutionValues;
57 solutionValues.reserve(this->colIndices_.size());
60 Sol boundarySolution{solution};
61 valueOf(boundarySolution, this->col_).interpolate_noalias(this->valueGridFct_,
tag::assign{});
62 boundarySolution.gather(this->colIndices_, solutionValues);
65 solution.scatter(this->colIndices_, solutionValues);
68 matrix.zeroRowsColumns(this->rowIndices_,
true, solution, rhs);
70 rhs.scatter(this->rowIndices_, solutionValues);