47 std::vector<unsigned int> matchingGroups;
48 std::vector<unsigned int> finalPolyList;
56 for (
unsigned int i = 0; i < pstats.
groupData.size(); i++) {
62 matchingGroups.push_back(i+1);
67 matchingGroups.push_back(i+1);
76 unsigned int largestGroup = matchingGroups[0];
77 for (
unsigned int i = 0; i < matchingGroups.size(); i++) {
79 if (largestGroup < pstats.
groupData[matchingGroups[i]-1].size){
80 largestGroup = matchingGroups[i];
84 matchingGroups.clear();
85 matchingGroups.push_back(largestGroup);
89 for (
unsigned int i = 0; i < matchingGroups.size(); i++){
90 for (
unsigned int k = 0; k < pstats.
fractGroup.size(); k++){
91 if (matchingGroups[i] == pstats.
fractGroup[k].groupNum) {
94 for (
unsigned int j = 0; j < pstats.
fractGroup[k].polyList.size(); j++){
95 finalPolyList.push_back(pstats.
fractGroup[k].polyList[j]);
100 return finalPolyList;
116 for (
int i = 0; i < 6; i++) {
118 if (facesOption[i] == 1){
119 if ((facesOption[i] & faces[i]) == 0) {
145 pstats.
groupData.push_back(newGroupData);
149 newGroup.
polyList.push_back(newPolyIndex);
192 void updateGroups(
Poly &newPoly, std::vector<Poly> &acceptedPoly, std::vector<unsigned int> &encounteredGroups,
Stats &pstats,
int newPolyIndex) {
194 if (encounteredGroups.size() == 0) {
213 std::cout<<
"ERROR: Group not found (computationalGeometry.cpp)\n";
217 pstats.
fractGroup[i].polyList.push_back(newPolyIndex);
231 pstats.
fractGroup[k].polyList.push_back(newPolyIndex);
238 for (
unsigned int i = 0; i < encounteredGroups.size(); i++) {
240 if (pstats.
groupData[encounteredGroups[i]-1].valid == 1) {
245 pstats.
groupData[encounteredGroups[i]-1].valid = 0;
248 for (
unsigned int jj = 0; jj < pstats.
fractGroup.size(); jj++) {
249 if (pstats.
fractGroup[jj].groupNum == encounteredGroups[i]) {
253 for (
unsigned int z = 0; z < pstats.
fractGroup[jj].polyList.size(); z++) {
std::vector< unsigned int > polyList
void assignGroup(Poly &newPoly, Stats &pstats, int newPolyIndex)
std::vector< struct FractureGroups > fractGroup
unsigned long long int groupNum
void updateGroups(Poly &newPoly, std::vector< Poly > &acceptedPoly, std::vector< unsigned int > &encounteredGroups, Stats &pstats, int newPolyIndex)
void OR(bool *dest, bool *src)
std::vector< unsigned int > getCluster(Stats &pstats)
bool facesMatch(bool *facesOption, bool *faces)
std::vector< struct GroupData > groupData
unsigned long long int nextGroupNum