35 #ifndef BOXCOLLECTION_HPP_
36 #define BOXCOLLECTION_HPP_
39 #include "Element.hpp"
47 template<
unsigned DIM>
51 friend class TestBoxCollection;
125 c_vector<double, 2*DIM> domainSize,
126 bool isPeriodicInX =
false,
127 bool isPeriodicInY =
false,
128 bool isPeriodicInZ =
false);
196 std::map<
unsigned, std::set<unsigned> >& rNodeNeighbours);
c_vector< int, DIM > GetGridIndices(unsigned linearIndex)
std::vector< Box< DIM > > mBoxes
std::set< unsigned > GetLocalBoxes(unsigned boxIndex)
unsigned GetLinearIndex(c_vector< int, DIM > gridIndices)
c_vector< bool, DIM > IsIndexPenultimate(c_vector< int, DIM > gridIndices)
bool IsBoxInDomain(c_vector< int, DIM > gridIndices)
unsigned CalculateContainingBox(Node< DIM > *pNode)
const c_vector< double, 2 *DIM > & rGetDomainSize() const
void SetupAllLocalBoxes()
BoxCollection(double boxWidth, c_vector< double, 2 *DIM > domainSize, bool isPeriodicInX=false, bool isPeriodicInY=false, bool isPeriodicInZ=false)
c_vector< double, 2 *DIM > mDomainSize
Box< DIM > & rGetBox(unsigned boxIndex)
c_vector< unsigned, DIM > mNumBoxesEachDirection
void SetupLocalBoxesHalfOnly()
void CalculateNodePairs(std::vector< Node< DIM > * > &rNodes, std::vector< std::pair< Node< DIM > *, Node< DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours)
static const double msFudge
void SetupLocalBoxes(std::vector< c_vector< int, DIM > > neighbours)
c_vector< bool, DIM > mIsDomainPeriodic
std::vector< std::set< unsigned > > mLocalBoxes