diff --git a/dune/solvers/common/canignore.hh b/dune/solvers/common/canignore.hh index 53f73f9e312ed0eab913d3edd8447ffb5c3583cf..4464ac01b4453913ba0c311d8611db074fb3f797 100644 --- a/dune/solvers/common/canignore.hh +++ b/dune/solvers/common/canignore.hh @@ -13,17 +13,51 @@ public: using BitVector = BitVectorType; - /** \brief Default constructor */ + /** + * \brief Default constructor + */ CanIgnore() : ignoreNodes_(nullptr) {} - /** \brief Virtual destructor. Does NOT delete the bitfield! */ + /** + * \brief Constructor from bit vector + * + * This class stores a non-owning pointer to the bit vector. + */ + CanIgnore(const BitVector& i) + : ignoreNodes_(&i) + {} + + /** + * \brief Destructor + * + * Does NOT delete the bitfield! + */ ~CanIgnore() {} - /** \brief A flag for each degree of freedom stating whether the - dof should be ignored by the solver */ + /** + * \brief Set bit vector + * + * This class stores a non-owning pointer to the bit vector. + */ + void setIgnore(const BitVector& i) + { + ignoreNodes_ = &i; + } + + /** + * \brief Const access to bit vector + */ + const BitVector& ignore() const + { + return *ignoreNodes_; + } + + /** + * \brief A flag for each degree of freedom stating whether the dof should be ignored by the solver + */ const BitVectorType* ignoreNodes_; };