#include <Attributes.h>
Definition at line 91 of file Attributes.h.
◆ Key
◆ AttribMatrixTags() [1/3]
Definition at line 101 of file Attributes.h.
AttribTagBase tracks all (vector or matrix) tags associated with an object.
◆ AttribMatrixTags() [2/3]
◆ AttribMatrixTags() [3/3]
| AttribMatrixTags::AttribMatrixTags |
( |
TheWarehouse & |
w, |
|
|
const std::set< TagID > & |
tags |
|
) |
| |
|
inline |
◆ clone()
| virtual std::unique_ptr< Attribute > Attribute::clone |
( |
| ) |
const |
|
pure virtualinherited |
clone creates and returns and identical (deep) copy of this attribute - i.e.
the result of clone should return true if passed into isMatch.
Referenced by TheWarehouse::update().
◆ clonefunc()
◆ hash()
| virtual std::size_t Attribute::hash |
( |
| ) |
const |
|
pure virtualinherited |
This function must return a deterministic value that is uniquely determined by the data the attribute holds (i.e.
is initialized with). Ideally, the data should be uniformly and randomly distributed across the domain of size_t values - e.g. 1 and 2 should hash to completely unrelated values. Use of std::hash for POD is encouraged. A convenience hash_combine function is also provided to combine the results an existing hash with one or more other values.
Referenced by std::hash< Attribute >::operator()().
◆ hashfunc()
| AttribTagBase::hashfunc |
( |
_vals |
| ) |
|
|
inherited |
◆ id()
| unsigned int Attribute::id |
( |
| ) |
const |
|
inlineinherited |
returns the unique attribute ID associated with all attributes that have the same (mose derived) class as this object.
This ID is determined at construction time this
Definition at line 68 of file TheWarehouse.h.
Referenced by std::hash< Attribute >::operator()().
◆ initFrom()
| void AttribMatrixTags::initFrom |
( |
const MooseObject * |
obj | ) |
|
|
overridevirtual |
initFrom reads and stores the desired meta-data from obj for later matching comparisons.
Implements Attribute.
Definition at line 109 of file Attributes.C.
110{
113 if (t)
114 {
115 for (auto & tag : t->getMatrixTags({}))
116 _vals.push_back(
static_cast<int>(tag));
117 }
118}
std::vector< TagID > _vals
◆ isEqual()
| bool AttribTagBase::isEqual |
( |
const Attribute & |
other | ) |
const |
|
overridevirtualinherited |
isEqual returns true if the meta-data stored in this attribute is identical to that stored in other.
isEqual does not need to check/compare the values from the instances' id() functions.
Implements Attribute.
Definition at line 96 of file Attributes.C.
97{
99 if (!a || a->_vals.size() !=
_vals.size())
100 return false;
101
102 for (size_t i = 0; i < a->_vals.size(); i++)
103 if (a->_vals[i] !=
_vals[i])
104 return false;
105 return true;
106}
◆ isMatch()
| bool AttribTagBase::isMatch |
( |
const Attribute & |
other | ) |
const |
|
overridevirtualinherited |
isMatch returns true if the meta-data stored in this attribute is equivalent to that stored in other.
This is is for query matching - not exact equivalence. isMatch does not need to check/compare the values from the instances' id() functions.
Implements Attribute.
Definition at line 80 of file Attributes.C.
81{
83 if (!a)
84 return false;
85 if (a->_vals.size() == 0)
86 return true;
87
88
89 for (
auto val :
_vals)
91 return true;
92 return false;
93}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
◆ operator!=()
| bool Attribute::operator!= |
( |
const Attribute & |
other | ) |
const |
|
inlineinherited |
◆ operator==()
| bool Attribute::operator== |
( |
const Attribute & |
other | ) |
const |
|
inlineinherited |
Definition at line 59 of file TheWarehouse.h.
60 {
62 }
virtual bool isEqual(const Attribute &other) const =0
isEqual returns true if the meta-data stored in this attribute is identical to that stored in other.
◆ setFrom()
| void AttribMatrixTags::setFrom |
( |
Key |
k | ) |
|
|
inline |
◆ _id
◆ _vals
| std::vector<TagID> AttribTagBase::_vals |
|
protectedinherited |
The documentation for this class was generated from the following files: