GenGeo  1.1
CircMNTable2D Class Reference

circular 2D Multi-group Neighbour table More...

#include <CircMNTable2D.h>

Inheritance diagram for CircMNTable2D:
Collaboration diagram for CircMNTable2D:

Public Member Functions

 CircMNTable2D ()
 CircMNTable2D (const Vector3 &, const Vector3 &, double, unsigned int)
virtual ~CircMNTable2D ()
virtual bool insert (const Sphere &, unsigned int)
virtual bool insertChecked (const Sphere &, unsigned int, double tol=s_small_value)
virtual bool checkInsertable (const Sphere &, unsigned int)
virtual void generateBonds (int, double, int)
virtual void generateBondsWithMask (int, double, int, int, int)
- Public Member Functions inherited from MNTable2D
 MNTable2D ()
 MNTable2D (const Vector3 &, const Vector3 &, double, unsigned int)
virtual ~MNTable2D ()
void GrowNGroups (unsigned int)
const multimap< double, const
Sphere * > 
getSpheresClosestTo (const Vector3 &, unsigned int) const
const multimap< double, const
Sphere * > 
getSpheresFromGroupNear (const Vector3 &, double, int) const
const vector< const Sphere * > getAllSpheresFromGroup (int) const
const SpheregetClosestSphereFromGroup (const Sphere &, int) const
SpheregetClosestSphereFromGroup (const Vector3 &, int) const
int getTagOfClosestSphereFromGroup (const Sphere &, int) const
void tagParticlesAlongLine (const Line2D &, double, int, unsigned int)
void tagParticlesAlongLineWithMask (const Line2D &, double, int, int, unsigned int)
void tagParticlesAlongLineSegment (const LineSegment2D &, double, int, int, unsigned int)
void tagParticlesNear (const Vector3 &, double, int, int)
void tagClosestParticle (const Vector3 &, int, int)
void tagParticlesToClosest (int, int)
void tagParticlesInVolume (const AVolume &, int, unsigned int)
boost::python::list getSphereListFromGroup (int) const
boost::python::list getBondList (int)
virtual void generateRandomBonds (int, double, double, int, int, int)
virtual void generateClusterBonds (int, double, int, int)
virtual void generateBondsTaggedMasked (int, double, int, int, int, int, int)
void insertBond (int, int, int)
void breakBondsAlongLineSegment (const LineSegment2D &, double, int, unsigned int)
void removeTagged (int, int, int)
double getSumVolume (int)
int getNrParticles (int)
void SetOutputPrecision (int)
void write (char *filename, int outputStyle)

Protected Member Functions

virtual void set_x_circ ()
virtual int getIndex (const Vector3 &) const
int getXIndex (const Vector3 &) const
int getYIndex (const Vector3 &) const
int getFullIndex (const Vector3 &) const
- Protected Member Functions inherited from MNTable2D
int idx (int i, int j) const
void WriteAsVtkXml (ostream &) const

Protected Attributes

Vector3 m_shift_vec_x
- Protected Attributes inherited from MNTable2D
MNTCellm_data
map< int, set< pair< int, int > > > m_bonds
double m_x0
double m_y0
 origin
double m_celldim
 cell size
int m_nx
int m_ny
 number of cells in x- and y-direction
unsigned int m_ngroups
int m_x_periodic
int m_y_periodic
int m_write_prec
 precision (nr. of significant digits) for file output

Friends

ostream & operator<< (ostream &, const CircMNTable2D &)

Additional Inherited Members

- Public Types inherited from MNTable2D
typedef pair< int, int > bond
- Static Public Member Functions inherited from MNTable2D
static void SetOutputStyle (int)
- Static Protected Attributes inherited from MNTable2D
static int s_output_style = 0
static double s_small_value = 1e-7

Detailed Description

circular 2D Multi-group Neighbour table

Neighbour table supporting multiple tagged groups of particles and circular boundary conditions (x only at the moment)

Constructor & Destructor Documentation

CircMNTable2D::CircMNTable2D ( )
CircMNTable2D::CircMNTable2D ( const Vector3 MinPt,
const Vector3 MaxPt,
double  cd,
unsigned int  ngroups 
)

Construct CircMNTable2D.

Parameters
MinPtminimum point (z component ignored)
MaxPtmaximum point (z component ignored)
cdcell dimension
ngroupsinitial number of particle groups

References MNTable2D::m_celldim, MNTable2D::m_nx, m_shift_vec_x, and set_x_circ().

Here is the call graph for this function:

CircMNTable2D::~CircMNTable2D ( )
virtual

Destruct CircMNTable2D. Just calls MNTable2D destructor.

Member Function Documentation

bool CircMNTable2D::checkInsertable ( const Sphere S,
unsigned int  gid 
)
virtual

insert sphere if it doesn't collide with other spheres

Parameters
Sthe Sphere
gidthe group id

Reimplemented from MNTable2D.

Reimplemented in CircMNTableXY2D.

References Sphere::Center(), getIndex(), MNTable2D::getSpheresFromGroupNear(), getXIndex(), MNTable2D::idx(), MNTable2D::m_ngroups, MNTable2D::m_nx, Sphere::Radius(), and MNTable2D::s_small_value.

Here is the call graph for this function:

void CircMNTable2D::generateBonds ( int  gid,
double  tol,
int  btag 
)
virtual

Generate bonds between particles of a group. Takes cloned particles into account.

Parameters
gidthe group ID
tolmax. difference between bond length and equilibrium dist.
btagbond tag

Reimplemented from MNTable2D.

Reimplemented in CircMNTableXY2D.

References MNTCell::getBonds(), MNTable2D::idx(), MNTable2D::m_bonds, MNTable2D::m_data, MNTable2D::m_nx, and MNTable2D::m_ny.

Referenced by exportCircMNTable2D(), and main().

Here is the call graph for this function:

void CircMNTable2D::generateBondsWithMask ( int  gid,
double  tol,
int  btag,
int  ptag,
int  mask 
)
virtual

Generate bonds between particles of a group with identical particle tag. Takes cloned particles into account.

Parameters
gidthe group ID
tolmax. difference between bond length and equilibrium dist.
btagbond tag
ptagthe particle tag
maskthe mask for the particle tag

Reimplemented from MNTable2D.

References MNTCell::getBonds(), MNTable2D::idx(), MNTable2D::m_bonds, MNTable2D::m_data, MNTable2D::m_nx, and MNTable2D::m_ny.

Here is the call graph for this function:

int CircMNTable2D::getFullIndex ( const Vector3 Pos) const
protected
int CircMNTable2D::getIndex ( const Vector3 Pos) const
protectedvirtual

get the cell index for a given position

Parameters
Posthe position
Returns
the cell index if Pos is inside the table, -1 otherwise

Reimplemented from MNTable2D.

Reimplemented in CircMNTableXY2D.

References MNTable2D::idx(), MNTable2D::m_celldim, MNTable2D::m_nx, MNTable2D::m_ny, MNTable2D::m_x0, MNTable2D::m_y0, Vector3::x(), and Vector3::y().

Referenced by checkInsertable(), insert(), and insertChecked().

Here is the call graph for this function:

int CircMNTable2D::getXIndex ( const Vector3 Pos) const
protected
int CircMNTable2D::getYIndex ( const Vector3 Pos) const
protected
bool CircMNTable2D::insert ( const Sphere S,
unsigned int  gid 
)
virtual

Insert sphere. Insert clone into other side of Table.

Parameters
Sthe Sphere
gidthe group id

Reimplemented from MNTable2D.

Reimplemented in CircMNTableXY2D.

References Sphere::Center(), getFullIndex(), getIndex(), getXIndex(), MNTable2D::idx(), MNTCell::insert(), MNTable2D::m_data, MNTable2D::m_ngroups, MNTable2D::m_nx, m_shift_vec_x, and Sphere::shift().

Here is the call graph for this function:

bool CircMNTable2D::insertChecked ( const Sphere S,
unsigned int  gid,
double  tol = s_small_value 
)
virtual

Insert sphere if it doesn't collide with other spheres. Insert clone into other side of Table.

Parameters
Sthe Sphere
gidthe group id

Reimplemented from MNTable2D.

Reimplemented in CircMNTableXY2D.

References Sphere::Center(), getFullIndex(), getIndex(), MNTable2D::getSpheresFromGroupNear(), getXIndex(), MNTable2D::idx(), MNTCell::insert(), MNTable2D::m_data, MNTable2D::m_ngroups, MNTable2D::m_nx, m_shift_vec_x, Sphere::Radius(), MNTable2D::s_small_value, and Sphere::shift().

Here is the call graph for this function:

void CircMNTable2D::set_x_circ ( )
protectedvirtual

set circularity of x-dimension to 1

References MNTable2D::m_x_periodic.

Referenced by CircMNTable2D().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  ost,
const CircMNTable2D T 
)
friend

Output the content of a MNTable2D to an ostream. The output format depends on the value of MNTable2D::s_output_style (see MNTable2D::SetOutputStyle). If it is set to 0, output suitable for debugging is generated, if it is set to 1 output in the esys .geo format is generated. If MNTable2D::s_output_style is set to 2, the output format is VTK-XML.

Parameters
ostthe output stream
Tthe table

Member Data Documentation

Vector3 CircMNTable2D::m_shift_vec_x
protected

The documentation for this class was generated from the following files: