1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
/////////////////////////////////////////////////////////////
// //
// Copyright (c) 2003-2011 by The University of Queensland //
// Earth Systems Science Computational Centre (ESSCC) //
// http://www.uq.edu.au/esscc //
// //
// Primary Business: Brisbane, Queensland, Australia //
// Licensed under the Open Software License version 3.0 //
// http://www.opensource.org/licenses/osl-3.0.php //
// //
/////////////////////////////////////////////////////////////
#ifndef __ARANDOMASSEMBLY2D_H
#define __ARANDOMASSEMBLY2D_H
//-- project includes --
#include "Geometry/SimpleParticle.h"
#include "Geometry/BasicInteraction.h"
#include "Geometry/SimpleNTable.h"
#include "Geometry/Sphere2d.h"
#include "Geometry/Line.h"
//-- STL includes --
#include <vector>
#include <set>
using std::set;
using std::vector;
//--- IO includes ---
#include <iostream>
/*!
\class ARandomAssembly
\brief Abstract base class for random assemblies, to be used for initialization of random lattices.
\author Steffen Abe
$Revision$
$Date$
*/
class ARandomAssembly
{
protected:
ASimpleNTable *m_snt;
static double m_small_value;
set<BasicInteraction,BILess> m_iset;
vector<SimpleParticle> m_bpart;
double m_random(double,double);
vector<SimpleParticle> getNeighborList(const SimpleParticle&);
vector<SimpleParticle> get3ClosestNeighbors(const SimpleParticle&, const vector<SimpleParticle>&);
vector<SimpleParticle> getClosestNeighbors(const SimpleParticle&, int);
SimpleParticle getClosestParticle(const SimpleParticle&, const vector<SimpleParticle>&);
public:
virtual ~ARandomAssembly()
{
}
virtual void generate(int,unsigned int)=0;
virtual void insertParticle(const SimpleParticle)=0;
virtual void tagParticleClosestTo(const Vec3&,int)=0;
virtual void tagEdgeY(int,int,double)=0;
virtual void tagEdgeZ(int,int,double)=0;
virtual void tagSplit(int,int,double){std::cout <<"ARA::tagSplit" << std::endl;};
virtual void writeToGeoFile(const string&)=0;
virtual void writeToVtkFile(const string&); //{std::cerr << "writeToVtkFile not implemented" << std::endl;}; // empty default implementation
virtual double calcPorosity()=0;
virtual vector<pair<double,double> > getSizeDistribution(int)=0;
};
#endif // __ARANDOMASSEMBLY2D_H
|