Go to the documentation of this file.
21 template <
typename TmplParticle,
typename TmplConnection>
31 m_minRadius(
std::numeric_limits<double>::max()),
32 m_maxRadius(-
std::numeric_limits<double>::max()),
34 m_minPt(bBox.getMinPt()),
35 m_maxPt(bBox.getMaxPt()),
36 m_defaultTag(defaultTag)
38 const double gridSize =
59 template <
typename TmplParticle,
typename TmplConnection>
64 template <
typename TmplParticle,
typename TmplConnection>
67 return m_nTablePtr->size();
70 template <
typename TmplParticle,
typename TmplConnection>
73 return m_connectionSet.size();
76 template <
typename TmplParticle,
typename TmplConnection>
82 template <
typename TmplParticle,
typename TmplConnection>
88 template <
typename TmplParticle,
typename TmplConnection>
95 template <
typename TmplParticle,
typename TmplConnection>
104 m_connectionPoolPtr->construct(p1.
getId(), p2.
getId(), tag)
107 template <
typename TmplParticle>
111 bool operator()(
const TmplParticle &p1,
const TmplParticle &p2)
const
113 return (p1.getId() < p2.getId());
116 bool operator()(
const TmplParticle *p1,
const TmplParticle *p2)
const
118 return (p1->getId() < p2->getId());
122 template <
typename TmplParticle,
typename TmplConnection>
123 template <
typename TmplParticleIterator>
126 TmplParticleIterator it,
130 typedef std::set<Particle *, CmpParticleId<Particle> > ParticleSet;
138 m_nTablePtr->resize(getParticleBBox(), 4.1*getMinRadius(), 2.1*getMaxRadius());
141 typename ParticleSet::const_iterator pIt = pSet.begin();
147 m_nTablePtr->getNeighbourVector(
149 (*pIt)->getRad() + m_maxDist
152 typename NTable::ParticleVector::const_iterator nIt = nVector.begin();
153 nIt != nVector.end();
162 (pSet.find(p1) != pSet.end())
164 (pSet.find(p2) != pSet.end())
170 ((pSet.find(p1)==pSet.end()) && (pSet.find(p2)!= pSet.end()))
172 ((pSet.find(p1)!=pSet.end()) && (pSet.find(p2)== pSet.end()))
177 ((*pIt)->getId() < (*nIt)->getId())
183 ((*pIt)->getId() < (*nIt)->getId())
188 const double radiusSum =
190 const double radiusSumSqrd = radiusSum*radiusSum;
200 <<
"creating connection: \n"
205 createConnection(*p1, *p2, tag);
212 template <
typename TmplParticle,
typename TmplConnection>
213 template <
typename TmplParticleIterator>
216 TmplParticleIterator it
219 create(it, getDefaultTag());
222 template <
typename TmplParticle,
typename TmplConnection>
226 if (p.
getRad() < m_minRadius)
230 if (p.
getRad() > m_maxRadius)
235 m_nTablePtr->insert(p);
237 for (
int i = 0; i < 3; i++)
239 if (!(m_nTablePtr->getPeriodicDimensions()[i]))
253 template <
typename TmplParticle,
typename TmplConnection>
260 template <
typename TmplParticle,
typename TmplConnection>
264 m_defaultTag = defaultTag;
267 template <
typename TmplParticle,
typename TmplConnection>
double getRad() const
Definition: SimpleParticle.hpp:70
Inherited::ParticleVector ParticleVector
Definition: CircularNeighbourTable.h:38
void insert(Particle &p)
Definition: DistConnections.hpp:224
NTable::ParticleConstIterator ParticleConstIterator
Definition: DistConnections.h:76
Console & Debug()
set verbose level of next message to "dbg"
Definition: SimpleSpherePy.h:24
const Vec3 & getPos() const
Definition: SimpleParticle.hpp:30
bool operator()(const TmplParticle *p1, const TmplParticle *p2) const
Definition: DistConnections.hpp:116
Definition: DistConnections.hpp:108
Id getId() const
Definition: SimpleParticleData.hpp:94
NTable::BoolVector BoolVector
Definition: DistConnections.h:79
3D bounding box
Definition: BoundingBox.h:27
Definition: CheckPointable.cpp:16
int Tag
Definition: DistConnections.h:40
DistConnections(double maxDist, Tag defaultTag=0, const BoundingBox &bBox=BoundingBox(Vec3(-10,-10,-10), Vec3(10, 10, 10)), const BoolVector &circDimensions=BoolVector(3, false))
Definition: DistConnections.hpp:22
Definition: DistConnections.h:35
std::string toString(const TmplData &data)
Definition: StringUtil.h:128
boost::object_pool< Connection > ConnectionPool
Definition: DistConnections.h:147
Iterator getIterator() const
Definition: DistConnections.h:135
boost::shared_ptr< NTable > NTablePtr
Definition: DistConnections.h:146
Definition: Contact.h:101
bool operator()(const TmplParticle &p1, const TmplParticle &p2) const
Definition: DistConnections.hpp:111
Vec3 getSizes() const
Definition: BoundingBox.hpp:78
Console console
Definition: console.cpp:25
Definition: CircularNeighbourTable.h:33