SALOME_MED::medGeometryElement
CELLGEOM[MED_NBR_GEOMETRIE_MAILLE] = {
- SALOME_MED::MED_POINT1,
- SALOME_MED::MED_SEG2,
- SALOME_MED::MED_SEG3,
- SALOME_MED::MED_TRIA3,
- SALOME_MED::MED_QUAD4,
- SALOME_MED::MED_TRIA6,
- SALOME_MED::MED_QUAD8,
- SALOME_MED::MED_TETRA4,
- SALOME_MED::MED_PYRA5,
- SALOME_MED::MED_PENTA6,
- SALOME_MED::MED_HEXA8,
- SALOME_MED::MED_TETRA10,
- SALOME_MED::MED_PYRA13,
- SALOME_MED::MED_PENTA15,
- SALOME_MED::MED_HEXA20,
- SALOME_MED::MED_POLYGON,
- SALOME_MED::MED_POLYHEDRA
+ SALOME_MED::MEDMEM_POINT1,
+ SALOME_MED::MEDMEM_SEG2,
+ SALOME_MED::MEDMEM_SEG3,
+ SALOME_MED::MEDMEM_TRIA3,
+ SALOME_MED::MEDMEM_QUAD4,
+ SALOME_MED::MEDMEM_TRIA6,
+ SALOME_MED::MEDMEM_QUAD8,
+ SALOME_MED::MEDMEM_TETRA4,
+ SALOME_MED::MEDMEM_PYRA5,
+ SALOME_MED::MEDMEM_PENTA6,
+ SALOME_MED::MEDMEM_HEXA8,
+ SALOME_MED::MEDMEM_TETRA10,
+ SALOME_MED::MEDMEM_PYRA13,
+ SALOME_MED::MEDMEM_PENTA15,
+ SALOME_MED::MEDMEM_HEXA20,
+ SALOME_MED::MEDMEM_POLYGON,
+ SALOME_MED::MEDMEM_POLYHEDRA
};
const int MED_NBR_GEOMETRIE_FACE = 5;
SALOME_MED::medGeometryElement
FACEGEOM[MED_NBR_GEOMETRIE_FACE] = {
- SALOME_MED::MED_TRIA3,
- SALOME_MED::MED_QUAD4,
- SALOME_MED::MED_TRIA6,
- SALOME_MED::MED_QUAD8,
- SALOME_MED::MED_POLYGON
+ SALOME_MED::MEDMEM_TRIA3,
+ SALOME_MED::MEDMEM_QUAD4,
+ SALOME_MED::MEDMEM_TRIA6,
+ SALOME_MED::MEDMEM_QUAD8,
+ SALOME_MED::MEDMEM_POLYGON
};
const int MED_NBR_GEOMETRIE_ARETE = 2;
SALOME_MED::medGeometryElement
EDGEGEOM[MED_NBR_GEOMETRIE_ARETE] = {
- SALOME_MED::MED_SEG2,
- SALOME_MED::MED_SEG3
+ SALOME_MED::MEDMEM_SEG2,
+ SALOME_MED::MEDMEM_SEG3
};
const int MED_NBR_GEOMETRIE_NODE = 1;
SALOME_MED::medGeometryElement
NODEGEOM[MED_NBR_GEOMETRIE_NODE] = {
- SALOME_MED::MED_POINT1,
+ SALOME_MED::MEDMEM_POINT1,
};
MEDGeom2NbNodes(int theMEDGeomType)
{
switch(theMEDGeomType){
- case SALOME_MED::MED_NONE:
+ case SALOME_MED::MEDMEM_NONE:
return 0;
- case SALOME_MED::MED_POINT1:
+ case SALOME_MED::MEDMEM_POINT1:
return 1;
- case SALOME_MED::MED_SEG2:
+ case SALOME_MED::MEDMEM_SEG2:
return 2;
- case SALOME_MED::MED_SEG3:
+ case SALOME_MED::MEDMEM_SEG3:
return 3;
- case SALOME_MED::MED_TRIA3:
+ case SALOME_MED::MEDMEM_TRIA3:
return 3;
- case SALOME_MED::MED_TRIA6:
+ case SALOME_MED::MEDMEM_TRIA6:
return 6;
- case SALOME_MED::MED_QUAD4:
+ case SALOME_MED::MEDMEM_QUAD4:
return 4;
- case SALOME_MED::MED_QUAD8:
+ case SALOME_MED::MEDMEM_QUAD8:
return 8;
- case SALOME_MED::MED_TETRA4:
+ case SALOME_MED::MEDMEM_TETRA4:
return 4;
- case SALOME_MED::MED_TETRA10:
+ case SALOME_MED::MEDMEM_TETRA10:
return 10;
- case SALOME_MED::MED_HEXA8:
+ case SALOME_MED::MEDMEM_HEXA8:
return 8;
- case SALOME_MED::MED_HEXA20:
+ case SALOME_MED::MEDMEM_HEXA20:
return 20;
- case SALOME_MED::MED_PENTA6:
+ case SALOME_MED::MEDMEM_PENTA6:
return 6;
- case SALOME_MED::MED_PENTA15:
+ case SALOME_MED::MEDMEM_PENTA15:
return 15;
- case SALOME_MED::MED_PYRA5:
+ case SALOME_MED::MEDMEM_PYRA5:
return 5;
- case SALOME_MED::MED_PYRA13:
+ case SALOME_MED::MEDMEM_PYRA13:
return 13;
}
return -1;
MEDGeom2VISU(SALOME_MED::medGeometryElement theGeom)
{
switch(theGeom){
- case SALOME_MED::MED_POINT1:
+ case SALOME_MED::MEDMEM_POINT1:
return VISU::ePOINT1;
- case SALOME_MED::MED_SEG2:
+ case SALOME_MED::MEDMEM_SEG2:
return VISU::eSEG2;
- case SALOME_MED::MED_SEG3:
+ case SALOME_MED::MEDMEM_SEG3:
return VISU::eSEG3;
- case SALOME_MED::MED_TRIA3:
+ case SALOME_MED::MEDMEM_TRIA3:
return VISU::eTRIA3;
- case SALOME_MED::MED_TRIA6:
+ case SALOME_MED::MEDMEM_TRIA6:
return VISU::eTRIA6;
- case SALOME_MED::MED_QUAD4:
+ case SALOME_MED::MEDMEM_QUAD4:
return VISU::eQUAD4;
- case SALOME_MED::MED_QUAD8:
+ case SALOME_MED::MEDMEM_QUAD8:
return VISU::eQUAD8;
- case SALOME_MED::MED_TETRA4:
+ case SALOME_MED::MEDMEM_TETRA4:
return VISU::eTETRA4;
- case SALOME_MED::MED_TETRA10:
+ case SALOME_MED::MEDMEM_TETRA10:
return VISU::eTETRA10;
- case SALOME_MED::MED_HEXA8:
+ case SALOME_MED::MEDMEM_HEXA8:
return VISU::eHEXA8;
- case SALOME_MED::MED_HEXA20:
+ case SALOME_MED::MEDMEM_HEXA20:
return VISU::eHEXA20;
- case SALOME_MED::MED_PENTA6:
+ case SALOME_MED::MEDMEM_PENTA6:
return VISU::ePENTA6;
- case SALOME_MED::MED_PENTA15:
+ case SALOME_MED::MEDMEM_PENTA15:
return VISU::ePENTA15;
- case SALOME_MED::MED_PYRA5:
+ case SALOME_MED::MEDMEM_PYRA5:
return VISU::ePYRA5;
- case SALOME_MED::MED_PYRA13:
+ case SALOME_MED::MEDMEM_PYRA13:
return VISU::ePYRA13;
- case SALOME_MED::MED_POLYGON:
+ case SALOME_MED::MEDMEM_POLYGON:
return VISU::ePOLYGONE;
- case SALOME_MED::MED_POLYHEDRA:
+ case SALOME_MED::MEDMEM_POLYHEDRA:
return VISU::ePOLYEDRE;
}
return VISU::eNONE;
{
switch(theGeom){
case VISU::ePOINT1:
- return SALOME_MED::MED_POINT1;
+ return SALOME_MED::MEDMEM_POINT1;
case VISU::eSEG2:
- return SALOME_MED::MED_SEG2;
+ return SALOME_MED::MEDMEM_SEG2;
case VISU::eTRIA3:
- return SALOME_MED::MED_TRIA3;
+ return SALOME_MED::MEDMEM_TRIA3;
case VISU::eQUAD4:
- return SALOME_MED::MED_QUAD4;
+ return SALOME_MED::MEDMEM_QUAD4;
case VISU::eTETRA4:
- return SALOME_MED::MED_TETRA4;
+ return SALOME_MED::MEDMEM_TETRA4;
case VISU::eHEXA8:
- return SALOME_MED::MED_HEXA8;
+ return SALOME_MED::MEDMEM_HEXA8;
case VISU::ePENTA6:
- return SALOME_MED::MED_PENTA6;
+ return SALOME_MED::MEDMEM_PENTA6;
case VISU::ePYRA5:
- return SALOME_MED::MED_PYRA5;
+ return SALOME_MED::MEDMEM_PYRA5;
case VISU::eSEG3:
- return SALOME_MED::MED_SEG3;
+ return SALOME_MED::MEDMEM_SEG3;
case VISU::eTRIA6:
- return SALOME_MED::MED_TRIA6;
+ return SALOME_MED::MEDMEM_TRIA6;
case VISU::eQUAD8:
- return SALOME_MED::MED_QUAD8;
+ return SALOME_MED::MEDMEM_QUAD8;
case VISU::eTETRA10:
- return SALOME_MED::MED_TETRA10;
+ return SALOME_MED::MEDMEM_TETRA10;
case VISU::eHEXA20:
- return SALOME_MED::MED_HEXA20;
+ return SALOME_MED::MEDMEM_HEXA20;
case VISU::ePENTA15:
- return SALOME_MED::MED_PENTA15;
+ return SALOME_MED::MEDMEM_PENTA15;
case VISU::ePYRA13:
- return SALOME_MED::MED_PYRA13;
+ return SALOME_MED::MEDMEM_PYRA13;
case VISU::ePOLYGONE:
- return SALOME_MED::MED_POLYGON;
+ return SALOME_MED::MEDMEM_POLYGON;
case VISU::ePOLYEDRE:
- return SALOME_MED::MED_POLYHEDRA;
+ return SALOME_MED::MEDMEM_POLYHEDRA;
}
return SALOME_MED::medGeometryElement(-1);
}
{
switch(theVTKGeomType){
case VTK_VERTEX:
- return SALOME_MED::MED_POINT1;
+ return SALOME_MED::MEDMEM_POINT1;
case VTK_LINE:
- return SALOME_MED::MED_SEG2;
+ return SALOME_MED::MEDMEM_SEG2;
case VTK_TRIANGLE:
- return SALOME_MED::MED_TRIA3;
+ return SALOME_MED::MEDMEM_TRIA3;
case VTK_QUAD:
- return SALOME_MED::MED_QUAD4;
+ return SALOME_MED::MEDMEM_QUAD4;
case VTK_TETRA:
- return SALOME_MED::MED_TETRA4;
+ return SALOME_MED::MEDMEM_TETRA4;
case VTK_HEXAHEDRON:
- return SALOME_MED::MED_HEXA8;
+ return SALOME_MED::MEDMEM_HEXA8;
case VTK_WEDGE:
- return SALOME_MED::MED_PENTA6;
+ return SALOME_MED::MEDMEM_PENTA6;
case VTK_PYRAMID:
- return SALOME_MED::MED_PYRA5;
+ return SALOME_MED::MEDMEM_PYRA5;
case VTK_POLYGON:
- return SALOME_MED::MED_POLYGON;
+ return SALOME_MED::MEDMEM_POLYGON;
}
return SALOME_MED::medGeometryElement(-1);
}
const VISU::TCellsFirstIndex& aCellsFirstIndex = theMeshOnEntity.myCellsFirstIndex;
VISU::TCellsFirstIndex::const_iterator aTimeStampIter = aCellsFirstIndex.find(theMGeom);
if(aTimeStampIter == (theMeshOnEntity.myCellsFirstIndex).end() &&
- theMGeom != SALOME_MED::MED_POINT1)
+ theMGeom != SALOME_MED::MEDMEM_POINT1)
aSubProfile->myStatus = VISU::eRemoveAll;
- else if(aTimeStampIter == aCellsFirstIndex.end() && theMGeom == SALOME_MED::MED_POINT1){
+ else if(aTimeStampIter == aCellsFirstIndex.end() && theMGeom == SALOME_MED::MEDMEM_POINT1){
if(theNbElems > 0){
aSubProfile->myName = "";
aSubProfile->myStatus = VISU::eAddPart;
SALOME_MED::SUPPORT_var aSupport = theValForTime->myField->getSupport();
int aNbElems = 0;
if(anIter == aFirstIndex.end() && aSupport->getEntity() == SALOME_MED::MED_NODE){
- SALOME_MED::medGeometryElement aMGeom = SALOME_MED::MED_POINT1;
+ SALOME_MED::medGeometryElement aMGeom = SALOME_MED::MEDMEM_POINT1;
try{
- aNbElems = aSupport->getNumberOfElements(SALOME_MED::MED_NONE);
+ aNbElems = aSupport->getNumberOfElements(SALOME_MED::MEDMEM_NONE);
if(MYDEBUG)MESSAGE("aMGeom="<<aMGeom<<" aNbElems="<<aNbElems);
}catch(...){
MESSAGE("Error in theValForTime->myField->getSupport()->getNumberOfElements(aMGeom);");
std::vector<int> aGeom2Profile;
if(!aSupport->isOnAllElements()){
try{
- if(aMGeom == SALOME_MED::MED_POINT1)
- aGeom2ProfileIds = aSupport->getNumberFromFile(SALOME_MED::MED_NONE);
+ if(aMGeom == SALOME_MED::MEDMEM_POINT1)
+ aGeom2ProfileIds = aSupport->getNumberFromFile(SALOME_MED::MEDMEM_NONE);
else
aGeom2ProfileIds = aSupport->getNumberFromFile(aMGeom);
int aLen = aGeom2ProfileIds->length();
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
- SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh()->convertInMESH();
if(aMEDMesh->_is_nil())
throw std::runtime_error("VISU_MEDFieldConvertor::Build >> aMEDMesh->_is_nil() !!!");
if(aMEDSupport->_is_nil())
continue;
- SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh()->convertInMESH();
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
CORBA::String_var aSupportName = aMEDSupport->getName();
if(aMEDSupport->_is_nil())
continue;
- SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh()->convertInMESH();
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
CORBA::String_var aSupportName = aMEDSupport->getName();
if(aMEDSupport->_is_nil())
continue;
- SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMeshOnSupport = aMEDSupport->getMesh()->convertInMESH();
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
CORBA::String_var aSupportName = aMEDSupport->getName();
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity anEntity = MEDEntityToVTK(aMEntity);
- SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh()->convertInMESH();
if(aMEDMesh->_is_nil())
continue;
SALOME_MED::medEntityMesh aMEntity = aMEDSupport->getEntity();
VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
- SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh();
+ SALOME_MED::MESH_var aMEDMesh = aMEDSupport->getMesh()->convertInMESH();
if(aMEDMesh->_is_nil()) continue;
CORBA::String_var aMeshName = aMEDMesh->getName();
CORBA::String_var aFieldName = aMEDField->getName();
{
{
SALOME::SenderInt_var aSender =
- theMesh->getSenderForPolygonsConnectivity(SALOME_MED::MED_NODAL, theEntity);
+ theMesh->getSenderForConnectivity(SALOME_MED::MED_NODAL, theEntity, SALOME_MED::MEDMEM_POLYGON);
long int aSize;
int* aValuePtr = ReceiverFactory::getValue(aSender.in(), aSize);
myConn.assign(aValuePtr, aValuePtr + aSize);
}
{
SALOME::SenderInt_var aSender =
- theMesh->getSenderForPolygonsConnectivityIndex(SALOME_MED::MED_NODAL, theEntity);
+ theMesh->getSenderForConnectivityIndex(SALOME_MED::MED_NODAL, theEntity, SALOME_MED::MEDMEM_POLYGON);
long int aSize;
int* aValuePtr = ReceiverFactory::getValue(aSender, aSize);
myConnIndex.assign(aValuePtr, aValuePtr + aSize);
TIntArray myFaceIndex;
public:
- MEDPolyhedraConnectivity(SALOME_MED::MESH_var theMesh)
+ MEDPolyhedraConnectivity(SALOME_MED::MESH_var theMesh,
+ SALOME_MED::medEntityMesh theEntity)
{
{
SALOME::SenderInt_var aSender =
- theMesh->getSenderForPolyhedronConnectivity(SALOME_MED::MED_NODAL);
+ theMesh->getSenderForConnectivity(SALOME_MED::MED_NODAL, theEntity, SALOME_MED::MEDMEM_POLYHEDRA);
long int aSize;
- int* aValuePtr = ReceiverFactory::getValue(aSender, aSize);
- myConn.assign(aValuePtr, aValuePtr + aSize);
- }
- {
- SALOME::SenderInt_var aSender =
- theMesh->getSenderForPolyhedronIndex(SALOME_MED::MED_NODAL);
- long int aSize;
- int* aValuePtr = ReceiverFactory::getValue(aSender, aSize);
- myConnIndex.assign(aValuePtr, aValuePtr + aSize);
- }
- {
- SALOME::SenderInt_var aSender =
- theMesh->getSenderForPolyhedronFacesIndex();
- long int aSize;
- int* aValuePtr = ReceiverFactory::getValue(aSender, aSize);
- myFaceIndex.assign(aValuePtr, aValuePtr + aSize);
+ int* pt = ReceiverFactory::getValue(aSender, aSize);
+ //
+ SALOME::SenderInt_var aSender2 =
+ theMesh->getSenderForConnectivityIndex(SALOME_MED::MED_NODAL, theEntity, SALOME_MED::MEDMEM_POLYHEDRA);
+ long int aSizeI;
+ int* ptI = ReceiverFactory::getValue(aSender, aSize);
+ //
+ int nbOfPolyHCells=aSizeI-1;
+ std::vector<int> polh1v(aSizeI);
+ polh1v[0]=1;
+ std::vector<int> polh2v,polh3v;
+ for(int i=0;i<nbOfPolyHCells;i++)
+ {
+ int nbOfFaces=std::count(pt+ptI[i]-1,pt+ptI[i+1]-1,-1)+1;
+ polh1v[i+1]=polh1v[i]+nbOfFaces;
+ int *work=pt+ptI[i]-1;
+ for(int j=0;j<nbOfFaces;j++)
+ {
+ int *work2=std::find(work,pt+ptI[i+1]-1,-1);
+ int connLgthOfFace=std::distance(work,work2);
+ polh2v.push_back(connLgthOfFace);
+ polh3v.insert(polh3v.end(),work,work2);
+ work=work2+1;
+ }
+ }
+ //
+ myConn.assign(polh3v.begin(),polh3v.end());
+ myFaceIndex.assign(polh2v.begin(),polh2v.end());
+ myConnIndex.assign(polh1v.begin(),polh1v.end());
}
}
return 0;
SALOME_MED::SUPPORT_var& aMedSupport = theMeshOnEntity->mySupport;
- SALOME_MED::MESH_var aMedMesh = aMedSupport->getMesh();
+ SALOME_MED::MESH_var aMedMesh = aMedSupport->getMesh()->convertInMESH();
//Main part of code
const VISU::TEntity& aVEntity = theMeshOnEntity->myEntity;
SALOME_MED::medGeometryElement aMGeom = anInfo->meshTypes[iGeom];
VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
switch (aMGeom) {
- case SALOME_MED::MED_POLYGON:
+ case SALOME_MED::MEDMEM_POLYGON:
{
MEDPolygonConnectivity aConn(aMedMesh, aMEntity);
int aNbElem = aConn.GetNbElem();
}
}
break;
- case SALOME_MED::MED_POLYHEDRA:
+ case SALOME_MED::MEDMEM_POLYHEDRA:
{
- MEDPolyhedraConnectivity aConn( aMedMesh );
+ MEDPolyhedraConnectivity aConn( aMedMesh, aMEntity );
int aNbElem = aConn.GetNbElem();
if (aNbElem > 0) {
VISU::PSubMeshImpl aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TCSubMesh());
int aNbElem = anInfo->numberOfElements[iGeom];
if (aNbElem > 0) {
SALOME_TYPES::ListOfLong_var aConn =
- aMedMesh->getConnectivity(SALOME_MED::MED_FULL_INTERLACE,
- SALOME_MED::MED_NODAL,
+ aMedMesh->getConnectivity(SALOME_MED::MED_NODAL,
aMEntity,
aMGeom);
VISU::PSubMeshImpl aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TCSubMesh());
switch(aMGeom){
#if !(defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
- case SALOME_MED::MED_SEG3:
+ case SALOME_MED::MEDMEM_SEG3:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
break;
#endif
#if !(defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
- case SALOME_MED::MED_TRIA6:
+ case SALOME_MED::MEDMEM_TRIA6:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[4] = aConnect[2];
break;
#endif
#if !(defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
- case SALOME_MED::MED_QUAD8:
+ case SALOME_MED::MEDMEM_QUAD8:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[4] = aConnect[2];
break;
#endif
#if (defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
- case SALOME_MED::MED_TETRA10 :
+ case SALOME_MED::MEDMEM_TETRA10 :
#endif
- case SALOME_MED::MED_TETRA4 :
+ case SALOME_MED::MEDMEM_TETRA4 :
anArray[0] = aConnect[0];
anArray[1] = aConnect[1];
anArray[2] = aConnect[3];
anArray[3] = aConnect[2];
break;
#if (defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
- case SALOME_MED::MED_PYRA13:
+ case SALOME_MED::MEDMEM_PYRA13:
#endif
- case SALOME_MED::MED_PYRA5 :
+ case SALOME_MED::MEDMEM_PYRA5 :
anArray[0] = aConnect[0];
anArray[1] = aConnect[3];
anArray[2] = aConnect[2];
//----------------------------------------------------------------------------
void
BuildGroups(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsDone,
- CORBA::Boolean theIsBuild,
- CORBA::Boolean theIsAtOnce,
- _PTR(Study) theStudy)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsDone,
+ CORBA::Boolean theIsBuild,
+ CORBA::Boolean theIsAtOnce,
+ _PTR(Study) theStudy)
{
if(!theIsBuild || *theIsDone)
return;
const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
if(aMeshOnEntityMap.empty())
- continue;
+ continue;
TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
- const TEntity& anEntity = aMeshOnEntityMapIter->first;
- const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
-
- const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
- TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
- for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
- const string& aFamilyName = aFamilyMapIter->first;
- const PFamily& aFamily = aFamilyMapIter->second;
+ const TEntity& anEntity = aMeshOnEntityMapIter->first;
+ const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+ const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+ TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
+ for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
+ const string& aFamilyName = aFamilyMapIter->first;
+ const PFamily& aFamily = aFamilyMapIter->second;
aComment=QString("myComment=FAMILY;myMeshName=%1;myEntityId=%2;myName=%3");
aComment=aComment.arg(aMeshName.c_str());
aComment=aComment.arg(anEntity);
aComment=aComment.arg(aFamilyName.c_str());
- aFamily->myEntry =
- CreateAttributes(theStudy,
- aMeshOnEntity->myEntry,
- NO_ICON,
- NO_IOR,
- aFamilyName,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- }
+ aFamily->myEntry = CreateAttributes(theStudy,
+ aMeshOnEntity->myEntry,
+ NO_ICON,
+ NO_IOR,
+ aFamilyName,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ }
}
//Importing groups
const TGroupMap& aGroupMap = aMesh->myGroupMap;
if(!aGroupMap.empty()){
- aComment = QString("myComment=GROUPS;myMeshName=%1").arg(aMeshName.c_str());
-
- CreateAttributes(theStudy,
- aMesh->myGroupsEntry,
- NO_ICON,
- NO_IOR,
- "Groups",
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- false);
-
- TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
- for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
- const string& aGroupName = aGroupMapIter->first;
- const PGroup& aGroup = aGroupMapIter->second;
- aComment = QString("myComment=GROUP;myMeshName=%1;myName=%2").arg(aMeshName.c_str()).arg(aGroupName.c_str());
- aGroup->myEntry =
- CreateAttributes(theStudy,
- aMesh->myGroupsEntry,
- NO_ICON,
- NO_IOR,
- aGroupName,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- const TFamilySet& aFamilySet = aGroup->myFamilySet;
- TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
- for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
- const PFamily& aFamily = (*aFamilyIter).second;
- CreateReference(theStudy,
- aGroup->myEntry,
- aFamily->myEntry);
- }
- }
+ aComment = QString("myComment=GROUPS;myMeshName=%1").arg(aMeshName.c_str());
+
+ CreateAttributes(theStudy,
+ aMesh->myGroupsEntry,
+ NO_ICON,
+ NO_IOR,
+ "Groups",
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ false);
+
+ TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
+ for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
+ const string& aGroupName = aGroupMapIter->first;
+ const PGroup& aGroup = aGroupMapIter->second;
+ aComment = QString("myComment=GROUP;myMeshName=%1;myName=%2").arg(aMeshName.c_str()).arg(aGroupName.c_str());
+ aGroup->myEntry = CreateAttributes(theStudy,
+ aMesh->myGroupsEntry,
+ NO_ICON,
+ NO_IOR,
+ aGroupName,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ const TFamilySet& aFamilySet = aGroup->myFamilySet;
+ TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
+ for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
+ const PFamily& aFamily = (*aFamilyIter).second;
+ CreateReference(theStudy,
+ aGroup->myEntry,
+ aFamily->myEntry);
+ }
+ }
}else if(!theIsAtOnce)
- RemoveSObject(theStudy,
- aMesh->myGroupsEntry);
+ RemoveSObject(theStudy,
+ aMesh->myGroupsEntry);
}
ProcessVoidEvent(new TUpdateObjBrowser(theStudy->StudyId(),theIsDone));
const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
if(aMeshOnEntityMap.empty())
- continue;
+ continue;
//Import fields
bool anIsFieldsEntryUpdated = false;
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++)
{
- const TEntity& anEntity = aMeshOnEntityMapIter->first;
- const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
- const TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
- TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
-
- for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
- {
- if(!anIsFieldsEntryUpdated)
- {
- aComment = "";
- aComment.append("myComment=FIELDS;");
- aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
-
- CreateAttributes(theStudy,
- aMesh->myFieldsEntry,
- NO_ICON,
- NO_IOR,
- "Fields",
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- false);
-
- anIsFieldsEntryUpdated = true;
- }
-
- const string& aFieldName = aFieldMapIter->first;
- const PField& aField = aFieldMapIter->second;
- const TValField& aValField = aField->myValField;
- QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
- aComment = QString("myComment=FIELD;myMeshName=%1;myEntityId=%2;myName=%3;myNbTimeStamps=%4;myNumComponent=%5");
+ const TEntity& anEntity = aMeshOnEntityMapIter->first;
+ const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+ const TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
+ TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
+
+ for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
+ {
+ if(!anIsFieldsEntryUpdated)
+ {
+ aComment = "";
+ aComment.append("myComment=FIELDS;");
+ aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
+
+ CreateAttributes(theStudy,
+ aMesh->myFieldsEntry,
+ NO_ICON,
+ NO_IOR,
+ "Fields",
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ false);
+ anIsFieldsEntryUpdated = true;
+ }
+
+ const string& aFieldName = aFieldMapIter->first;
+ const PField& aField = aFieldMapIter->second;
+ const TValField& aValField = aField->myValField;
+ QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
+ aComment = QString("myComment=FIELD;myMeshName=%1;myEntityId=%2;myName=%3;myNbTimeStamps=%4;myNumComponent=%5");
aComment = aComment.arg(aMeshName.c_str());
aComment = aComment.arg(anEntity);
aComment = aComment.arg(aFieldName.c_str());
aComment = aComment.arg(aValField.size());
aComment = aComment.arg(aField->myNbComp);
-
- aField->myEntry = CreateAttributes(theStudy,
- aMesh->myFieldsEntry,
- NO_ICON,
- NO_IOR,
- aFieldNameWithUnit.toLatin1().data(),
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
-
- CreateReference(theStudy,
- aField->myEntry,
- aMeshOnEntity->myEntry);
-
- TValField::const_iterator aValFieldIter = aValField.begin();
-
- for(; aValFieldIter != aValField.end(); aValFieldIter++)
- {
- int aTimeStamp = aValFieldIter->first;
- const PValForTime& aValForTime = aValFieldIter->second;
- aComment = QString("myComment=TIMESTAMP;myMeshName=%1;myEntityId=%2;myFieldName=%3;myTimeStampId=%4;myNumComponent=%5");
+
+ aField->myEntry = CreateAttributes(theStudy,
+ aMesh->myFieldsEntry,
+ NO_ICON,
+ NO_IOR,
+ aFieldNameWithUnit.toLatin1().data(),
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+
+ CreateReference(theStudy,
+ aField->myEntry,
+ aMeshOnEntity->myEntry);
+
+ TValField::const_iterator aValFieldIter = aValField.begin();
+
+ for(; aValFieldIter != aValField.end(); aValFieldIter++)
+ {
+ int aTimeStamp = aValFieldIter->first;
+ const PValForTime& aValForTime = aValFieldIter->second;
+ aComment = QString("myComment=TIMESTAMP;myMeshName=%1;myEntityId=%2;myFieldName=%3;myTimeStampId=%4;myNumComponent=%5");
aComment = aComment.arg(aMeshName.c_str());
aComment = aComment.arg(anEntity);
aComment = aComment.arg(aFieldName.c_str());
aComment = aComment.arg(aTimeStamp);
aComment = aComment.arg(aField->myNbComp);
-
- string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
-
- aValForTime->myEntry = CreateAttributes(theStudy,
- aField->myEntry,
- NO_ICON,
- NO_IOR,
- aTimeStampId,
- NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
- }
- }
+
+ string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
+
+ aValForTime->myEntry = CreateAttributes(theStudy,
+ aField->myEntry,
+ NO_ICON,
+ NO_IOR,
+ aTimeStampId,
+ NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
+ }
+ }
}
if(!anIsFieldsEntryUpdated && !theIsAtOnce)
- RemoveSObject(theStudy, aMesh->myFieldsEntry);
+ RemoveSObject(theStudy, aMesh->myFieldsEntry);
}
ProcessVoidEvent(new TUpdateObjBrowser(theStudy->StudyId(),theIsDone));
//----------------------------------------------------------------------------
void
BuildMinMax(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsDone,
- CORBA::Boolean theIsBuild)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsDone,
+ CORBA::Boolean theIsBuild)
{
if(!theIsBuild || *theIsDone)
return;
//----------------------------------------------------------------------------
void
BuildFieldDataTree(Result_i* theResult,
- Result_i::PInput theInput,
- CORBA::Boolean* theIsFieldsDone,
- CORBA::Boolean theIsBuildFields,
- CORBA::Boolean* theIsMinMaxDone,
- CORBA::Boolean theIsBuildMinMax,
- _PTR(Study) theStudy)
+ Result_i::PInput theInput,
+ CORBA::Boolean* theIsFieldsDone,
+ CORBA::Boolean theIsBuildFields,
+ CORBA::Boolean* theIsMinMaxDone,
+ CORBA::Boolean theIsBuildMinMax,
+ _PTR(Study) theStudy)
{
BuildFields(theResult,
- theInput,
- theIsFieldsDone,
- theIsBuildFields,
- false,
- theStudy);
+ theInput,
+ theIsFieldsDone,
+ theIsBuildFields,
+ false,
+ theStudy);
BuildMinMax(theResult,
theInput,