35 #ifndef OBSOLETEBOXCOLLECTION_HPP_
36 #define OBSOLETEBOXCOLLECTION_HPP_
39 #include "Element.hpp"
51 template<
unsigned DIM>
55 friend class TestObsoleteBoxCollection;
115 void SetupLocalBoxes(
const std::vector<c_vector<int, DIM> >& rNeighbours);
129 c_vector<double, 2*DIM> domainSize,
130 bool isPeriodicInX =
false,
131 bool isPeriodicInY =
false,
132 bool isPeriodicInZ =
false);
bool IsBoxOwned(unsigned globalIndex)
std::set< unsigned > & rGetLocalBoxes(unsigned boxIndex)
c_vector< double, 2 *DIM > mDomainSize
std::vector< Box< DIM > > mBoxes
static const double msFudge
c_vector< bool, DIM > mIsDomainPeriodic
bool IsOwned(Node< DIM > *pNode)
ObsoleteBoxCollection(double boxWidth, c_vector< double, 2 *DIM > domainSize, bool isPeriodicInX=false, bool isPeriodicInY=false, bool isPeriodicInZ=false)
bool IsBoxInDomain(c_vector< unsigned, DIM > gridIndices)
unsigned CalculateContainingBox(Node< DIM > *pNode)
c_vector< bool, DIM > IsIndexPenultimate(c_vector< unsigned, DIM > gridIndices)
std::vector< std::set< unsigned > > mLocalBoxes
void CalculateNodePairs(std::vector< Node< DIM > * > &rNodes, std::vector< std::pair< Node< DIM > *, Node< DIM > * > > &rNodePairs)
c_vector< unsigned, DIM > GetGridIndices(unsigned linearIndex)
Box< DIM > & rGetBox(unsigned boxIndex)
unsigned GetLinearIndex(c_vector< int, DIM > gridIndices)
const c_vector< double, 2 *DIM > & rGetDomainSize() const
void SetupLocalBoxes(const std::vector< c_vector< int, DIM > > &rNeighbours)
c_vector< unsigned, DIM > mNumBoxesEachDirection
void SetupAllLocalBoxes()
void SetupLocalBoxesHalfOnly()