2 #ifndef _PROTO_COARSE_FINE_BOUNDARY_ 3 #define _PROTO_COARSE_FINE_BOUNDARY_ 10 template <
typename P>
14 CoarseFineBoundary(std::shared_ptr<P> coarsePartition, std::shared_ptr<P> finePartition);
23 std::map<DataIndex<P>, std::vector<DataIndex<P>>>
m_coarseMap;
24 std::map<DataIndex<P>, std::vector<DataIndex<P>>>
m_fineMap;
30 std::shared_ptr<P> coarsePartition,
31 std::shared_ptr<P> finePartition)
39 for (
auto iter = fineIter.
begin(); iter != fineIter.
end(); ++fineIter)
42 DataIndex<P> coarseIndex = finePartition->getCoarseIndexFromFine(fineIndex, coarsePartition);
44 "CoarseFineBoundary::constructor | Error: Proper Nesting Violation");
48 if (finePartition->isInteriorBoundary(fineIndex,
dir))
50 DataIndex<P> adjFineIndex = finePartition->getAdjacentIndex(fineIndex);
51 if (adjFineIndex == *fineIter.
end())
53 DataIndex<P> adjCoarseIndex = finePartition->getCoarseIndexFromFine(fineIndex, coarsePartition,
dir);
55 "CoarseFineBoundary::constructor | Error: Proper Nesting Violation");
56 m_fineMap[fineIndex].push_back(adjCoarseIndex);
69 "CoarseFineBoundary::onCoarseBoundary | Error: Incompatible Index");
78 "CoarseFineBoundary::onFineBoundary | Error: Incompatible Index");
90 return std::vector<DataIndex<P>>();
100 return std::vector<DataIndex<P>>();
std::vector< DataIndex< P > > getCoarseFromFine(DataIndex< P > fineIndex) const
Definition: Proto_CoarseFineBoundary.H:84
DataIterator< P > & end()
Set To End.
Definition: Proto_DataIterator.H:22
Definition: Proto_CoarseFineBoundary.H:11
Distributed Data Iterator.
Definition: Proto_DataIndex.H:10
bool compatible(const DataIndex< P > &a_index) const
Compatibility Query.
Definition: Proto_DataIndex.H:103
std::map< DataIndex< P >, std::vector< DataIndex< P > > > m_fineMap
Definition: Proto_CoarseFineBoundary.H:24
static std::set< Point > DirectionsOfCodim(int a_codim)
std::vector< DataIndex< P > > getFineFromCoarse(DataIndex< P > coarseIndex) const
Definition: Proto_CoarseFineBoundary.H:94
bool exists
Definition: Proto_MBBoxPartition.H:87
std::shared_ptr< P > m_coarsePartition
Definition: Proto_CoarseFineBoundary.H:21
bool onFineBoundary(DataIndex< P > fineIndex) const
Definition: Proto_CoarseFineBoundary.H:75
DataIterator< P > & begin()
Set To Start.
Definition: Proto_DataIterator.H:13
CoarseFineBoundary(std::shared_ptr< P > coarsePartition, std::shared_ptr< P > finePartition)
Definition: Proto_CoarseFineBoundary.H:29
bool onCoarseBoundary(DataIndex< P > coarseIndex) const
Definition: Proto_CoarseFineBoundary.H:66
std::shared_ptr< P > m_finePartition
Definition: Proto_CoarseFineBoundary.H:22
#define PROTO_ASSERT(stmt, args...)
Definition: Proto_PAssert.H:48
Definition: Proto_Array.H:17
std::map< DataIndex< P >, std::vector< DataIndex< P > > > m_coarseMap
Definition: Proto_CoarseFineBoundary.H:23
Integer Valued Vector.
Definition: Proto_Point.H:24
Data Index.
Definition: Proto_DataIndex.H:20
Point dir
Definition: Proto_MBBoxPartition.H:16