36 #ifndef VORONOIVERTEXMESHGENERATOR_HPP_ 37 #define VORONOIVERTEXMESHGENERATOR_HPP_ 42 #include "MutableVertexMesh.hpp" 43 #include "Toroidal2dVertexMesh.hpp" 44 #include "RandomNumberGenerator.hpp" 46 #include <boost/version.hpp> 48 #if BOOST_VERSION >= 105200 49 #include "boost/polygon/voronoi.hpp" 59 friend class TestVoronoiVertexMeshGenerator;
70 unsigned mNumElementsX;
73 unsigned mNumElementsY;
76 unsigned mTotalNumElements;
79 unsigned mNumRelaxationSteps;
82 unsigned mMaxNumElems;
91 double mElementTargetArea;
94 double mMultiplierInX;
97 double mMultiplierInY;
100 double mSamplingMultiplier;
110 unsigned mMaxExpectedNumSidesPerPolygon;
121 std::vector<c_vector<double, 2> > GetInitialPointLocations();
128 std::vector<c_vector<double, 2> > GetElementCentroidsFromMesh();
140 void CreateVoronoiTessellation(std::vector<c_vector<double, 2> >& rSeedLocations);
147 void ValidateInputAndSetMembers();
158 void ValidateSeedLocations(std::vector<c_vector<double, 2> >& rSeedLocations);
184 unsigned numElementsY,
185 unsigned numRelaxationSteps,
186 double elementTargetArea=1.0);
204 void GenerateVoronoiMesh();
224 std::vector<double> GetPolygonDistribution();
232 double GetAreaCoefficientOfVariation();
239 void RefreshSeedsAndRegenerateMesh();
246 void SetMaxExpectedNumSidesPerPolygon(
unsigned maxExpectedNumSidesPerPolygon);
251 unsigned GetMaxExpectedNumSidesPerPolygon();
254 #endif // BOOST_VERSION >= 105200 256 #if BOOST_VERSION < 105200 272 #endif // BOOST_VERSION < 105200
VoronoiVertexMeshGenerator()