mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-19 08:53:08 +05:00
PR: debug generate flat elements
This commit is contained in:
parent
d2dabee708
commit
8c9a971309
@ -314,8 +314,8 @@ int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId)
|
||||
{
|
||||
if((vtkCellId < 0) || (vtkCellId >= _cellIdToDownId.size()))
|
||||
{
|
||||
std::cerr << "SMDS_UnstructuredGrid::CellIdToDownId problem vtkCellId="
|
||||
<< vtkCellId << " max="<< _cellIdToDownId.size() << std::endl;
|
||||
//MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId="
|
||||
// << vtkCellId << " max="<< _cellIdToDownId.size());
|
||||
return -1;
|
||||
}
|
||||
return _cellIdToDownId[vtkCellId];
|
||||
@ -768,6 +768,11 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int vtkId)
|
||||
if (dim == 1)
|
||||
{
|
||||
int downId = this->CellIdToDownId(vtkId);
|
||||
if (downId < 0)
|
||||
{
|
||||
MESSAGE("Downward structure not up to date: new edge not taken into account");
|
||||
return 0;
|
||||
}
|
||||
nbFaces = _downArray[vtkType]->getNumberOfUpCells(downId);
|
||||
const int *upCells = _downArray[vtkType]->getUpCells(downId);
|
||||
const unsigned char* upTypes = _downArray[vtkType]->getUpTypes(downId);
|
||||
@ -783,7 +788,13 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int vtkId)
|
||||
nbFaces = 1;
|
||||
faces[0] = vtkId;
|
||||
cellTypes[0] = this->GetCellType(vtkId);
|
||||
downCellId[0] = this->CellIdToDownId(vtkId);
|
||||
int downId = this->CellIdToDownId(vtkId);
|
||||
if (downId < 0)
|
||||
{
|
||||
MESSAGE("Downward structure not up to date: new face not taken into account");
|
||||
return 0;
|
||||
}
|
||||
downCellId[0] = downId;
|
||||
}
|
||||
|
||||
int nbvol =0;
|
||||
|
@ -10969,7 +10969,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
int vtkType = grid->GetCellType(vtkId);
|
||||
int downId = grid->CellIdToDownId(vtkId);
|
||||
if (downId < 0)
|
||||
continue;
|
||||
{
|
||||
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;
|
||||
@ -11047,6 +11051,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
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
|
||||
@ -11212,6 +11221,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
}
|
||||
else
|
||||
{
|
||||
//MESSAGE("Quadratic multiple joints not implemented");
|
||||
// TODO quadratic nodes
|
||||
}
|
||||
}
|
||||
@ -11241,7 +11251,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
int vtkType = grid->GetCellType(vtkId);
|
||||
int downId = grid->CellIdToDownId(vtkId);
|
||||
if (downId < 0)
|
||||
continue;
|
||||
continue; // new cells: not to be modified
|
||||
DownIdType aCell(downId, vtkType);
|
||||
int volParents[1000];
|
||||
int nbvol = grid->GetParentVolumes(volParents, vtkId);
|
||||
|
Loading…
Reference in New Issue
Block a user