mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
parent
d5aa4efde2
commit
882ff39283
@ -70,7 +70,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||
SCRUTE(nb_of_volumes);
|
||||
|
||||
//fprintf(stdout, "%d %d\n", nbNodes, nbCells);
|
||||
fprintf(aFileId, "%ld %ld\n", nbNodes, nbCells);
|
||||
fprintf(aFileId, "%ld %ld\n", nbNodes, static_cast< long >( nbCells ));
|
||||
|
||||
/****************************************************************************
|
||||
* ECRITURE DES NOEUDS *
|
||||
@ -107,7 +107,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||
smIdType nodeID = it->next()->GetID();
|
||||
if ( !nodeNumByID.empty() )
|
||||
nodeID = nodeNumByID[ nodeID ];
|
||||
fprintf(aFileId, "%ld ", nodeID );
|
||||
fprintf(aFileId, "%ld ", static_cast< long >( nodeID ));
|
||||
}
|
||||
fprintf(aFileId, "\n");
|
||||
}
|
||||
@ -123,7 +123,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||
smIdType nodeID = it->next()->GetID();
|
||||
if ( !nodeNumByID.empty() )
|
||||
nodeID = nodeNumByID[ nodeID ];
|
||||
fprintf(aFileId, "%ld ", nodeID );
|
||||
fprintf(aFileId, "%ld ", static_cast< long >( nodeID ));
|
||||
}
|
||||
fprintf(aFileId, "\n");
|
||||
}
|
||||
@ -158,7 +158,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||
smIdType nodeID = it->next()->GetID();
|
||||
if ( !nodeNumByID.empty() )
|
||||
nodeID = nodeNumByID[ nodeID ];
|
||||
fprintf(aFileId, "%ld ", nodeID );
|
||||
fprintf(aFileId, "%ld ", static_cast< long >( nodeID ));
|
||||
}
|
||||
|
||||
fprintf(aFileId, "\n");
|
||||
|
@ -11110,13 +11110,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
std::map<int,int> celldom; // cell vtkId --> domain
|
||||
std::map<DownIdType, std::map<int,int>, DownIdCompare> cellDomains; // oldNode --> (id domain --> id cell)
|
||||
std::map<int, std::map<int,int> > nodeDomains; // oldId --> (domainId --> newId)
|
||||
faceDomains.clear();
|
||||
celldom.clear();
|
||||
cellDomains.clear();
|
||||
nodeDomains.clear();
|
||||
std::map<int,int> emptyMap;
|
||||
std::set<int> emptySet;
|
||||
emptyMap.clear();
|
||||
|
||||
//MESSAGE(".. Number of domains :"<<theElems.size());
|
||||
|
||||
@ -11226,7 +11219,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
DownIdType face = itface->first;
|
||||
//MESSAGE(" --- face " << face.cellId);
|
||||
std::set<int> oldNodes;
|
||||
oldNodes.clear();
|
||||
grid->GetNodeIds(oldNodes, face.cellId, face.cellType);
|
||||
std::set<int>::iterator itn = oldNodes.begin();
|
||||
for (; itn != oldNodes.end(); ++itn)
|
||||
@ -11281,7 +11273,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
DownIdType face = itface->first;
|
||||
//MESSAGE(" --- face " << face.cellId);
|
||||
std::set<int> oldNodes;
|
||||
oldNodes.clear();
|
||||
grid->GetNodeIds(oldNodes, face.cellId, face.cellType);
|
||||
std::set<int>::iterator itn = oldNodes.begin();
|
||||
for (; itn != oldNodes.end(); ++itn)
|
||||
@ -11342,7 +11333,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
DownIdType face = itface->first;
|
||||
//MESSAGE(" --- face " << face.cellId);
|
||||
std::set<int> oldNodes;
|
||||
oldNodes.clear();
|
||||
grid->GetNodeIds(oldNodes, face.cellId, face.cellType);
|
||||
int nbMultipleNodes = 0;
|
||||
std::set<int>::iterator itn = oldNodes.begin();
|
||||
@ -11482,7 +11472,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
DownIdType face = itface->first;
|
||||
std::set<int> oldNodes;
|
||||
std::set<int>::iterator itn;
|
||||
oldNodes.clear();
|
||||
grid->GetNodeIds(oldNodes, face.cellId, face.cellType);
|
||||
|
||||
std::map<int, int> domvol = itface->second;
|
||||
@ -11584,10 +11573,9 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
|
||||
std::map<DownIdType, std::map<int,int>, DownIdCompare> faceOrEdgeDom; // cellToModify --> (id domain --> id cell)
|
||||
std::map<int,int> feDom; // vtk id of cell to modify --> id domain
|
||||
faceOrEdgeDom.clear();
|
||||
feDom.clear();
|
||||
|
||||
//MESSAGE(".. Modification of elements");
|
||||
SMDSAbs_ElementType domainType = (*theElems[0].begin())->GetType();
|
||||
for (int idomain = idom0; idomain < nbDomains; idomain++)
|
||||
{
|
||||
std::map<int, std::map<int, int> >::const_iterator itnod = nodeDomains.begin();
|
||||
@ -11605,13 +11593,29 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
continue; // new cells: not to be modified
|
||||
DownIdType aCell(downId, vtkType);
|
||||
int volParents[1000];
|
||||
int nbvol = grid->GetParentVolumes(volParents, vtkId);
|
||||
int nbvol = 0;
|
||||
nbvol = grid->GetParentVolumes(volParents, vtkId);
|
||||
if ( domainType == SMDSAbs_Volume )
|
||||
{
|
||||
nbvol = grid->GetParentVolumes(volParents, vtkId);
|
||||
}
|
||||
else // domainType == SMDSAbs_Face
|
||||
{
|
||||
const int nbFaces = grid->getDownArray(vtkType)->getNumberOfUpCells(downId);
|
||||
const int *upCells = grid->getDownArray(vtkType)->getUpCells(downId);
|
||||
const unsigned char* upTypes = grid->getDownArray(vtkType)->getUpTypes(downId);
|
||||
for (int i=0; i< nbFaces; i++)
|
||||
{
|
||||
int vtkFaceId = grid->getDownArray( upTypes[i] )->getVtkCellId(upCells[i]);
|
||||
if (vtkFaceId >= 0)
|
||||
volParents[nbvol++] = vtkFaceId;
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < nbvol; j++)
|
||||
if (celldom.count(volParents[j]) && (celldom[volParents[j]] == idomain))
|
||||
if (!feDom.count(vtkId))
|
||||
{
|
||||
feDom[vtkId] = idomain;
|
||||
faceOrEdgeDom[aCell] = emptyMap;
|
||||
faceOrEdgeDom[aCell][idomain] = vtkId; // affect face or edge to the first domain only
|
||||
//MESSAGE("affect cell " << this->GetMeshDS()->FromVtkToSmds(vtkId) << " domain " << idomain
|
||||
// << " type " << vtkType << " downId " << downId);
|
||||
@ -11634,7 +11638,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
DownIdType face = itface->first;
|
||||
std::set<int> oldNodes;
|
||||
std::set<int>::iterator itn;
|
||||
oldNodes.clear();
|
||||
grid->GetNodeIds(oldNodes, face.cellId, face.cellType);
|
||||
//MESSAGE("examine cell, downId " << face.cellId << " type " << int(face.cellType));
|
||||
std::map<int, int> localClonedNodeIds;
|
||||
@ -11701,10 +11704,7 @@ bool SMESH_MeshEditor::CreateFlatElementsOnFacesGroups(const std::vector<TIDSort
|
||||
|
||||
std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> clonedNodes;
|
||||
std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> intermediateNodes;
|
||||
clonedNodes.clear();
|
||||
intermediateNodes.clear();
|
||||
std::map<std::string, SMESH_Group*> mapOfJunctionGroups;
|
||||
mapOfJunctionGroups.clear();
|
||||
|
||||
for ( size_t idom = 0; idom < theElems.size(); idom++ )
|
||||
{
|
||||
@ -11951,7 +11951,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
std::set<int> setOfVolToCheck;
|
||||
|
||||
std::vector<gp_Pnt> gpnts;
|
||||
gpnts.clear();
|
||||
|
||||
if (isNodeGroup) // --- a group of nodes is provided : find all the volumes using one or more of this nodes
|
||||
{
|
||||
@ -12038,7 +12037,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
// Fill the group of inside volumes
|
||||
|
||||
std::map<int, double> mapOfNodeDistance2;
|
||||
mapOfNodeDistance2.clear();
|
||||
std::set<int> setOfOutsideVol;
|
||||
while (!setOfVolToCheck.empty())
|
||||
{
|
||||
@ -12215,8 +12213,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
// project polylines on subshapes, and partition, to get geom faces
|
||||
|
||||
std::map<int, std::set<int> > shapeIdToVtkIdSet; // shapeId --> set of vtkId on skin
|
||||
std::set<int> emptySet;
|
||||
emptySet.clear();
|
||||
std::set<int> shapeIds;
|
||||
|
||||
SMDS_ElemIteratorPtr itelem = sgrps->GetElements();
|
||||
@ -12227,7 +12223,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
int vtkId = elem->GetVtkID();
|
||||
if (!shapeIdToVtkIdSet.count(shapeId))
|
||||
{
|
||||
shapeIdToVtkIdSet[shapeId] = emptySet;
|
||||
shapeIds.insert(shapeId);
|
||||
}
|
||||
shapeIdToVtkIdSet[shapeId].insert(vtkId);
|
||||
@ -12235,7 +12230,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
|
||||
std::map<int, std::set<DownIdType, DownIdCompare> > shapeIdToEdges; // shapeId --> set of downward edges
|
||||
std::set<DownIdType, DownIdCompare> emptyEdges;
|
||||
emptyEdges.clear();
|
||||
|
||||
std::map<int, std::set<int> >::iterator itShape = shapeIdToVtkIdSet.begin();
|
||||
for (; itShape != shapeIdToVtkIdSet.end(); ++itShape)
|
||||
@ -12278,7 +12272,6 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
|
||||
}
|
||||
|
||||
std::list<int> order;
|
||||
order.clear();
|
||||
if (nodesEdges.size() > 0)
|
||||
{
|
||||
order.push_back(nodesEdges[0]); //MESSAGE(" --- back " << order.back()+1); // SMDS id = VTK id + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user