mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
PAL12157. In Dump(), show info on poly elements
This commit is contained in:
parent
9d574375ee
commit
61e6f5da79
@ -1578,19 +1578,24 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
||||
{
|
||||
int clause = 0;
|
||||
save << "========================== Dump contents of mesh ==========================" << endl << endl;
|
||||
save << ++clause << ") Total number of nodes: " << NbNodes() << endl << endl;
|
||||
save << ++clause << ") Total number of nodes:\t" << NbNodes() << endl;
|
||||
save << ++clause << ") Total number of edges:\t" << NbEdges() << endl;
|
||||
save << ++clause << ") Total number of faces:\t" << NbFaces() << endl;
|
||||
save << ++clause << ") Total number of polygons:\t" << NbPolygons() << endl;
|
||||
save << ++clause << ") Total number of volumes:\t" << NbVolumes() << endl;
|
||||
save << ++clause << ") Total number of polyhedrons:\t" << NbPolyhedrons() << endl << endl;
|
||||
for ( int isQuadratic = 0; isQuadratic < 2; ++isQuadratic )
|
||||
{
|
||||
string orderStr = isQuadratic ? "quadratic" : "linear";
|
||||
ElementOrder order = isQuadratic ? ORDER_QUADRATIC : ORDER_LINEAR;
|
||||
|
||||
save << ++clause << ") Total number of " << orderStr << " edges: " << NbEdges(order) << endl;
|
||||
save << ++clause << ") Total number of " << orderStr << " faces: " << NbFaces(order) << endl;
|
||||
save << ++clause << ") Total number of " << orderStr << " edges:\t" << NbEdges(order) << endl;
|
||||
save << ++clause << ") Total number of " << orderStr << " faces:\t" << NbFaces(order) << endl;
|
||||
if ( NbFaces(order) > 0 ) {
|
||||
int nb3 = NbTriangles(order);
|
||||
int nb4 = NbQuadrangles(order);
|
||||
save << clause << ".1.) Number of " << orderStr << " triangles: " << nb3 << endl;
|
||||
save << clause << ".2.) Number of " << orderStr << " quadrangles: " << nb4 << endl;
|
||||
save << clause << ".1) Number of " << orderStr << " triangles:\t" << nb3 << endl;
|
||||
save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
|
||||
if ( nb3 + nb4 != NbFaces(order) ) {
|
||||
map<int,int> myFaceMap;
|
||||
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
||||
@ -1600,22 +1605,22 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
||||
myFaceMap[ nbNodes ] = 0;
|
||||
myFaceMap[ nbNodes ] = myFaceMap[ nbNodes ] + 1;
|
||||
}
|
||||
save << clause << ".3.) Faces in detail: " << endl;
|
||||
save << clause << ".3) Faces in detail: " << endl;
|
||||
map <int,int>::iterator itF;
|
||||
for (itF = myFaceMap.begin(); itF != myFaceMap.end(); itF++)
|
||||
save << "--> nb nodes: " << itF->first << " - nb elemens: " << itF->second << endl;
|
||||
save << "--> nb nodes: " << itF->first << " - nb elemens:\t" << itF->second << endl;
|
||||
}
|
||||
}
|
||||
save << ++clause << ") Total number of " << orderStr << " volumes: " << NbVolumes(order) << endl;
|
||||
save << ++clause << ") Total number of " << orderStr << " volumes:\t" << NbVolumes(order) << endl;
|
||||
if ( NbVolumes(order) > 0 ) {
|
||||
int nb8 = NbHexas(order);
|
||||
int nb4 = NbTetras(order);
|
||||
int nb5 = NbPyramids(order);
|
||||
int nb6 = NbPrisms(order);
|
||||
save << clause << ".1.) Number of " << orderStr << " hexahedrons: " << nb8 << endl;
|
||||
save << clause << ".2.) Number of " << orderStr << " tetrahedrons: " << nb4 << endl;
|
||||
save << clause << ".3.) Number of " << orderStr << " prisms: " << nb6 << endl;
|
||||
save << clause << ".4.) Number of " << orderStr << " pyramides: " << nb5 << endl;
|
||||
save << clause << ".1) Number of " << orderStr << " hexahedrons:\t" << nb8 << endl;
|
||||
save << clause << ".2) Number of " << orderStr << " tetrahedrons:\t" << nb4 << endl;
|
||||
save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl;
|
||||
save << clause << ".4) Number of " << orderStr << " pyramides:\t" << nb5 << endl;
|
||||
if ( nb8 + nb4 + nb5 + nb6 != NbVolumes(order) ) {
|
||||
map<int,int> myVolumesMap;
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
@ -1625,10 +1630,10 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
||||
myVolumesMap[ nbNodes ] = 0;
|
||||
myVolumesMap[ nbNodes ] = myVolumesMap[ nbNodes ] + 1;
|
||||
}
|
||||
save << clause << ".5.) Volumes in detail: " << endl;
|
||||
save << clause << ".5) Volumes in detail: " << endl;
|
||||
map <int,int>::iterator itV;
|
||||
for (itV = myVolumesMap.begin(); itV != myVolumesMap.end(); itV++)
|
||||
save << "--> nb nodes: " << itV->first << " - nb elemens: " << itV->second << endl;
|
||||
save << "--> nb nodes: " << itV->first << " - nb elemens:\t" << itV->second << endl;
|
||||
}
|
||||
}
|
||||
save << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user