continue;
int vtkType = grid->GetCellType(vtkId);
int downId = grid->CellIdToDownId(vtkId);
+ if (downId < 0)
+ {
+ MESSAGE("doubleNodesOnGroupBoundaries: internal algorithm problem");
+ continue; // not OK at this stage of the algorithm:
+ //no cells created after BuildDownWardConnectivity
+ }
DownIdType aCell(downId, vtkType);
if (celldom.count(vtkId))
continue;
nodeDomains[oldId][idom] = newId; // cloned node for other domains
//MESSAGE(" newNode " << newId << " oldNode " << oldId << " size=" <<nodeDomains[oldId].size());
}
+ if (nodeDomains[oldId].size() >= 3)
+ {
+ //MESSAGE("confirm multiple node " << oldId);
+ isMultipleDetected =true;
+ }
}
}
if (isMultipleDetected) // check if an edge of the face is shared between 3 or more domains
SMDS_MeshVolume *vol = grid->extrudeVolumeFromFace(vtkVolId, dom1, dom2, oldNodes, nodeDomains,
nodeQuadDomains);
stringstream grpname;
- grpname << "junction_";
+ grpname << "j_";
if (dom1 < dom2)
grpname << dom1 << "_" << dom2;
else
SMDS_MeshVolume* vol = this->GetMeshDS()->AddVolumeFromVtkIds(orderedNodes);
stringstream grpname;
- grpname << "junction_";
+ grpname << "mj_";
grpname << 0 << "_" << 0;
int idg;
string namegrp = grpname.str();
}
else
{
+ //MESSAGE("Quadratic multiple joints not implemented");
// TODO quadratic nodes
}
}
int vtkId = l.cells[i];
int vtkType = grid->GetCellType(vtkId);
int downId = grid->CellIdToDownId(vtkId);
+ if (downId < 0)
+ continue; // new cells: not to be modified
DownIdType aCell(downId, vtkType);
int volParents[1000];
int nbvol = grid->GetParentVolumes(volParents, vtkId);
std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> intermediateNodes;
clonedNodes.clear();
intermediateNodes.clear();
+ std::map<std::string, SMESH_Group*> mapOfJunctionGroups;
+ mapOfJunctionGroups.clear();
for (int idom = 0; idom < theElems.size(); idom++)
{
break;
}
+ if (vol)
+ {
+ stringstream grpname;
+ grpname << "jf_";
+ grpname << idom;
+ int idg;
+ string namegrp = grpname.str();
+ if (!mapOfJunctionGroups.count(namegrp))
+ mapOfJunctionGroups[namegrp] = this->myMesh->AddGroup(SMDSAbs_Volume, namegrp.c_str(), idg);
+ SMESHDS_Group *sgrp = dynamic_cast<SMESHDS_Group*>(mapOfJunctionGroups[namegrp]->GetGroupDS());
+ if (sgrp)
+ sgrp->Add(vol->GetID());
+ }
+
// --- modify the face
aFace->ChangeNodes(&ln[0], ln.size());