21 auto rowBasis = Dune::Functions::subspaceBasis(*basis_, col_);
23 std::set<typename B::MultiIndex> rowSet;
25 auto rowLocalView = rowBasis.localView();
26 auto rowDOFs = Dune::Functions::subEntityDOFs(rowBasis);
27 auto const& gridView = basis_->gridView();
28 for (
auto const& element : entitySet(*basis_)) {
29 if (element.hasBoundaryIntersections()) {
30 rowLocalView.bind(element);
31 for(
auto const& intersection: intersections(gridView, element)) {
32 if (intersection.boundary() && boundarySubset_(intersection)) {
33 for(
auto localIndex: rowDOFs.bind(rowLocalView,intersection))
34 rowSet.insert(rowLocalView.index(localIndex));
40 rowIndices_.clear(); rowIndices_.reserve(rowSet.size());
41 rowIndices_.insert(rowIndices_.begin(), rowSet.begin(), rowSet.end());
42 colIndices_ = rowIndices_;
44 auto rowBasis = Dune::Functions::subspaceBasis(*basis_, row_);
45 auto colBasis = Dune::Functions::subspaceBasis(*basis_, col_);
47 std::set<typename B::MultiIndex> rowSet, colSet;
49 auto rowLocalView = rowBasis.localView();
50 auto colLocalView = colBasis.localView();
51 auto rowDOFs = Dune::Functions::subEntityDOFs(rowBasis);
52 auto colDOFs = Dune::Functions::subEntityDOFs(colBasis);
53 auto const& gridView = basis_->gridView();
54 for (
auto const& element : entitySet(*basis_)) {
55 if (element.hasBoundaryIntersections()) {
56 rowLocalView.bind(element);
57 colLocalView.bind(element);
58 for(
auto const& intersection: intersections(gridView, element)) {
59 if (intersection.boundary() && boundarySubset_(intersection)) {
60 for(
auto localIndex: rowDOFs.bind(rowLocalView,intersection))
61 rowSet.insert(rowLocalView.index(localIndex));
62 for(
auto localIndex: colDOFs.bind(colLocalView,intersection))
63 colSet.insert(colLocalView.index(localIndex));
69 rowIndices_.clear(); rowIndices_.reserve(rowSet.size());
70 rowIndices_.insert(rowIndices_.begin(), rowSet.begin(), rowSet.end());
72 colIndices_.clear(); colIndices_.reserve(colSet.size());
73 colIndices_.insert(colIndices_.begin(), colSet.begin(), colSet.end());
void apply(Mat &matrix, Sol &solution, Rhs &rhs, bool symmetric=false)
Apply dirichlet BC to matrix and vector.
Definition DirichletBC.inc.hpp:81