Abstract class representing heterogeneous geometry. More...
#include <heterogeometry.hpp>
Public Member Functions | |
CubeHeteroGeometry (double c, const string &m) | |
Constructor from size and file name. More... | |
CubeHeteroGeometry (double c) | |
Constructor from size. More... | |
~CubeHeteroGeometry () | |
Destructor. | |
virtual void | initOctree () |
Initialize new octree (and delete the old one) | |
virtual double | computeVolume () |
Compute volume of cube. | |
double | getCubeSize () |
Getter for cube size. | |
virtual bool | containsParticle (const Aggregate &aggreg) |
Tests if given particle is entirely contained by receiver. More... | |
const string & | getClassName () |
Returns string representation of Sphere class name. | |
void | build (const AggregSizeRandomizer &aggregSizeRandomizer, const ConcreteMixture &concreteMixture, double minRelAggregDist) |
Generate the geometry by take-and-place process. Aggregates has at least guaranteed distance between each other. Do nothing if already built. More... | |
void | build (const AggregSizeRandomizer &aggregSizeRandomizer, const ConcreteMixture &concreteMixture) |
Generate the geometry by take-and-place process. Aggregates do not overlap. Do nothing if already built. More... | |
void | rebuild (const AggregSizeRandomizer &aggregSizeRandomizer, const ConcreteMixture &concreteMixture, double minRelAggregDist) |
Delete already build and re-generate the geometry by take-and-place process. Aggregates has at least guaranteed distance between each other. More... | |
void | rebuild (const AggregSizeRandomizer &aggregSizeRandomizer, const ConcreteMixture &concreteMixture) |
Delete already build and re-generate the geometry by take-and-place process. Aggregates do not overlap. More... | |
const vector< Aggregate * > & | getAggregates () const |
Getter for aggregates (return by const reference) | |
vector< Aggregate * > & | getAggregates () |
Getter for aggregates (return by non-const reference) | |
string | getAggregType () |
Getter for aggregate type (by value) | |
const string & | getAggregType () const |
Getter for aggregate type (by const reference) | |
void | setAggregType (const string &s) |
Setter for aggreg type. | |
Octree< Aggregate * > * | getOctree () |
Getter for octreee (by non-const pointer) | |
const Octree< Aggregate * > * | getOctree () const |
Getter for octreee (by const pointer) | |
string | getFileName () |
Getter for file name. | |
int | getPlaceNumTries () |
Getter for placeNumTries. | |
void | setPlaceNumTries (int v) |
Setter for placeNumTries. | |
bool | check () |
Checks that no particles overlap. More... | |
void | save (const string &fName) const |
Saves receiver to given file. More... | |
void | save () const |
Saves receiver to this->fileName. | |
bool | load (const string &fName) |
Loads receiver from given file. More... | |
bool | load () |
Saves receiver from this->fileName. | |
Static Public Attributes | |
static const string | className = "CubeHeteroGeometry" |
String representation of CubeHeteroGeometry class name. | |
Protected Member Functions | |
Aggregate * | CreateParticle (double size) |
Creates and return new Aggregate particle according to aggregType and given size. More... | |
void | take (const AggregSizeRandomizer &aggregSizeRandomizer, const ConcreteMixture &concreteMixture) |
Creates a random particle. More... | |
bool | place (double minRelAggregDist) |
Places all particles randomly such that they have guaranteed distance between each other and all are entirely contained by the cube. More... | |
bool | place () |
Places all particles randomly such that they do not overlap and all are entirely contained by the cube. More... | |
void | clearAggregates () |
Delete all aggregates. | |
void | saveAggregates (ostream &os) const |
Saves receiver to given ostream. | |
void | loadAggregates (istream &is) |
Loads receiver from given istream. | |
Protected Attributes | |
vector< Aggregate * > | aggregates |
Aggregates container. | |
string | fileName |
File name for saving files. | |
Octree< Aggregate * > * | octree |
Octree (for faster spatial checks) | |
int | placeNumTries |
How many tries of one particle placement is done until error is thrown (default 10000) | |
string | aggregType |
Aggregate type to generate. Currently implemented are "Sphere" and "Ellipsoid". | |
Private Member Functions | |
virtual bool | placeOneParticle (Aggregate &aggreg) |
Places one particle such that it does not overlap with already placed particles and is entirely contained by the cube. More... | |
Private Attributes | |
double | cubeSize |
Cube size of receiver. | |
Friends | |
ostream & | operator<< (ostream &f, const CubeHeteroGeometry &o) |
CubeHeteroGeometry to ostream shift operator. | |
istream & | operator>> (istream &f, CubeHeteroGeometry &o) |
CubeHeteroGeometry from istream shift operator. | |
Abstract class representing heterogeneous geometry.
Contains a list of aggregates and functions for generation
aggregpacking::CubeHeteroGeometry::CubeHeteroGeometry | ( | double | c, |
const string & | m | ||
) |
Constructor from size and file name.
c | cube size |
m | file name |
|
inline |
Constructor from size.
c | cube size |
|
inherited |
Generate the geometry by take-and-place process. Aggregates has at least guaranteed distance between each other. Do nothing if already built.
aggregSizeRandomizer | sieve curve random size generator |
concreteMixture | used concrete mixture |
minRelAggregDist | minimum relative aggregates distance (relatively to the smaller particle) |
|
inlineinherited |
Generate the geometry by take-and-place process. Aggregates do not overlap. Do nothing if already built.
aggregSizeRandomizer | sieve curve random size generator |
concreteMixture | used concrete mixture |
|
inherited |
Checks that no particles overlap.
|
virtual |
Tests if given particle is entirely contained by receiver.
aggreg | given particle |
Implements aggregpacking::HeteroGeometry.
|
protectedinherited |
|
inlineinherited |
Loads receiver from given file.
fName | file name |
|
protectedinherited |
Places all particles randomly such that they have guaranteed distance between each other and all are entirely contained by the cube.
minRelAggregDist | minimal distance between particles, relative to the smaller particle from each pair. I.e., the distance is at least (1.+minRelAggregDist)*sizeOfSmallerParticle |
|
inlineprotectedinherited |
Places all particles randomly such that they do not overlap and all are entirely contained by the cube.
|
privatevirtual |
Places one particle such that it does not overlap with already placed particles and is entirely contained by the cube.
aggreg | given particle |
Implements aggregpacking::HeteroGeometry.
|
inherited |
Delete already build and re-generate the geometry by take-and-place process. Aggregates has at least guaranteed distance between each other.
aggregSizeRandomizer | sieve curve random size generator |
concreteMixture | used concrete mixture |
minRelAggregDist | minimum relative aggregates distance (relatively to the smaller particle) |
|
inlineinherited |
Delete already build and re-generate the geometry by take-and-place process. Aggregates do not overlap.
aggregSizeRandomizer | sieve curve random size generator |
concreteMixture | used concrete mixture |
|
inlineinherited |
Saves receiver to given file.
fName | file name |
|
protectedinherited |
Creates a random particle.
aggregSizeRandomizer | sieve curve random size generator |
concreteMixture | used concrete mixture |