SpherePackingScenarioGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
algorithms::HardspherePosition Class Reference

#include <HardspherePosition.h>

Collaboration diagram for algorithms::HardspherePosition:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void AddGhostSphere (double x, double y, double z)
double GetLength ()
double GetNumber ()
void GetPosition ()
double * GetPositionsAsArray ()
double GetPositionX (int k)
double GetPositionY (int k)
double GetPositionZ (int k)
double GetRadius ()
void GhostSphere (std::string filename)
 HardspherePosition ()
void Print ()
void Randomsphere (std::string filename)
void Regularsphere (regularpacking::RegularPacking Packing)
virtual ~HardspherePosition ()

Private Attributes

std::vector< double > _positionx
std::vector< double > _positiony
std::vector< double > _positionz
std::vector< double > _sphereCoordinateVector
double length
std::string line
double radius

Detailed Description

Class HardspherePosition Get the position of sphere through Regualar algorithms and irregualar algorithms


Constructor & Destructor Documentation

Constructor

Destructor


Member Function Documentation

void algorithms::HardspherePosition::AddGhostSphere ( double  x,
double  y,
double  z 
)

Add the Ghost Sphere

Parameters:
xthe position of the new sphere in x axle
ythe position of the new sphere in y axle
zthe position of the new sphere in z axle

Gets the length of domain

Returns:
the length of domain

Gets the number of spheres

Returns:
the number of spheres

Gets the position of spheres in the format of x1,y1,z1,r1,x2,y2,z2,r2......

Pass the Array of position of spheres

Returns:
the pointer of Array of position of spheres

Gets the position x axle for certain sphere

Parameters:
kthe number of certain sphere
Returns:
the position of x axle

Gets the position y axle for certain sphere

Parameters:
kthe number of certain sphere
Returns:
the position of y axle

Gets the position z axle for certain sphere

Parameters:
kthe number of certain sphere
Returns:
the position of z axle

Gets the radius of sphere

Returns:
the radius of sphere
void algorithms::HardspherePosition::GhostSphere ( std::string  filename)

Get the position of GhostSphere and append to the file

The algorithm to generate GhostSphere:

All three of x,y,z has has five intervals,0~sqrt(2)/2*r,sqrt(2)/2*r~r,r~l-r,

l-r~l-sqrt(2)/2*r,l-sqrt(2)/2*r~l

There are several typical situation:

1. sphere was located in (r~l-r,r~l-r,r~l-r) no ghost sphere 0.15-0.85 0-0.1 0.1-0.15 in the case of r=0.15, l=1 2. sphere was located in (0~r,r~l-r,r~l-r) one ghost sphere

3. sphere was located in (0~r,sqrt(2)/2*r~r,r~l-r) two ghost sphere

4. sphere was located in (0~sqrt(2)/2*r,0~sqrt(2)/2*r,r~l-r) three ghost sphere

5. sphere was located in (0~r,sqrt(2)/2*r~r,sqrt(2)/2*r~r) three ghost sphere

6. sphere was located in (0~sqrt(2)/2*r,0~sqrt(2)/2*r,sqrt(2)/2*r~r) four ghost sphere

7. sphere was located in (1/2*r~sqrt(2)/2*r,1/2*r~sqrt(2)/2*r,1/2*r~sqrt(2)/2*r) six ghost sphere

8. sphere was located in (0~1/2*r,1/2*r~sqrt(2)/2*r,1/2*r~sqrt(2)/2*r) seven ghost sphere

Parameters:
filenamethe file contain the positions of spheres

Print the position of sphere in the special format

void algorithms::HardspherePosition::Randomsphere ( std::string  filename)

Get the position of Randomsphere which are generated with LS algorithms

Parameters:
filenamethe file contain the positions of spheres

Get the position of Regualrsphere which are generated with RegualrPacking algorithms

Parameters:
Packingthe new list of spheres

Member Data Documentation

std::vector<double> algorithms::HardspherePosition::_positionx [private]
std::vector<double> algorithms::HardspherePosition::_positiony [private]
std::vector<double> algorithms::HardspherePosition::_positionz [private]
std::string algorithms::HardspherePosition::line [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines