Skip to content
Snippets Groups Projects
Commit fb8a079f authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Cleanup CanIgnore interface

* Add constructor from bit vector
* Add methods to set/get the bit vector
* Improve doc

This is a first step in getting rid of the public member.
CanIgnore::ignoreNodes_ should be (add will hopefully become)
protected or private. With the new methods we can avoid
accessing the member directly.
parent 21ab302e
No related branches found
No related tags found
No related merge requests found
......@@ -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_;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment