Public Member Functions | |
ORDERED_HANDLE_CTORS (CellFilter, CellFilterStub) | |
CellSet | getCells (const Mesh &mesh) const |
int | dimension (const Mesh &mesh) const |
CellFilter | operator+ (const CellFilter &other) const |
CellFilter | operator- (const CellFilter &other) const |
CellFilter | intersection (const CellFilter &other) const |
CellFilter | labeledSubset (int label) const |
CellFilter | labeledSubset (const Array< int > &labels) const |
CellFilter | coordSubset (int dir, const double &coordVal) const |
CellFilter | subset (const CellPredicate &test) const |
CellFilter | subset (const RCP< CellPredicateFunctorBase > &test) const |
const Set< CellFilter > & | knownSubsets () const |
const Set< CellFilter > & | knownDisjoints () const |
bool | isKnownSubsetOf (const CellFilter &other) const |
bool | isKnownDisjointWith (const CellFilter &other) const |
bool | isSubsetOf (const CellFilter &other, const Mesh &mesh) const |
bool | isDisjointWith (const CellFilter &other, const Mesh &mesh) const |
void | registerSubset (const CellFilter &sub) const |
void | registerDisjoint (const CellFilter &sub) const |
void | registerLabeledSubset (const Set< int > &label, const CellFilter &sub) const |
bool | isNullCellFilter () const |
bool | areFacetsOf (const CellFilter &other, const Mesh &mesh) const |
bool | isNull () const |
bool | operator== (const CellFilter &other) const |
bool | operator!= (const CellFilter &other) const |
XMLObject | toXML () const |
std::string | toString () const |
void | setName (const std::string &name) |
const CellFilterBase * | cfbPtr () const |
CellFilterBase * | nonConstCfbPtr () |
Related Functions | |
(Note that these are not member functions.) | |
typedef Array< CellFilter > | CellFilterArray |
Array< CellFilter > | List (const CellFilter &a) |
Create an array with one entry. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b) |
Create an array with two entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c) |
Create an array with three entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d) |
Create an array with four entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e) |
Create an array with five entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e, const CellFilter &f) |
Create an array with six entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e, const CellFilter &f, const CellFilter &g) |
Create an array with seven entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e, const CellFilter &f, const CellFilter &g, const CellFilter &h) |
Create an array with eight entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e, const CellFilter &f, const CellFilter &g, const CellFilter &h, const CellFilter &i) |
Create an array with nine entries. | |
Array< CellFilter > | List (const CellFilter &a, const CellFilter &b, const CellFilter &c, const CellFilter &d, const CellFilter &e, const CellFilter &f, const CellFilter &g, const CellFilter &h, const CellFilter &i, const CellFilter &j) |
Create an array with ten entries. |
// Define a filter that will pick out all maximal cells located // entirely in the left half-plane x < 0 CellFilter elements = new MaximalCellFilter(); CellFilter leftHalf = elements.subset( x <= 0.0 ); // Apply the leftHalf filter to a mesh, thus enumerating // all the cells of that mesh living in the left half-plane CellSet leftCells = leftHalf.getCells(mesh);
Operations on cell filters can produce new filters.
The subset() and labeledSubset() operators produce new CellFilters that pick out a subset of the cells satisfying an additional condition given in the argument to the subset methods.
Binary set operations can also produce new filters. Suppose a
and b
are CellFilters whose getCells()
methods produce CellSets and
, respectively. There exist operators for the following binary operations:
a+b.
The result of a union operation is a filter that will produce the union of the two operand's cell sets,
i.e., all cells that are in either or
a.intersection(b)
The result of an intersection operation is a filter that will produce the intersection of the two operand's cell sets,
i.e., all cells that are in both and
a-b.
The result of an exclusion operation is a filter that will produce the exclusion of the two operand's cell sets,
i.e., all cells that are in but not in
CellFilter elements = new MaximalCellFilter();
CellFilter leftHalf = elements.subset( x <= 0.0 );
CellFilter topHalf = elements.subset( x >= 0.0 );
CellFilter topLeftQuarter = leftHalf.intersection(topHalf);
CellFilter
Definition at line 120 of file SundanceCellFilter.hpp.
bool Sundance::CellFilter::areFacetsOf | ( | const CellFilter & | other, | |
const Mesh & | mesh | |||
) | const |
Determine whether all cells identified by this filter are facets of cells identified by the other filter
const CellFilterBase * CellFilter::cfbPtr | ( | ) | const |
Definition at line 323 of file SundanceCellFilter.cpp.
References Playa::Handle< CellFilterStub >::ptr().
Referenced by dimension(), getCells(), and toString().
CellFilter CellFilter::coordSubset | ( | int | dir, | |
const double & | coordVal | |||
) | const |
Return a filter that will return the subset of cells for which the dir-th coordinate takes on value coordVal
Definition at line 193 of file SundanceCellFilter.cpp.
References registerSubset().
Referenced by main().
int CellFilter::dimension | ( | const Mesh & | mesh | ) | const |
Return the dimension of this cell set on the given mesh
Definition at line 75 of file SundanceCellFilter.cpp.
References cfbPtr(), Sundance::CellFilterBase::dimension(), and isNullCellFilter().
Referenced by Sundance::SubsetCellFilter::dimension(), Sundance::BinaryCellFilter::dimension(), Sundance::DiscreteSpace::DiscreteSpace(), Sundance::InhomogeneousEdgeLocalizedDOFMap::getEdgeLIDs(), Sundance::SubsetCellFilter::internalGetCells(), Sundance::DOFMapBuilder::isWholeDomain(), Sundance::DOFMapBuilder::markBCCols(), Sundance::DOFMapBuilder::markBCRows(), Sundance::DOFMapBuilder::reduceCellFilters(), and Sundance::SubmaximalNodalDOFMap::SubmaximalNodalDOFMap().
Find the cells passing this filter on the given mesh
Definition at line 63 of file SundanceCellFilter.cpp.
References cfbPtr(), Sundance::CellFilterBase::getCells(), isNull(), isNullCellFilter(), and Sundance::NullCell.
Referenced by Sundance::AToCPointLocator::AToCPointLocator(), Sundance::CFMeshPair::CFMeshPair(), Sundance::connectedNodeSet(), Sundance::ExodusWriter::findBlocks(), Sundance::InhomogeneousEdgeLocalizedDOFMap::getEdgeLIDs(), Sundance::PartialElementDOFMap::init(), Sundance::NodalDOFMapHN::init(), Sundance::NodalDOFMap::init(), Sundance::AToCDensitySampler::init(), Sundance::MixedDOFMapHN::initMap(), Sundance::MixedDOFMap::initMap(), Sundance::SubsetCellFilter::internalGetCells(), Sundance::BinaryCellFilter::internalGetCells(), isSubsetOf(), Sundance::DOFMapBuilder::isWholeDomain(), Sundance::DOFMapBuilder::markBCCols(), Sundance::DOFMapBuilder::markBCRows(), Sundance::operator<<(), Sundance::DOFMapBuilder::reduceCellFilters(), and Sundance::SubmaximalNodalDOFMap::SubmaximalNodalDOFMap().
CellFilter CellFilter::intersection | ( | const CellFilter & | other | ) | const |
Return a filter that returns the set intersection of the sets produced by the two operand filters
Definition at line 140 of file SundanceCellFilter.cpp.
References Sundance::BinaryCellFilter::Intersection, isKnownDisjointWith(), isKnownSubsetOf(), isNull(), and registerSubset().
Referenced by Sundance::CFMeshPair::intersection().
bool Sundance::CellFilter::isDisjointWith | ( | const CellFilter & | other, | |
const Mesh & | mesh | |||
) | const |
Do a brute-force check of whether this filter is disjoint with the specified filter.
bool CellFilter::isKnownDisjointWith | ( | const CellFilter & | other | ) | const |
Indicate whether this filter is known to be disjoint with the specified filter. Note that a negative answer here does NOT mean that it is not disjoint, only that it can't be determined to be one through structural properties alone. If this function returns false, then to get a definitive answer one must do a test using an actual realization on a mesh.
Definition at line 223 of file SundanceCellFilter.cpp.
References knownDisjoints().
Referenced by intersection(), and operator-().
bool CellFilter::isKnownSubsetOf | ( | const CellFilter & | other | ) | const |
Indicate whether this filter is known to be a subset of the specified filter. Note that a negative answer here does NOT mean that it is not a subset, only that it can't be determined to be one through structural properties alone. If this function returns false, then to get a definitive answer one must do a test using an actual realization on a mesh.
Definition at line 217 of file SundanceCellFilter.cpp.
References knownSubsets().
Referenced by intersection(), isSubsetOf(), and operator-().
bool CellFilter::isNull | ( | ) | const |
Indicate whether this cell set is null
Definition at line 53 of file SundanceCellFilter.cpp.
References isNullCellFilter(), and Playa::Handle< CellFilterStub >::ptr().
Referenced by getCells(), intersection(), operator+(), and operator-().
bool CellFilter::isNullCellFilter | ( | ) | const |
Indicate whether this is a null cell filter
Definition at line 48 of file SundanceCellFilter.cpp.
References Playa::Handle< CellFilterStub >::ptr().
Referenced by dimension(), getCells(), and isNull().
bool CellFilter::isSubsetOf | ( | const CellFilter & | other, | |
const Mesh & | mesh | |||
) | const |
Do a brute-force check of whether this filter is a subset of the specified filter.
Definition at line 231 of file SundanceCellFilter.cpp.
References Sundance::CellSet::begin(), Sundance::CellSet::end(), getCells(), isKnownSubsetOf(), Sundance::CellSet::setDifference(), and Sundance::CellSet::setIntersection().
const Set< CellFilter > & CellFilter::knownDisjoints | ( | ) | const |
Return a compilation of all filters registered as disjoint with this filter
Definition at line 268 of file SundanceCellFilter.cpp.
References Sundance::SubsetManager::getDisjoints().
Referenced by isKnownDisjointWith(), and registerDisjoint().
const Set< CellFilter > & CellFilter::knownSubsets | ( | ) | const |
Return a compilation of all registered subsets of this filter
Definition at line 264 of file SundanceCellFilter.cpp.
References Sundance::SubsetManager::getSubsets().
Referenced by isKnownSubsetOf(), and registerSubset().
CellFilter CellFilter::labeledSubset | ( | const Array< int > & | labels | ) | const |
Return a filter that will return the subset of cells having any one of the given labels
Definition at line 182 of file SundanceCellFilter.cpp.
References registerLabeledSubset(), and registerSubset().
CellFilter CellFilter::labeledSubset | ( | int | label | ) | const |
Return a filter that returns the subset of cells for which the logical expression is true Return a filter that will return the subset of cells having the given label
Definition at line 177 of file SundanceCellFilter.cpp.
CellFilterBase * CellFilter::nonConstCfbPtr | ( | ) |
Definition at line 330 of file SundanceCellFilter.cpp.
References Playa::Handle< CellFilterStub >::ptr().
Referenced by setName().
bool CellFilter::operator!= | ( | const CellFilter & | other | ) | const |
Definition at line 258 of file SundanceCellFilter.cpp.
CellFilter CellFilter::operator+ | ( | const CellFilter & | other | ) | const |
Return a filter that returns the set union of the sets produced by the two operand filters
Definition at line 86 of file SundanceCellFilter.cpp.
References isNull(), registerSubset(), and Sundance::BinaryCellFilter::Union.
CellFilter CellFilter::operator- | ( | const CellFilter & | other | ) | const |
Return a filter that returns the set difference between the sets produced by the two operand filters
Definition at line 108 of file SundanceCellFilter.cpp.
References Sundance::BinaryCellFilter::Difference, isKnownDisjointWith(), isKnownSubsetOf(), isNull(), registerDisjoint(), and registerSubset().
bool CellFilter::operator== | ( | const CellFilter & | other | ) | const |
Definition at line 251 of file SundanceCellFilter.cpp.
Sundance::CellFilter::ORDERED_HANDLE_CTORS | ( | CellFilter | , | |
CellFilterStub | ||||
) |
void CellFilter::registerDisjoint | ( | const CellFilter & | sub | ) | const |
Register a filter known to be disjoint
Definition at line 285 of file SundanceCellFilter.cpp.
References knownDisjoints().
Referenced by operator-(), and registerLabeledSubset().
void CellFilter::registerLabeledSubset | ( | const Set< int > & | label, | |
const CellFilter & | sub | |||
) | const |
Register a labeled subset
Definition at line 296 of file SundanceCellFilter.cpp.
References Sundance::SubsetManager::getLabeledSubsets(), and registerDisjoint().
Referenced by labeledSubset().
void CellFilter::registerSubset | ( | const CellFilter & | sub | ) | const |
Register a subset
Definition at line 273 of file SundanceCellFilter.cpp.
References knownSubsets().
Referenced by coordSubset(), intersection(), labeledSubset(), operator+(), operator-(), and subset().
void CellFilter::setName | ( | const std::string & | name | ) |
Definition at line 58 of file SundanceCellFilter.cpp.
References nonConstCfbPtr(), and Sundance::CellFilterBase::setName().
CellFilter CellFilter::subset | ( | const RCP< CellPredicateFunctorBase > & | test | ) | const |
Return a filter that will return the subset of cells for which the given predicate is true
Definition at line 210 of file SundanceCellFilter.cpp.
References registerSubset().
CellFilter CellFilter::subset | ( | const CellPredicate & | test | ) | const |
Return a filter that will return the subset of cells for which the given predicate is true
Definition at line 202 of file SundanceCellFilter.cpp.
References registerSubset().
Referenced by Sundance::RectangleDomain::init(), Sundance::LineDomain::init(), and Sundance::PointData::init().
string CellFilter::toString | ( | ) | const |
Definition at line 318 of file SundanceCellFilter.cpp.
References cfbPtr(), and Sundance::CellFilterBase::toString().
Referenced by Sundance::BinaryCellFilter::BinaryCellFilter(), and std::operator<<().
XMLObject CellFilter::toXML | ( | ) | const |
Definition at line 313 of file SundanceCellFilter.cpp.
References Playa::Handle< CellFilterStub >::ptr().
Referenced by Sundance::BinaryCellFilter::toXML().
typedef Array<CellFilter> CellFilterArray [related] |
Definition at line 409 of file SundanceCellFilter.hpp.
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e, | |||
const CellFilter & | f, | |||
const CellFilter & | g, | |||
const CellFilter & | h, | |||
const CellFilter & | i, | |||
const CellFilter & | j | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e, | |||
const CellFilter & | f, | |||
const CellFilter & | g, | |||
const CellFilter & | h, | |||
const CellFilter & | i | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e, | |||
const CellFilter & | f, | |||
const CellFilter & | g, | |||
const CellFilter & | h | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e, | |||
const CellFilter & | f, | |||
const CellFilter & | g | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e, | |||
const CellFilter & | f | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d, | |||
const CellFilter & | e | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c, | |||
const CellFilter & | d | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b, | |||
const CellFilter & | c | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a, | |
const CellFilter & | b | |||
) | [related] |
Array< CellFilter > List | ( | const CellFilter & | a | ) | [related] |