83 mfem::err <<
"Unrecognized attribute set name \"" << set_name
84 <<
"\" in AttributeSets::RemoveFromAttributeSet" << std::endl;
109 MFEM_ASSERT(attrs.
Max() <= max_attr,
"Invalid attribute number present.");
113 for (
auto const &attr : attrs)
115 MFEM_VERIFY(attr > 0,
"Attribute number less than one!");
void DeleteFirst(const T &el)
Delete the first entry with value == 'el'.
T Max() const
Find the maximal element in the array, using the comparison operator < for class T.
void Print(std::ostream &out=mfem::out, int width=-1) const
Print the contents of the container to an output stream.
std::set< std::string > GetNames() const
Return an STL set of strings giving the names of the arrays.
void DeleteArray(const std::string &name)
Delete the named array from the container.
int Size() const
Return the number of named arrays in the container.
bool EntryExists(const std::string &name) const
Return true if an array with the given name is present in the container.
Array< T > & CreateArray(const std::string &name)
Create a new empty array with the given name.
void SetAttributeSet(const std::string &set_name, const Array< int > &attr)
Create a new attribute set.
Array< int > GetAttributeSetMarker(const std::string &set_name)
Return a marker array corresponding to a named attribute set.
bool SetsExist() const
Return true if any named sets are currently defined.
bool AttributeSetExists(const std::string &name) const
Return true is the named attribute set is present.
void RemoveFromAttributeSet(const std::string &set_name, int attr)
Remove a single entry from an existing attribute set.
Array< int > & GetAttributeSet(const std::string &set_name)
Access a named attribute set.
static Array< int > AttrToMarker(int max_attr, const Array< int > &attrs)
Prepares a marker array corresponding to an array of element attributes.
void AddToAttributeSet(const std::string &set_name, int attr)
Add a single entry to an existing attribute set.
ArraysByName< int > attr_sets
Named sets of attributes.
Array< int > & CreateAttributeSet(const std::string &set_name)
Create an empty named attribute set.
std::set< std::string > GetAttributeSetNames() const
Return all attribute set names as an STL set.
AttributeSets(const Array< int > &attr)
void Print(std::ostream &out=mfem::out, int width=-1) const
Print the contents of the container to an output stream.
void DeleteAttributeSet(const std::string &set_name)
Delete a named attribute set.
void Copy(AttributeSets ©) const
Create a copy of the internal data to the provided copy.
OutStream err(std::cerr)
Global stream used by the library for standard error output. Initially it uses the same std::streambu...