mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 02:30:33 +05:00
PR: tools for crack meshing
This commit is contained in:
parent
fc3530a171
commit
1f2c6e16a4
@ -763,7 +763,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges)
|
||||
* @param vtkId the vtk id of the cell
|
||||
* @return number of neighbors
|
||||
*/
|
||||
int SMDS_UnstructuredGrid::GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId)
|
||||
int SMDS_UnstructuredGrid::GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId, bool getSkin)
|
||||
{
|
||||
int vtkType = this->GetCellType(vtkId);
|
||||
int cellDim = SMDS_Downward::getCellDimension(vtkType);
|
||||
@ -798,9 +798,27 @@ int SMDS_UnstructuredGrid::GetNeighbors(int* neighborsVtkIds, int* downIds, unsi
|
||||
downIds[nb] = downId;
|
||||
downTypes[nb] = cellType;
|
||||
nb++;
|
||||
if (nb >= NBMAXNEIGHBORS)
|
||||
{
|
||||
INFOS("SMDS_UnstructuredGrid::GetNeighbors problem: NBMAXNEIGHBORS=" <<NBMAXNEIGHBORS << " not enough");
|
||||
return nb;
|
||||
}
|
||||
}
|
||||
if (getSkin)
|
||||
{
|
||||
if (cellDim == 3 && nbUp == 1) // this face is on the skin of the volume
|
||||
{
|
||||
neighborsVtkIds[nb] = _downArray[cellType]->getVtkCellId(downId); // OK if skin present
|
||||
downIds[nb] = downId;
|
||||
downTypes[nb] = cellType;
|
||||
nb++;
|
||||
if (nb >= NBMAXNEIGHBORS)
|
||||
{
|
||||
INFOS("SMDS_UnstructuredGrid::GetNeighbors problem: NBMAXNEIGHBORS=" <<NBMAXNEIGHBORS << " not enough");
|
||||
return nb;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nb >= NBMAXNEIGHBORS)
|
||||
assert(0);
|
||||
}
|
||||
return nb;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
void setCellIdToDownId(int vtkCellId, int downId);
|
||||
void CleanDownwardConnectivity();
|
||||
void BuildDownwardConnectivity(bool withEdges);
|
||||
int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId);
|
||||
int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId, bool getSkin=false);
|
||||
int GetParentVolumes(int* volVtkIds, int vtkId);
|
||||
int GetParentVolumes(int* volVtkIds, int downId, unsigned char downType);
|
||||
void GetNodeIds(std::set<int>& nodeSet, int downId, unsigned char downType);
|
||||
|
Loading…
Reference in New Issue
Block a user