]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Join modifications from branch V3_1_0_For_CCRT
authorjfa <jfa@opencascade.com>
Tue, 14 Mar 2006 08:19:01 +0000 (08:19 +0000)
committerjfa <jfa@opencascade.com>
Tue, 14 Mar 2006 08:19:01 +0000 (08:19 +0000)
13 files changed:
build_configure
configure.in.base
src/INTERPOLATION/MEDMEM_MappingTools.hxx
src/MED/Makefile.in
src/MEDMEM/MEDMEM_Connectivity.cxx
src/MEDMEM/MEDMEM_DriverFactory.cxx
src/MEDMEM/MEDMEM_GibiMeshDriver.cxx
src/MEDMEM/MEDMEM_MedMedDriver22.cxx
src/MEDMEM/MEDMEM_MedMeshDriver22.cxx
src/MEDMEM/MEDMEM_PolyhedronArray.cxx
src/MEDMEM/Makefile.in
src/MEDMEM/test_MEDMEM_PolyConnectivity.cxx
src/MEDMEM_I/Makefile.in

index 8a0bacbd2b5c0652e24becefe15dc87be415ed43..561a09d78bbd00543bb011a22d36e946d1d92463 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Tool for updating list of .in file for the SALOME project 
@@ -155,7 +155,7 @@ cat configure.in.base                                            >> configure.in
 
 # make a link allowing AC_OUTPUT to find the salome_adm/.../*.in  files
 echo ""                                                          >> configure.in_tmp1
-echo 'if test ${MED_WITH_KERNEL} == yes; then'                   >> configure.in_tmp1
+echo 'if test ${MED_WITH_KERNEL} = yes; then'                   >> configure.in_tmp1
 echo '    ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1
 echo 'else'                                                      >> configure.in_tmp1
 echo '    ln -fs ${ROOT_SRCDIR}/adm_local_without_kernel ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
@@ -177,7 +177,7 @@ echo "      ./salome_adm/unix/sstream \\"        >> configure.in_tmp1
 echo " ./salome_adm/unix/depend \\"         >> configure.in_tmp1
 echo  " ])"                                  >> configure.in_tmp1
 echo ""                                      >> configure.in_tmp1
-echo 'if test $MED_WITH_KERNEL == yes; then' >> configure.in_tmp1
+echo 'if test $MED_WITH_KERNEL = yes; then' >> configure.in_tmp1
 echo "{"                                     >> configure.in_tmp1
 echo "AC_OUTPUT([ \\"                        >> configure.in_tmp1
 echo " ./salome_adm/unix/F77config.h \\"    >> configure.in_tmp1
index 4780640eba625e36e0b736887f0de4a91eb24bae..0891d99673004982b36fbe843abbb175dea0308b 100644 (file)
@@ -39,13 +39,13 @@ dnl   Update and re-run configure if there was  build_configure --without-kernel
 dnl   but configure --with-kernel=DIR is being called
 
 if test "x${old_with_kernel}" != "x${MED_WITH_KERNEL}"; then
-    if test "x${old_with_kernel}" == "xno" ; then
+    if test "x${old_with_kernel}" = "xno" ; then
          if test ! -d "${KERNEL_ROOT_DIR}"; then
              echo "failed : KERNEL_ROOT_DIR variable is not correct !"
              exit
          fi
          kernel_check_in_aclocal=`grep KERNEL_ROOT_DIR ${ROOT_SRCDIR}/aclocal.m4`
-         if test "x${kernel_check_in_aclocal}" == "x"; then
+         if test "x${kernel_check_in_aclocal}" = "x"; then
              echo "Configuration changed: without KERNEL -> with KERNEL"
              echo -n "Updating 'configure' script ...  "
              cd $ROOT_SRCDIR
@@ -71,7 +71,7 @@ dnl  config.sub, config.guess are needed for AC_CANONICAL_HOST
 
 WITHOUT_KERNEL_CONFIG_DIR=${ROOT_SRCDIR}/adm_local_without_kernel/unix/config_files
 AUX_CONFIG_DIR=""
-if test "${MED_WITH_KERNEL}" == "yes"; then
+if test "${MED_WITH_KERNEL}" = "yes"; then
    AUX_CONFIG_DIR=${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
 else
    AUX_CONFIG_DIR=${WITHOUT_KERNEL_CONFIG_DIR}
@@ -142,8 +142,14 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the
 dnl full-path to the binary instead.
 case "$INSTALL" in
    *install-sh*)
-      INSTALL="\${AUX_CONFIG_DIR}/install-sh -c"
-      ;;
+     case $host_os in
+       osf*)
+         INSTALL="${AUX_CONFIG_DIR}/install-sh -c"
+         ;;
+       *)
+         INSTALL="\${AUX_CONFIG_DIR}/install-sh -c"
+         ;;
+     esac
 esac
 
 echo
@@ -165,12 +171,12 @@ cc_ok=yes
 dnl Library libdl :
 AC_CHECK_LIB(dl,dlopen)
 
-dnl add library libm :
-AC_CHECK_LIB(m,ceil)
-
 dnl Library librt : for alpha/osf
 AC_CHECK_LIB(rt,nanosleep)
 
+dnl add library libm :
+AC_CHECK_LIB(m,ceil)
+
 dnl 
 dnl Check if we use std iostream by default or if we must add
 dnl a compiler directive for that
@@ -195,47 +201,106 @@ AC_LINKER_OPTIONS
 
 echo
 echo ---------------------------------------------
-echo testing LEX \& YACC
+echo testing threads
 echo ---------------------------------------------
 echo
 
-lex_yacc_ok=no
-AC_PROG_YACC
-AC_PROG_LEX
-lex_yacc_ok=yes
+ENABLE_PTHREADS
+
+dnl
+dnl ---------------------------------------------
+dnl testing WITHIHM
+dnl ---------------------------------------------
+dnl
+
+CHECK_WITHIHM
 
 echo
 echo ---------------------------------------------
-echo testing python
+echo BOOST Library
 echo ---------------------------------------------
 echo
 
-CHECK_PYTHON
+CHECK_BOOST
+
+dnl
+dnl ---------------------------------------------
+dnl testing sockets
+dnl ---------------------------------------------
+dnl
+
+CHECK_SOCKETS
+
+dnl
+dnl ---------------------------------------------
+dnl testing OpenPBS
+dnl ---------------------------------------------
+dnl
 
 echo
 echo ---------------------------------------------
-echo testing swig
+echo testing OpenPBS
 echo ---------------------------------------------
 echo
 
-CHECK_SWIG
+openpbs_ok=no
+CHECK_OPENPBS
+dnl openpbs_ok is set to yes by CHECK_OPENPBS
+
+dnl
+dnl ---------------------------------------------
+dnl testing LSF
+dnl ---------------------------------------------
+dnl
 
 echo
 echo ---------------------------------------------
-echo testing threads
+echo testing LSF
 echo ---------------------------------------------
 echo
 
-ENABLE_PTHREADS
+lsf_ok=no
+CHECK_LSF
+dnl lsf_ok is set to yes by CHECK_LSF
+
+dnl
+dnl ---------------------------------------------
+dnl testing Batch
+dnl ---------------------------------------------
+dnl
+
+WITH_BATCH=no
+test x$openpbs_ok = xyes || test x$lsf_ok = xyes && WITH_BATCH=yes
+AC_SUBST(WITH_BATCH)
+
+if test "X$WITHIHM" = "Xyes"; then
+       echo
+       echo ---------------------------------------------
+       echo testing LEX \& YACC
+       echo ---------------------------------------------
+       echo
+
+       lex_yacc_ok=no
+       AC_PROG_YACC
+       AC_PROG_LEX
+       lex_yacc_ok=yes
+fi
 
-dnl BOOST is needed for MED Wrapper
 echo
 echo ---------------------------------------------
-echo BOOST Library
+echo testing python
 echo ---------------------------------------------
 echo
 
-CHECK_BOOST
+CHECK_PYTHON
+
+echo
+echo ---------------------------------------------
+echo testing swig
+echo ---------------------------------------------
+echo
+
+CHECK_SWIG
 
 echo
 echo ---------------------------------------------
@@ -253,119 +318,122 @@ echo
 
 CHECK_MED2
 
+echo "MED_WITH_KERNEL ${MED_WITH_KERNEL}"
 
-if test "${MED_WITH_KERNEL}" == "yes"; then
+if test "${MED_WITH_KERNEL}" = "yes"; then
 {
-#CPPFLAGS="$CPPFLAGS -DMED_WITH_KERNEL"
 
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing java
-dnl echo ---------------------------------------------
-dnl echo
+       dnl echo
+       dnl echo ---------------------------------------------
+       dnl echo testing java
+       dnl echo ---------------------------------------------
+       dnl echo
 
-dnl CHECK_JAVA
+       dnl CHECK_JAVA
 
-dnl
-dnl ---------------------------------------------
-dnl testing MPICH
-dnl ---------------------------------------------
-dnl
+       dnl
+       dnl ---------------------------------------------
+       dnl testing MPI
+       dnl ---------------------------------------------
+       dnl
 
-CHECK_MPI
-CHECK_MPICH
+       CHECK_MPI
+       CHECK_MPICH
 
-dnl
-dnl ---------------------------------------------
-dnl testing WITHIHM
-dnl ---------------------------------------------
-dnl
+       echo
+       echo ---------------------------------------------
+       echo testing omniORB
+       echo ---------------------------------------------
+       echo
 
-CHECK_WITHIHM
+       CHECK_OMNIORB
 
-echo
-echo ---------------------------------------------
-echo testing omniORB
-echo ---------------------------------------------
-echo
+       echo
+       echo ---------------------------------------------
+       echo default ORB : omniORB
+       echo ---------------------------------------------
+       echo
 
-CHECK_OMNIORB
+       DEFAULT_ORB=omniORB
+       CHECK_CORBA
 
-echo
-echo ---------------------------------------------
-echo default ORB : omniORB
-echo ---------------------------------------------
-echo
+       AC_SUBST_FILE(CORBA)
+       corba=make_$ORB
+       CORBA=adm_local/unix/$corba
 
-DEFAULT_ORB=omniORB
-CHECK_CORBA
 
-AC_SUBST_FILE(CORBA)
-corba=make_$ORB
-CORBA=adm_local/unix/$corba
+       echo
+       echo ---------------------------------------------
+       echo testing openGL
+       echo ---------------------------------------------
+       echo
 
-echo
-echo ---------------------------------------------
-echo testing openGL
-echo ---------------------------------------------
-echo
+       CHECK_OPENGL
 
-CHECK_OPENGL
+       echo
+       echo ---------------------------------------------
+       echo testing QT
+       echo ---------------------------------------------
+       echo
 
-echo
-echo ---------------------------------------------
-echo testing QT
-echo ---------------------------------------------
-echo
+       CHECK_QT
 
-CHECK_QT
+       if test "X$WITHIHM" = "Xyes"; then
+               echo
+               echo ---------------------------------------------
+               echo testing VTK
+               echo ---------------------------------------------
+               echo
 
-echo
-echo ---------------------------------------------
-echo testing VTK
-echo ---------------------------------------------
-echo
+               CHECK_VTK
+       fi
 
-CHECK_VTK
+       echo
+       echo ---------------------------------------------
+       echo Testing OpenCascade
+       echo ---------------------------------------------
+       echo
 
-echo
-echo ---------------------------------------------
-echo Testing OpenCascade
-echo ---------------------------------------------
-echo
+       CHECK_CAS
 
-CHECK_CAS
+       echo
+       echo ---------------------------------------------
+       echo Testing Kernel
+       echo ---------------------------------------------
+       echo
 
-echo
-echo ---------------------------------------------
-echo Testing Kernel
-echo ---------------------------------------------
-echo
+       CHECK_KERNEL
 
-CHECK_KERNEL
+       dnl echo
+       dnl echo ---------------------------------------------
+       dnl echo testing mico
+       dnl echo ---------------------------------------------
+       dnl echo
 
-dnl echo
-dnl echo ---------------------------------------------
-dnl echo testing mico
-dnl echo ---------------------------------------------
-dnl echo
+       dnl CHECK_MICO
 
-dnl CHECK_MICO
+       echo
+       echo ---------------------------------------------
+       echo testing MSG2QM
+       echo ---------------------------------------------
+       echo
 
-echo
-echo ---------------------------------------------
-echo testing MSG2QM
-echo ---------------------------------------------
-echo
+       CHECK_MSG2QM
+
+       echo
+       echo ---------------------------------------------
+       echo Testing html generators
+       echo ---------------------------------------------
+       echo
 
-CHECK_MSG2QM
+       CHECK_HTML_GENERATORS
 
 }
 else
 {
-  WITHIHM=""
-  AC_SUBST(WITHIHM)
-  CPPFLAGS="$CPPFLAGS -DMED_WITHOUT_KERNEL"
+       WITHIHM=""
+       AC_SUBST(WITHIHM)
+       CPPFLAGS="$CPPFLAGS -DMED_WITHOUT_KERNEL"
 }
 fi # MED_WITH_KERNEL
 
@@ -383,17 +451,39 @@ echo Summary
 echo ---------------------------------------------
 echo
 
-if test "$MED_WITH_KERNEL" == "no"; then 
+if test "$MED_WITH_KERNEL" = "no"; then 
    echo "Configure (without Kernel)"
 else
    echo Configure
 fi
 
-variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok med2_ok boost_ok doxygen_ok graphviz_ok OpenGL_ok qt_ok vtk_ok omniORB_ok occ_ok Kernel_ok"
+#variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok med2_ok boost_ok doxygen_ok graphviz_ok OpenGL_ok qt_ok vtk_ok omniORB_ok occ_ok Kernel_ok"
+
+if test "X$WITHIHM" = "Xyes"; then
+variables="cc_ok lex_yacc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok Kernel_ok"
+fi
+if test "X$WITHIHM" = "Xno"; then
+variables="cc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok hdf5_ok med2_ok omniORB_ok occ_ok Kernel_ok"
+fi
+
+for var in $variables
+do
+   eval toto=\$$var
+   if test x$toto != "x"; then
+     printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+     eval echo \$$var
+   fi
+done
+echo "---Optional:"
+variables="cppunit_ok openpbs_ok lsf_ok doxygen_ok graphviz_ok"
 for var in $variables
 do
-   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
-   eval echo \$$var
+   eval toto=\$$var
+   if test x$toto != "x"; then
+     printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+     eval echo \$$var
+   fi
 done
 
 echo
index eb31fe16b9faf98829f8fc9428ca28573ba39a96..b0e84f314fe8a16554eb2f9f64861cff5a6712a9 100644 (file)
@@ -162,9 +162,10 @@ _TEMPLATE_SPE_ vector<double> _COORDBARY_2D_::Calcule_Coord_Baryc(int num_maille
        {
        int i,j;
         // for PAL11458
+        double zero = 0. ;
        //vector<double> coord_baryc_M(3,0);
        int nbr_faces=coord_baryc[num_maille].size();
-       vector<double> coord_baryc_M(nbr_faces,0);
+       vector<double> coord_baryc_M(nbr_faces,zero);
        for (i=0;i</*3*/nbr_faces;i++) 
                {
                for (j=0;j<2;j++) coord_baryc_M[i]+=coord_baryc[num_maille][i][j]*M[j];
index 5d06ea4f257eb73c7274db2357a705597b00dadd..ce244f6cef90fdfd987db065bbfc8cfdf142ce90 100644 (file)
@@ -40,7 +40,7 @@ EXPORT_PYSCRIPTS =  MED_test1.py MED_test2.py Med_Gen_test.py
 LIB = libMEDEngine.la
 
 LIB_SRC = Med_Gen_i.cxx
-LIB_SERVER_IDL = MED_Gen.idl SALOME_Component.idl \
+LIB_SERVER_IDL = MED_Gen.idl SALOME_Component.idl SALOME_ContainerManager.idl \
                 SALOME_Exception.idl MED.idl
 
 LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_ModuleCatalog.idl SALOME_Comm.idl SALOME_GenericObj.idl
index efe56741e062abf0136a7836d23c898a5341444b..7981226af72c609fd4e7ebfaece6b9b5a5af389a 100644 (file)
@@ -379,9 +379,28 @@ void CONNECTIVITY::setPolyhedronConnectivity(medConnectivity ConnectivityType, c
          if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL)
            delete _polyhedronNodal;
          _polyhedronNodal = new POLYHEDRONARRAY(NumberOfPolyhedron,NumberOfFaces,ConnectivitySize);
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+          int i ;
+          MED_EN::med_int * tmp_PolyhedronIndex = new med_int[NumberOfPolyhedron+1] ;
+          for ( i = 0 ; i < NumberOfPolyhedron+1 ; i++ )
+             tmp_PolyhedronIndex[i] = PolyhedronIndex[i] ;
+         _polyhedronNodal->setPolyhedronIndex(tmp_PolyhedronIndex);
+          delete [] tmp_PolyhedronIndex ;
+          MED_EN::med_int * tmp_PolyhedronFacesIndex = new med_int[NumberOfFaces+1] ;
+          for ( i = 0 ; i < NumberOfFaces+1 ; i++ )
+             tmp_PolyhedronFacesIndex[i] = PolyhedronFacesIndex[i] ;
+         _polyhedronNodal->setFacesIndex(tmp_PolyhedronFacesIndex);
+          delete [] tmp_PolyhedronFacesIndex ;
+          MED_EN::med_int * tmp_PolyhedronConnectivity = new med_int[ConnectivitySize] ;
+          for ( i = 0 ; i < ConnectivitySize ; i++ )
+             tmp_PolyhedronConnectivity[i] = PolyhedronConnectivity[i] ;
+         _polyhedronNodal->setNodes(tmp_PolyhedronConnectivity);
+          delete [] tmp_PolyhedronConnectivity ;
+#else
          _polyhedronNodal->setPolyhedronIndex(PolyhedronIndex);
          _polyhedronNodal->setFacesIndex(PolyhedronFacesIndex);
          _polyhedronNodal->setNodes(PolyhedronConnectivity);
+#endif
        }
       else
        {
@@ -746,16 +765,29 @@ const int* CONNECTIVITY::getPolyhedronConnectivity(medConnectivity ConnectivityT
       if (ConnectivityType == MED_NODAL)
        {
          ((CONNECTIVITY *)(this))->calculateNodalConnectivity();
-         if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL)
+         if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL) {
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+            int i ;
+            const MED_EN::med_int * tmp_PolyhedronConnectivity = _polyhedronNodal->getNodes();
+            int * PolyhedronConnectivity = new int[_polyhedronNodal->getNumberOfNodes()] ;
+            for ( i = 0 ; i < _polyhedronNodal->getNumberOfNodes() ; i++ )
+               PolyhedronConnectivity[i] = tmp_PolyhedronConnectivity[i] ;
+//CCRT : return of a copy of PolyhedronConnectivity
+            return PolyhedronConnectivity ;
+#else
            return _polyhedronNodal->getNodes();
+#endif
+          }
          else
            throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" : Polyhedron Nodal Connectivity not defined !"));
        }
       else
        {
          ((CONNECTIVITY *)(this))->calculateDescendingConnectivity();
-         if (_polyhedronDescending != (MEDSKYLINEARRAY*) NULL)
+         if (_polyhedronDescending != (MEDSKYLINEARRAY*) NULL) {
            return _polyhedronDescending->getValue();
+          }
          else
            throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" : Polyhedron Descending Connectivity not defined !"));
        }
@@ -774,8 +806,20 @@ const int* CONNECTIVITY::getPolyhedronFacesIndex() const
   if (_entity == MED_CELL) //polyhedron can only be MED_CELL
     {
       //      calculateNodalConnectivity();
-      if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL)
+      if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL) {
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+            int i ;
+            const MED_EN::med_int * tmp_PolyhedronFacesIndex = _polyhedronNodal->getFacesIndex();
+            int * PolyhedronFacesIndex = new int[_polyhedronNodal->getNumberOfFaces()+1] ;
+            for ( i = 0 ; i < _polyhedronNodal->getNumberOfFaces()+1 ; i++ )
+               PolyhedronFacesIndex[i] = tmp_PolyhedronFacesIndex[i] ;
+//CCRT : return of a copy of PolyhedronFacesIndex
+            return PolyhedronFacesIndex ;
+#else
        return _polyhedronNodal->getFacesIndex();
+#endif
+      }
       else
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" : No Polyhedron in that Connectivity !"));
     }
@@ -795,8 +839,20 @@ const int* CONNECTIVITY::getPolyhedronIndex(medConnectivity ConnectivityType) co
       if (ConnectivityType == MED_NODAL)
        {
          //      calculateNodalConnectivity();
-         if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL)
+         if (_polyhedronNodal != (POLYHEDRONARRAY*) NULL) {
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+            int i ;
+            const MED_EN::med_int * tmp_PolyhedronIndex = _polyhedronNodal->getPolyhedronIndex();
+            int * PolyhedronIndex = new int[_polyhedronNodal->getNumberOfPolyhedron()+1] ;
+            for ( i = 0 ; i < _polyhedronNodal->getNumberOfPolyhedron()+1 ; i++ )
+               PolyhedronIndex[i] = tmp_PolyhedronIndex[i] ;
+//CCRT : return of a copy of PolyhedronIndex
+            return PolyhedronIndex ;
+#else
            return _polyhedronNodal->getPolyhedronIndex();
+#endif
+          }
          else
            throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" : Polyhedron Nodal Connectivity not defined !"));
        }
@@ -1229,9 +1285,10 @@ void CONNECTIVITY::calculateDescendingConnectivity()
        _constituent->_numberOfTypes = 2;
       _constituent->_geometricTypes = new medGeometryElement[_constituent->_numberOfTypes];
       _constituent->_type = new CELLMODEL[_constituent->_numberOfTypes];
-      _constituent->_count = new med_int[_constituent->_numberOfTypes+1];
+//CCRT      _constituent->_count = new med_int[_constituent->_numberOfTypes+1];
+      _constituent->_count = new int[_constituent->_numberOfTypes+1];
       _constituent->_count[0]=1;
-      int* tmp_NumberOfConstituentsForeachType = new med_int[_constituent->_numberOfTypes+1];
+      med_int* tmp_NumberOfConstituentsForeachType = new med_int[_constituent->_numberOfTypes+1];
       tmp_NumberOfConstituentsForeachType[0]=0; // to count constituent of each type
       for (int i=0; i<_constituent->_numberOfTypes;i++) {
        _constituent->_geometricTypes[i]=ConstituentsTypes[i];
@@ -1527,7 +1584,8 @@ void CONNECTIVITY::calculateDescendingConnectivity()
          int myNumberOfFaces = _polyhedronNodal->getPolyhedronIndex()[i+1]-_polyhedronNodal->getPolyhedronIndex()[i];
          int myNumberOfNodes = _polyhedronNodal->getFacesIndex()[_polyhedronNodal->getPolyhedronIndex()[i+1]-1]-_polyhedronNodal->getFacesIndex()[_polyhedronNodal->getPolyhedronIndex()[i]-1];
          POLYHEDRONARRAY myPolyhedra(1,myNumberOfFaces,myNumberOfNodes);
-         vector<int> myFacesIndex(_polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1, _polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1 + myNumberOfFaces+1);
+//CCRT   vector<int> myFacesIndex(_polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1, _polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1 + myNumberOfFaces+1);
+         vector<med_int> myFacesIndex(_polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1, _polyhedronNodal->getFacesIndex() + _polyhedronNodal->getPolyhedronIndex()[i]-1 + myNumberOfFaces+1);
          for (int j=myNumberOfFaces; j>=0; j--)
            myFacesIndex[j] -= myFacesIndex[0]-1;
          myPolyhedra.setFacesIndex(&myFacesIndex[0]);
@@ -1536,7 +1594,24 @@ void CONNECTIVITY::calculateDescendingConnectivity()
          for (int j=0; j<myPolyhedra.getNumberOfFaces(); j++) // for each face of polyhedra
            {
              int myFaceNumberOfNodes = myPolyhedra.getFacesIndex()[j+1]-myPolyhedra.getFacesIndex()[j];
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+              int ii ;
+              const med_int * Nodes = myPolyhedra.getNodes() ;
+              int * tmp_Nodes = new int[myPolyhedra.getNumberOfNodes()] ;
+              for ( ii = 0 ; ii < myPolyhedra.getNumberOfNodes() ; ii++ )
+                 tmp_Nodes[ii] = Nodes[ii] ;
+              const med_int * FacesIndex = myPolyhedra.getFacesIndex() ;
+              int * tmp_FacesIndex = new int[myPolyhedra.getNumberOfFaces()+1] ;
+              for ( ii = 0 ; ii < myPolyhedra.getNumberOfNodes() ; ii++ )
+                 tmp_FacesIndex[ii] = FacesIndex[ii] ;
+//CCRT : copy of Nodes
+             MEDMODULUSARRAY face_poly(myFaceNumberOfNodes,tmp_Nodes + tmp_FacesIndex[j]-1);
+//CCRT              delete [] tmp_Nodes ;
+              delete [] tmp_FacesIndex ;
+#else
              MEDMODULUSARRAY face_poly(myFaceNumberOfNodes,myPolyhedra.getNodes() + myPolyhedra.getFacesIndex()[j]-1);
+#endif
              int ret_compare = 0;
 
              // we search it in existing faces
@@ -1603,7 +1678,17 @@ void CONNECTIVITY::calculateDescendingConnectivity()
 
       if (getNumberOfPolyhedron() > 0)
        {
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+          int * tmp_PolyhedronIndex = new int[getNumberOfPolyhedron()+1] ;
+          const MED_EN::med_int * PolyhedronIndex = _polyhedronNodal->getPolyhedronIndex() ;
+          int ii ;
+          for ( ii = 0 ; ii < getNumberOfPolyhedron()+1 ; ii++ )
+             tmp_PolyhedronIndex[ii] = PolyhedronIndex[ii] ;
+//CCRT : copy of PolyhedronIndex
+         _polyhedronDescending = new MEDSKYLINEARRAY(getNumberOfPolyhedron(),_polyhedronNodal->getNumberOfFaces(),tmp_PolyhedronIndex,&PolyDescending[0]); // polyhedron index are the same for nodal and descending connectivities
+#else
          _polyhedronDescending = new MEDSKYLINEARRAY(getNumberOfPolyhedron(),_polyhedronNodal->getNumberOfFaces(),_polyhedronNodal->getPolyhedronIndex(),&PolyDescending[0]); // polyhedron index are the same for nodal and descending connectivities
+#endif
 
          if (_constituent->_polygonsNodal != NULL)
            delete [] _constituent->_polygonsNodal;
index 64882d040587de30bbbb5e0bd661383c96f53b37..b75a172b68b7804d4e575bb20b14993e37329be4 100644 (file)
@@ -39,12 +39,12 @@ using namespace MEDMEM;
 using namespace MED_EN;
 
 template<>
-void fill<-1,0x3>(double *a, const double *b)
+void MEDMEM::fill<-1,0x3>(double *a, const double *b)
 {
 }
 
 template<>
-bool compare<-1>(const double *a, const double *b)
+bool MEDMEM::compare<-1>(const double *a, const double *b)
 {
   return false;
 }
index 21ccb6abb30e6be356c48ff5ddfc3acb066de9cf..269383e31c45b21d993a6dbbd293150bb7fc3a20 100644 (file)
@@ -584,7 +584,7 @@ bool GIBI_MESH_RDONLY_DRIVER::readFile (_intermediateMED* medi, bool readFields
         // (2)                                                         CARACTERISTIQUES
         // (3)      -15  317773       4       0       0       0      -2       0       3
         // (4)             317581
-        // (5)  \0\0\0\0\0\0\0\0
+        // (5)  0
         // (6)   317767  317761  317755  317815
         // (7)  YOUN     NU       H        SIGY    
         // (8)  REAL*8            REAL*8            REAL*8            REAL*8           
index 428ba8cddf82ab0af1a22ff97bcaa63eb086b0ae..aec34b04433e85caeedd80670549b837899ab549 100644 (file)
@@ -223,7 +223,8 @@ void MED_MED_RDONLY_DRIVER22::readFileStruct( void )
     int          numberOfMeshes;
     char         meshName[MED_TAILLE_NOM+1]="";
     char         meshDescription[MED_TAILLE_DESC+1]="";
-    int          meshDim;
+//CCRT    int          meshDim;
+    med_2_2::med_int          meshDim;
     med_2_2::med_maillage meshType;
 
     MESH *       ptrMesh;
@@ -393,8 +394,10 @@ void MED_MED_RDONLY_DRIVER22::readFileStruct( void )
     //    char                          timeStepUnit[MED_TAILLE_PNOM]= "";
     char                          timeStepUnit[MED_TAILLE_PNOM22+1] ;
     double                        timeStep                     = 0.0;
-    int                           orderNumber                  =  -1;                           //???init?????
-    int                           numberOfRefMesh = 0;
+//CCRT    int                           orderNumber                  =  -1;                           //???init?????
+    med_2_2::med_int                           orderNumber                  =  -1;                           //???init?????
+//CCRT    int                           numberOfRefMesh = 0;
+    med_2_2::med_int                           numberOfRefMesh = 0;
     med_2_2::med_booleen           meshLink;
     map<MESH_NAME_,MESH*>      & _meshes   =  _ptrMed->_meshes; 
     map<FIELD_NAME_,MAP_DT_IT_> & _fields   =  _ptrMed->_fields; 
index eb8c8756cd033bf34bf5f57b8bcba7505ecc024c..f7e8a01432ce0e982d2dad50a6335a7f5c3d0857 100644 (file)
@@ -255,7 +255,8 @@ void MED_MESH_RDONLY_DRIVER22::getGRID()
     {
       char meshName[MED_TAILLE_NOM+1]="";
       char meshDescription[MED_TAILLE_DESC+1]="";
-      int meshDim;
+//CCRT      int meshDim;
+      med_2_2::med_int meshDim;
       med_2_2::med_maillage meshType;
 
       err = med_2_2::MEDmaaInfo(_medIdt, (index+1),meshName, &meshDim,
@@ -314,7 +315,8 @@ void MED_MESH_RDONLY_DRIVER22::getGRID()
   //  if (gridType == MED_EN::MED_GRILLE_STANDARD)
   if (gridType == MED_EN::MED_BODY_FITTED)
     {
-      int * structure = new int[MeshDimension];
+//CCRT      int * structure = new int[MeshDimension];
+      med_int * structure = new med_int[MeshDimension];
 
       err = med_2_2::MEDstructureCoordLire(_medIdt,
                                          const_cast <char *>
@@ -489,7 +491,8 @@ int  MED_MESH_RDONLY_DRIVER22::getCOORDINATE()
     {
       char meshName[MED_TAILLE_NOM+1]="";
       char meshDescription[MED_TAILLE_DESC+1]="";
-      int meshDim;
+//CCRT      int meshDim;
+      med_2_2::med_int meshDim;
       med_2_2::med_maillage meshType;
 
       err = med_2_2::MEDmaaInfo(_medIdt, (index+1), meshName, &meshDim,
@@ -991,7 +994,8 @@ int MED_MESH_RDONLY_DRIVER22::getNodalConnectivity(CONNECTIVITY * Connectivity)
                  NodalIndex[j]=NodalIndex[j-1]+NumberOfNodeByCell ; 
 
            int tmp_numberOfCells = Connectivity->_count[i+1]-Connectivity->_count[i] ;
-               int * tmp_ConnectivityArray = new int[(NumberOfNodeByCell+multi)*tmp_numberOfCells];
+//CCRT         int * tmp_ConnectivityArray = new int[(NumberOfNodeByCell+multi)*tmp_numberOfCells];
+               med_2_2::med_int * tmp_ConnectivityArray = new med_2_2::med_int[(NumberOfNodeByCell+multi)*tmp_numberOfCells];
          
                //        int err=MEDconnLire(_medIdt,const_cast <char *> (_ptrMesh->_name.c_str()),
            //                    Connectivity->_entityDimension,tmp_ConnectivityArray,
@@ -1112,15 +1116,18 @@ int MED_MESH_RDONLY_DRIVER22::getNodalConnectivity(CONNECTIVITY * Connectivity)
          int tmp_numberOfFaces = constituent->_count[i+1]-constituent->_count[i] ;
          // Il faut ajouter 1 pour le zero a la lecture !!!
           // ATTENTION UNIQUEMENT POUR MED < 2.2.x
-                 int * tmp_constituentArray = NULL;
+//CCRT           int * tmp_constituentArray = NULL;
+                 med_2_2::med_int * tmp_constituentArray = NULL;
 
            MESSAGE(LOC << "Med file version used here " << major << " " << minor << " " << release);
 
            if ((major == 2) && (minor <= 1))
-                   tmp_constituentArray = new int[(NumberOfNodeByFace+1)*tmp_numberOfFaces] ;
+//CCRT             tmp_constituentArray = new int[(NumberOfNodeByFace+1)*tmp_numberOfFaces] ;
+                   tmp_constituentArray = new med_2_2::med_int[(NumberOfNodeByFace+1)*tmp_numberOfFaces] ;
            else if ((major == 2) && (minor >= 2))
                    {
-                     tmp_constituentArray = new int[NumberOfNodeByFace*tmp_numberOfFaces] ;
+//CCRT               tmp_constituentArray = new int[NumberOfNodeByFace*tmp_numberOfFaces] ;
+                     tmp_constituentArray = new med_2_2::med_int[NumberOfNodeByFace*tmp_numberOfFaces] ;
             MESSAGE(LOC<<": WE ARE USING MED2.2 so there is no +1 for calculating the size of  tmp_constituentArray !") ;
          }
 
@@ -1244,15 +1251,18 @@ int MED_MESH_RDONLY_DRIVER22::getNodalConnectivity(CONNECTIVITY * Connectivity)
                  // Il faut ajouter 1 pour le zero a la lecture !!!
 
                  // ATTENTION UNIQUEMENT POUR MED < 2.2.x
-                 int * tmp_constituentArray = NULL;
+//CCRT           int * tmp_constituentArray = NULL;
+                 med_2_2::med_int * tmp_constituentArray = NULL;
 
              MESSAGE(LOC << "Med file version used here " << major << " " << minor << " " << release);
 
              if ((major == 2) && (minor <= 1))
-                   tmp_constituentArray = new int[(NumberOfNodeByEdge+1)*tmp_numberOfEdges] ;
+//CCRT             tmp_constituentArray = new int[(NumberOfNodeByEdge+1)*tmp_numberOfEdges] ;
+                   tmp_constituentArray = new med_2_2::med_int[(NumberOfNodeByEdge+1)*tmp_numberOfEdges] ;
              else if ((major == 2) && (minor >= 2))
                    {
-                     tmp_constituentArray = new int[NumberOfNodeByEdge*tmp_numberOfEdges] ;
+//CCRT               tmp_constituentArray = new int[NumberOfNodeByEdge*tmp_numberOfEdges] ;
+                     tmp_constituentArray = new med_2_2::med_int[NumberOfNodeByEdge*tmp_numberOfEdges] ;
             MESSAGE(LOC<<": WE ARE USING MED2.2 so there is no +1 for calculating the size of  tmp_constituentArray !") ;
           }
          
@@ -1381,13 +1391,41 @@ int MED_MESH_RDONLY_DRIVER22::getNodalConnectivity(CONNECTIVITY * Connectivity)
              return MED_ERROR;
            }
       
-         if (Connectivity->_entityDimension == 2) // 2D mesh : polygons in Connectivity
+         if (Connectivity->_entityDimension == 2) {// 2D mesh : polygons in Connectivity
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+           int* tmp_PolygonsConnectivity = new int[ConnectivitySize];
+            int i ;
+            for ( i = 0 ; i < ConnectivitySize ; i++ )
+               tmp_PolygonsConnectivity[i] = PolygonsConnectivity[i] ;
+           int* tmp_PolygonsConnectivityIndex = new int[NumberOfPolygons+1];
+            for ( i = 0 ; i < NumberOfPolygons+1 ; i++ )
+               tmp_PolygonsConnectivityIndex[i] = PolygonsConnectivityIndex[i] ;
+           Connectivity->setPolygonsConnectivity(MED_NODAL,(medEntityMesh) Entity,tmp_PolygonsConnectivity,tmp_PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
+            delete [] tmp_PolygonsConnectivity ;
+            delete [] tmp_PolygonsConnectivityIndex ;
+#else
            Connectivity->setPolygonsConnectivity(MED_NODAL,(medEntityMesh) Entity,PolygonsConnectivity,PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
+#endif
+          }
          else if (Connectivity->_entityDimension == 3)
            {
              if (Connectivity->_constituent == NULL) // 3D mesh : polygons in Connectivity->_constituent
                Connectivity->_constituent = new CONNECTIVITY(MED_FACE);
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+             int* tmp_PolygonsConnectivity = new int[ConnectivitySize];
+              int i ;
+              for ( i = 0 ; i < ConnectivitySize ; i++ )
+                 tmp_PolygonsConnectivity[i] = PolygonsConnectivity[i] ;
+             int* tmp_PolygonsConnectivityIndex = new int[NumberOfPolygons+1];
+              for ( i = 0 ; i < NumberOfPolygons+1 ; i++ )
+                 tmp_PolygonsConnectivityIndex[i] = PolygonsConnectivityIndex[i] ;
+             Connectivity->_constituent->setPolygonsConnectivity(MED_NODAL,MED_FACE,tmp_PolygonsConnectivity,tmp_PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
+              delete [] tmp_PolygonsConnectivity ;
+              delete [] tmp_PolygonsConnectivityIndex ;
+#else
              Connectivity->_constituent->setPolygonsConnectivity(MED_NODAL,MED_FACE,PolygonsConnectivity,PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
+#endif
            }
       
          delete[] PolygonsConnectivity;
@@ -1448,7 +1486,25 @@ int MED_MESH_RDONLY_DRIVER22::getNodalConnectivity(CONNECTIVITY * Connectivity)
              return MED_ERROR;
            }
       
+//CCRT
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+         int* tmp_Nodes = new int[NumberOfNodes];
+          int i ;
+          for ( i = 0 ; i < NumberOfNodes ; i++ )
+             tmp_Nodes[i] = Nodes[i] ;
+         int* tmp_FacesIndex = new int[NumberOfFaces+1];
+          for ( i = 0 ; i < NumberOfFaces+1 ; i++ )
+             tmp_FacesIndex[i] = FacesIndex[i] ;
+         int* tmp_PolyhedronIndex = new int[NumberOfPolyhedron+1];
+          for ( i = 0 ; i < NumberOfPolyhedron+1 ; i++ )
+             tmp_PolyhedronIndex[i] = PolyhedronIndex[i] ;
+         Connectivity->setPolyhedronConnectivity(MED_NODAL,tmp_Nodes,tmp_PolyhedronIndex,NumberOfNodes,NumberOfPolyhedron,tmp_FacesIndex,NumberOfFaces);
+         delete[] tmp_Nodes;
+         delete[] tmp_FacesIndex;
+         delete[] tmp_PolyhedronIndex;
+#else
          Connectivity->setPolyhedronConnectivity(MED_NODAL,Nodes,PolyhedronIndex,NumberOfNodes,NumberOfPolyhedron,FacesIndex,NumberOfFaces);
+#endif
          
          delete[] Nodes;
          delete[] FacesIndex;
@@ -1581,16 +1637,30 @@ int  MED_MESH_RDONLY_DRIVER22::getFAMILY()
 
     for (int i=0;i<NumberOfFamilies;i++)
       {
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+       med_int tmp_NumberOfAttributes = med_2_2::MEDnAttribut(_medIdt,
+                                                     const_cast <char *>
+                                                     (_meshName.c_str()),
+                                                     (i+1));
+        int NumberOfAttributes = tmp_NumberOfAttributes ;
+#else
        int NumberOfAttributes = med_2_2::MEDnAttribut(_medIdt,
                                                      const_cast <char *>
                                                      (_meshName.c_str()),
                                                      (i+1));
+#endif
       
       if (NumberOfAttributes < 0) 
        throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER22::getFAMILY() : NumberOfAttributes" );
 
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+       med_int tmp_NumberOfGroups = med_2_2::MEDnGroupe(_medIdt, const_cast <char *>
+                                               (_meshName.c_str()),(i+1)) ;
+       int NumberOfGroups = tmp_NumberOfGroups ;
+#else
        int NumberOfGroups = med_2_2::MEDnGroupe(_medIdt, const_cast <char *>
                                                (_meshName.c_str()),(i+1)) ;
+#endif
 
        if (NumberOfGroups < 0)
          throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER22::getFAMILY() : NumberOfGroups" );
@@ -1601,6 +1671,30 @@ int  MED_MESH_RDONLY_DRIVER22::getFAMILY()
        int *  AttributesValues     = new int[NumberOfAttributes] ;
        string AttributesDescription(MED_TAILLE_DESC*NumberOfAttributes,' ') ;
        string GroupsNames(MED_TAILLE_LNOM*NumberOfGroups+1,'\0') ;
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+       med_int tmp_FamilyIdentifier ;
+       med_int *  tmp_AttributesIdentifier = new med_int[NumberOfAttributes] ;
+       med_int *  tmp_AttributesValues     = new med_int[NumberOfAttributes] ;
+       err = med_2_2::MEDfamInfo(_medIdt,const_cast <char *>
+                                (_meshName.c_str()),
+                                (i+1),const_cast <char *>
+                                (FamilyName.c_str()), &tmp_FamilyIdentifier,
+                                tmp_AttributesIdentifier,tmp_AttributesValues,
+                                const_cast <char *>
+                                (AttributesDescription.c_str()),
+                                &tmp_NumberOfAttributes, const_cast <char *>
+                                (GroupsNames.c_str()),&tmp_NumberOfGroups);
+        FamilyIdentifier = tmp_FamilyIdentifier ;
+        int ii ;
+        for ( ii = 0 ; ii < NumberOfAttributes ; ii++ ) {
+           AttributesIdentifier[ii] = tmp_AttributesIdentifier[ii] ;
+           AttributesValues[ii] = tmp_AttributesValues[ii] ;
+        }
+        NumberOfAttributes = tmp_NumberOfAttributes ;
+       NumberOfGroups = tmp_NumberOfGroups ;
+        delete [] tmp_AttributesIdentifier ;
+        delete [] tmp_AttributesValues ;
+#else
        err = med_2_2::MEDfamInfo(_medIdt,const_cast <char *>
                                 (_meshName.c_str()),
                                 (i+1),const_cast <char *>
@@ -1610,6 +1704,7 @@ int  MED_MESH_RDONLY_DRIVER22::getFAMILY()
                                 (AttributesDescription.c_str()),
                                 &NumberOfAttributes, const_cast <char *>
                                 (GroupsNames.c_str()),&NumberOfGroups);
+#endif
 
 
        SCRUTE(GroupsNames);
@@ -1710,10 +1805,21 @@ int  MED_MESH_RDONLY_DRIVER22::getNodesFamiliesNumber(int * MEDArrayNodeFamily)
     {
     int err = 0 ;
 
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+      med_int * tmp_MEDArrayNodeFamily = new med_int[_ptrMesh->getNumberOfNodes()] ;
+      err = MEDfamLire(_medIdt, const_cast <char *>
+                      (_ptrMesh->_name.c_str()), tmp_MEDArrayNodeFamily,
+                      _ptrMesh->getNumberOfNodes(), med_2_2::MED_NOEUD,
+                      (med_2_2::med_geometrie_element) MED_NONE);
+      int i ;
+      for ( i = 0 ; i < _ptrMesh->getNumberOfNodes() ; i++ )
+         MEDArrayNodeFamily[i] = tmp_MEDArrayNodeFamily[i] ;
+#else
       err = MEDfamLire(_medIdt, const_cast <char *>
                       (_ptrMesh->_name.c_str()), MEDArrayNodeFamily,
                       _ptrMesh->getNumberOfNodes(), med_2_2::MED_NOEUD,
                       (med_2_2::med_geometrie_element) MED_NONE);
+#endif
 
       if ( err != MED_VALID)
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC) << "There is no family for the |"<< _ptrMesh->getNumberOfNodes() << "| nodes in mesh |" << _ptrMesh->_name.c_str() << "|"));
@@ -1740,6 +1846,27 @@ int  MED_MESH_RDONLY_DRIVER22::getCellsFamiliesNumber(int **MEDArrayFamily,
     for (i=0;i<Connectivity->getNumberOfTypesWithPoly(Connectivity->_entity);i++)
       {
        int NumberOfCell=Connectivity->getNumberOfElementsWithPoly(Connectivity->_entity,types[i]);
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+        med_2_2::med_int * tmp_MEDArrayFamily = new med_2_2::med_int[NumberOfCell] ;
+       err=MEDfamLire(_medIdt,const_cast <char *> (_ptrMesh->_name.c_str()),
+                      tmp_MEDArrayFamily,NumberOfCell,
+                      (med_2_2::med_entite_maillage) Connectivity->_entity,
+                      (med_2_2::med_geometrie_element)types[i]);
+       if (err != MED_VALID)
+         {
+           err=MEDfamLire(_medIdt,const_cast <char *>
+                          (_ptrMesh->_name.c_str()),
+                          tmp_MEDArrayFamily,NumberOfCell,
+                          med_2_2::MED_MAILLE,
+                          (med_2_2::med_geometrie_element)types[i]);
+           if (err != MED_VALID)
+             throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<Connectivity->_geometricTypes[i]));
+         }
+        int ii ;
+        for ( ii = 0 ; ii < NumberOfCell ; ii++ )
+           MEDArrayFamily[i][ii] = tmp_MEDArrayFamily[ii] ;
+        delete [] tmp_MEDArrayFamily ;
+#else
        err=MEDfamLire(_medIdt,const_cast <char *> (_ptrMesh->_name.c_str()),
                       MEDArrayFamily[i],NumberOfCell,
                       (med_2_2::med_entite_maillage) Connectivity->_entity,
@@ -1754,6 +1881,7 @@ int  MED_MESH_RDONLY_DRIVER22::getCellsFamiliesNumber(int **MEDArrayFamily,
            if (err != MED_VALID)
              throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<Connectivity->_geometricTypes[i]));
          }
+#endif
       }
     delete [] types;
     return MED_VALID;
@@ -1851,7 +1979,8 @@ void MED_MESH_WRONLY_DRIVER22::write(void) const
       err = med_2_2::MEDfamCr( _medIdt,
                              const_cast <char *> ( _meshName.c_str() ),
                              familyName, 0,
-                             (int*)NULL, (int*)NULL, (char*)NULL, 0,
+//CCRT                       (int*)NULL, (int*)NULL, (char*)NULL, 0,
+                             (med_2_2::med_int*)NULL, (med_2_2::med_int*)NULL, (char*)NULL, 0,
                              (char*)NULL, 0);
 
       SCRUTE(familyName);
@@ -2009,7 +2138,8 @@ int MED_MESH_WRONLY_DRIVER22::writeGRID() const
                                     << "| and units |"       << tmp_unit
                                     << " |")) ;
 
-      int* structure = new int [meshDimension];
+//CCRT      int* structure = new int [meshDimension];
+      med_2_2::med_int* structure = new med_2_2::med_int [meshDimension];
 
       for (int idim = 0; idim < meshDimension; ++idim)
        structure[idim] = ArrayLen [idim];
@@ -2177,10 +2307,23 @@ int MED_MESH_WRONLY_DRIVER22::writeCoordinates() const {
 
       if (_ptrMesh->_arePresentOptionnalNodesNumbers==1) {
         
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+        const int * NodesNumbers = _ptrMesh->_coordinate->getNodesNumbers() ;
+        med_2_2::med_int * tmp_NodesNumbers = new med_int[_ptrMesh->_numberOfNodes] ;
+        int ii ;
+        for ( ii = 0 ; ii < _ptrMesh->_numberOfNodes ; ii++ )
+           tmp_NodesNumbers[ii] = NodesNumbers[ii] ;
+        err =  MEDnumEcr(_medIdt, const_cast <char *> (_meshName.c_str()),
+                         tmp_NodesNumbers , 
+                         _ptrMesh->_numberOfNodes, med_2_2::MED_NOEUD,
+                        med_2_2::med_geometrie_element(0) );
+        delete [] tmp_NodesNumbers ;
+#else
         err =  MEDnumEcr(_medIdt, const_cast <char *> (_meshName.c_str()),
                          const_cast <med_int *> (_ptrMesh->_coordinate->getNodesNumbers() ), 
                          _ptrMesh->_numberOfNodes, med_2_2::MED_NOEUD,
                         med_2_2::med_geometrie_element(0) );
+#endif
 
         if (err != MED_VALID) 
           throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write optionnal numbers of mesh |" << 
@@ -2233,7 +2376,8 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
          //        if ( (types[i]/ 100) < _ptrMesh->_spaceDimension) 
          //          multi=1 ;
          int numberOfNodes = types[i]%100 ;
-         int * connectivityArray = new int[numberOfElements*(numberOfNodes+multi)];
+//CCRT   int * connectivityArray = new int[numberOfElements*(numberOfNodes+multi)];
+         med_2_2::med_int * connectivityArray = new med_2_2::med_int[numberOfElements*(numberOfNodes+multi)];
       
          // version originale sans prise en compte des numéros optionnels 
          //     
@@ -2306,6 +2450,26 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
   // Polygons writing
   if (_ptrMesh->existPolygonsConnectivity(MED_NODAL,entity))
     {
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+      med_2_2::med_int * tmp_PolygonsConnectivityIndex = new med_2_2::med_int[_ptrMesh->getNumberOfPolygons()+1] ;
+      const int * PolygonsConnectivityIndex = _ptrMesh->getPolygonsConnectivityIndex(MED_NODAL,entity) ;
+      int ii ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolygons()+1 ; ii++ )
+         tmp_PolygonsConnectivityIndex[ii] = PolygonsConnectivityIndex[ii] ;
+      med_2_2::med_int * tmp_PolygonsConnectivity = new med_2_2::med_int[_ptrMesh->getNumberOfPolygons()+1] ;
+      const int * PolygonsConnectivity = _ptrMesh->getPolygonsConnectivity(MED_NODAL,entity) ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolygons()+1 ; ii++ )
+         tmp_PolygonsConnectivity[ii] = PolygonsConnectivity[ii] ;
+      err = MEDpolygoneConnEcr(_medIdt,
+                              const_cast <char *> (_meshName.c_str()),
+                              tmp_PolygonsConnectivityIndex,
+                              _ptrMesh->getNumberOfPolygons()+1,
+                              tmp_PolygonsConnectivity,
+                              (med_2_2::med_entite_maillage) entity,
+                              med_2_2::MED_NOD);
+      delete [] tmp_PolygonsConnectivityIndex ;
+      delete [] tmp_PolygonsConnectivity ;
+#else
       err = MEDpolygoneConnEcr(_medIdt,
                               const_cast <char *> (_meshName.c_str()),
                               const_cast <med_int*> (_ptrMesh->getPolygonsConnectivityIndex(MED_NODAL,entity)),
@@ -2313,6 +2477,7 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
                               const_cast <med_int*> (_ptrMesh->getPolygonsConnectivity(MED_NODAL,entity)),
                               (med_2_2::med_entite_maillage) entity,
                               med_2_2::MED_NOD);
+#endif
 
       if (err<0)
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write polygons nodal connectivities of mesh |" <<  _meshName.c_str() << "| in file |" << _fileName
@@ -2324,6 +2489,32 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
   // Polyhedron writing
   if (_ptrMesh->existPolyhedronConnectivity(MED_NODAL,entity))
     {
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+      med_2_2::med_int * tmp_PolyhedronIndex = new med_2_2::med_int[_ptrMesh->getNumberOfPolyhedron()+1] ;
+      const int * PolyhedronIndex = _ptrMesh->getPolyhedronIndex(MED_NODAL) ;
+      int ii ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolyhedron()+1 ; ii++ )
+         tmp_PolyhedronIndex[ii] = PolyhedronIndex[ii] ;
+      med_2_2::med_int * tmp_PolyhedronFacesIndex = new med_2_2::med_int[_ptrMesh->getNumberOfPolyhedronFaces()+1] ;
+      const int * PolyhedronFacesIndex = _ptrMesh->getPolyhedronFacesIndex() ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolyhedronFaces()+1 ; ii++ )
+         tmp_PolyhedronFacesIndex[ii] = PolyhedronFacesIndex[ii] ;
+      med_2_2::med_int * tmp_PolyhedronConnectivity = new med_2_2::med_int[_ptrMesh->getNumberOfPolyhedronFaces()+1] ;
+      const int * PolyhedronConnectivity = _ptrMesh->getPolyhedronConnectivity(MED_NODAL) ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolyhedronFaces()+1 ; ii++ )
+         tmp_PolyhedronConnectivity[ii] = PolyhedronConnectivity[ii] ;
+      err = MEDpolyedreConnEcr(_medIdt,
+                              const_cast <char *> (_meshName.c_str()),
+                              tmp_PolyhedronIndex,
+                              _ptrMesh->getNumberOfPolyhedron()+1,
+                              tmp_PolyhedronFacesIndex,
+                              _ptrMesh->getNumberOfPolyhedronFaces()+1,
+                              tmp_PolyhedronConnectivity,
+                              med_2_2::MED_NOD);
+      delete [] tmp_PolyhedronIndex ;
+      delete [] tmp_PolyhedronFacesIndex ;
+      delete [] tmp_PolyhedronConnectivity ;
+#else
       err = MEDpolyedreConnEcr(_medIdt,
                               const_cast <char *> (_meshName.c_str()),
                               const_cast <med_int*> (_ptrMesh->getPolyhedronIndex(MED_NODAL)),
@@ -2332,6 +2523,7 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
                               _ptrMesh->getNumberOfPolyhedronFaces()+1,
                               const_cast <med_int*> (_ptrMesh->getPolyhedronConnectivity(MED_NODAL)),
                               med_2_2::MED_NOD);
+#endif
 
       if (err<0)
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write polyhedron nodal connectivities of mesh |" << _meshName.c_str() << "| in file |" << _fileName
@@ -2365,6 +2557,22 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
          //                            (MED_FR::med_geometrie_element) types[i],
          //                            MED_FR::MED_DESC );
 
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+          med_2_2::med_int * tmp_Connectivity = new med_2_2::med_int[numberOfElements] ;
+          int ii ;
+          for ( ii = 0 ; ii < numberOfElements ; ii++ )
+          tmp_Connectivity[ii] = connectivity[ii] ;
+         err = med_2_2::MEDconnEcr(_medIdt,
+                               const_cast <char *> ( _meshName.c_str()),
+                               _ptrMesh->_spaceDimension,
+                               tmp_Connectivity,
+                               med_2_2::MED_FULL_INTERLACE,
+                               numberOfElements,
+                               (med_2_2::med_entite_maillage  ) entity, 
+                               (med_2_2::med_geometrie_element) types[i],
+                               med_2_2::MED_DESC );
+          delete [] tmp_Connectivity ;
+#else
          err = med_2_2::MEDconnEcr(_medIdt,
                                const_cast <char *> ( _meshName.c_str()),
                                _ptrMesh->_spaceDimension,
@@ -2374,6 +2582,7 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
                                (med_2_2::med_entite_maillage  ) entity, 
                                (med_2_2::med_geometrie_element) types[i],
                                med_2_2::MED_DESC );
+#endif
        
          if (err<0) // ETENDRE LES EXPLICATIONS
            throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write connectivities of mesh |" << _meshName.c_str() << "| in file |" << _fileName
@@ -2387,6 +2596,26 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
   // Polygons writing
   if (_ptrMesh->existPolygonsConnectivity(MED_DESCENDING,entity))
     {
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+      med_2_2::med_int * tmp_PolygonsConnectivityIndex = new med_2_2::med_int[_ptrMesh->getNumberOfPolygons()+1] ;
+      const int * PolygonsConnectivityIndex = _ptrMesh->getPolygonsConnectivityIndex(MED_DESCENDING,entity) ;
+      int ii ;
+       for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolygons()+1 ; ii++ )
+          tmp_PolygonsConnectivityIndex[ii] = PolygonsConnectivityIndex[ii] ;
+      med_2_2::med_int * tmp_PolygonsConnectivity = new med_2_2::med_int[_ptrMesh->getNumberOfPolygons()+1] ;
+      const int * PolygonsConnectivity = _ptrMesh->getPolygonsConnectivity(MED_DESCENDING,entity) ;
+       for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolygons()+1 ; ii++ )
+          tmp_PolygonsConnectivity[ii] = PolygonsConnectivity[ii] ;
+      err = MEDpolygoneConnEcr(_medIdt,
+                              const_cast <char *> (_meshName.c_str()),
+                              tmp_PolygonsConnectivityIndex,
+                              _ptrMesh->getNumberOfPolygons()+1,
+                              tmp_PolygonsConnectivity,
+                              (med_2_2::med_entite_maillage) entity,
+                              med_2_2::MED_DESC);
+      delete [] tmp_PolygonsConnectivityIndex ;
+      delete [] tmp_PolygonsConnectivity ;
+#else
       err = MEDpolygoneConnEcr(_medIdt,
                               const_cast <char *> (_meshName.c_str()),
                               const_cast <med_int*> (_ptrMesh->getPolygonsConnectivityIndex(MED_DESCENDING,entity)),
@@ -2394,6 +2623,7 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
                               const_cast <med_int*> (_ptrMesh->getPolygonsConnectivity(MED_DESCENDING,entity)),
                               (med_2_2::med_entite_maillage) entity,
                               med_2_2::MED_DESC);
+#endif
 
       if (err<0)
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write polygons descending connectivities of mesh |" <<  _meshName.c_str() << "| in file |" << _fileName
@@ -2408,6 +2638,27 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
       med_int NumberOfFaces = _ptrMesh->getPolyhedronIndex(MED_DESCENDING)[_ptrMesh->getNumberOfPolyhedron()]-1;
       vector<med_int> FacesGeometricTypes(NumberOfFaces,MED_POLYGON); // by default all polyhedron faces are polygons
 
+#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+      med_2_2::med_int * tmp_PolyhedronIndex = new med_2_2::med_int[_ptrMesh->getNumberOfPolyhedron()+1] ;
+      const int * PolyhedronIndex = _ptrMesh->getPolyhedronIndex(MED_DESCENDING) ;
+      int ii ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolyhedron()+1 ; ii++ )
+         tmp_PolyhedronIndex[ii] = PolyhedronIndex[ii] ;
+      med_2_2::med_int * tmp_PolyhedronConnectivity = new med_2_2::med_int[_ptrMesh->getNumberOfPolyhedronFaces()+1] ;
+      const int * PolyhedronConnectivity = _ptrMesh->getPolyhedronConnectivity(MED_DESCENDING) ;
+      for ( ii = 0 ; ii < _ptrMesh->getNumberOfPolyhedronFaces()+1 ; ii++ )
+         tmp_PolyhedronConnectivity[ii] = PolyhedronConnectivity[ii] ;
+      err = MEDpolyedreConnEcr(_medIdt,
+                              const_cast <char *> (_meshName.c_str()),
+                              tmp_PolyhedronIndex,
+                              _ptrMesh->getNumberOfPolyhedron()+1,
+                              &FacesGeometricTypes[0],
+                              NumberOfFaces,
+                              tmp_PolyhedronConnectivity,
+                              med_2_2::MED_DESC);
+      delete [] tmp_PolyhedronIndex ;
+      delete [] tmp_PolyhedronConnectivity ;
+#else
       err = MEDpolyedreConnEcr(_medIdt,
                               const_cast <char *> (_meshName.c_str()),
                               const_cast <med_int*> (_ptrMesh->getPolyhedronIndex(MED_DESCENDING)),
@@ -2416,6 +2667,7 @@ int MED_MESH_WRONLY_DRIVER22::writeConnectivities(medEntityMesh entity) const
                               NumberOfFaces,
                               const_cast <med_int*> (_ptrMesh->getPolyhedronConnectivity(MED_DESCENDING)),
                               med_2_2::MED_DESC);
+#endif
 
       if (err<0)
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC) <<"Can't write polyhedron descending connectivities of mesh |" << _meshName.c_str() << "| in file |" << _fileName
@@ -2441,7 +2693,8 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
     
     // We build the array from the families list objects :
     int NumberOfNodes = _ptrMesh->getNumberOfNodes() ;
-    int * MEDArrayNodeFamily = new int[NumberOfNodes] ;
+//CCRT    int * MEDArrayNodeFamily = new int[NumberOfNodes] ;
+    med_2_2::med_int * MEDArrayNodeFamily = new med_2_2::med_int[NumberOfNodes] ;
     // family 0 by default
     for (int i=0; i<NumberOfNodes; i++)
       MEDArrayNodeFamily[i]=0;
@@ -2561,7 +2814,7 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
 #if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
        err = MEDfamEcr(_medIdt, const_cast <char *> ( _meshName.c_str() ),
                        temp+typeCount[i]-1,typeCount[i+1]-typeCount[i],
-                       med_2_2::MED_REMP ,
+//CCRT                 med_2_2::MED_REMP ,
                        (med_2_2::med_entite_maillage) entity,
                        (med_2_2::med_geometrie_element) types[i]
 );
@@ -2578,9 +2831,10 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
                                       << "| cells of geometric type |" << geoNames[types[i]] <<"|in mesh |"      
                                       << _ptrMesh->_name.c_str() << "|" ));   
       }
-#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
-      delete [] temp;
-#endif
+//CCRT Clutter
+//CCRT#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+//CCRT      delete [] temp;
+//CCRT#endif
       delete[] MEDArrayFamily ;
       //if (true == ToDestroy) {
       //  int NumberOfFamilies = myFamilies->size();
@@ -2636,12 +2890,13 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
       }
 
       const int * typeCount = _ptrMesh->getGlobalNumberingIndex(entity) ;
-#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
-       int lgth=numberOfElements;
-       med_2_2::med_int *temp=new med_2_2::med_int[lgth];
-       for(int i2=0;i2<lgth;i2++)
-         temp[i2]=(med_2_2::med_int) (familyArray[i2]);
-#endif
+//CCRT Clutter
+//CCRT#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+//CCRT int lgth=numberOfElements;
+//CCRT med_2_2::med_int *temp=new med_2_2::med_int[lgth];
+//CCRT for(int i2=0;i2<lgth;i2++)
+//CCRT   temp[i2]=(med_2_2::med_int) (familyArray[i2]);
+//CCRT#endif
       for (int i=0; i<numberOfTypes; i++) {
        int typeNumberOfElements = typeCount[i+1] - typeCount[i] ;
 
@@ -2655,10 +2910,13 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
                                       << "| faces of geometric type |" << geoNames[types[i]] <<"|in mesh |"      
                                       << _ptrMesh->_name.c_str() << "|" ));   
       }
+//CCRT there was "temp" for OSF and "familyArray" for Linux ...
 #if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
       delete [] temp;
-#endif
+//CCRT#endif
+#else
       delete[] familyArray ;
+#endif
       //if (true == ToDestroy) {
       //  int NumberOfFamilies = myFamilies->size();
       //    for (int i=0; i<NumberOfFamilies; i++)
@@ -2677,7 +2935,8 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
       const medGeometryElement  * types = _ptrMesh->getTypes         (entity) ;
       
       int numberOfElements = _ptrMesh->getNumberOfElements(entity, MED_ALL_ELEMENTS) ;
-      int * familyArray = new int[numberOfElements] ;
+//CCRT      int * familyArray = new int[numberOfElements] ;
+      med_2_2::med_int * familyArray = new med_2_2::med_int[numberOfElements] ;
       for (int i=0;i<numberOfElements;i++)
        familyArray[i]=0;
 
@@ -2713,12 +2972,13 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
       }
 
       const int * typeCount = _ptrMesh->getGlobalNumberingIndex(entity) ;
-#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
-       int lgth=numberOfElements;
-       med_2_2::med_int *temp=new med_2_2::med_int[lgth];
-       for(int i2=0;i2<lgth;i2++)
-         temp[i2]=(med_2_2::med_int) (familyArray[i2]);
-#endif
+//CCRT : clutter :
+//CCRT#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+//CCRT int lgth=numberOfElements;
+//CCRT med_2_2::med_int *temp=new med_2_2::med_int[lgth];
+//CCRT for(int i2=0;i2<lgth;i2++)
+//CCRT   temp[i2]=(med_2_2::med_int) (familyArray[i2]);
+//CCRT#endif
       for (int i=0; i<numberOfTypes; i++) {
        int typeNumberOfElements = typeCount[i+1] - typeCount[i] ;
 
@@ -2732,9 +2992,10 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
                                       << "| edges of geometric type |" << geoNames[types[i]] <<"|in mesh |"      
                                       << _ptrMesh->_name.c_str() << "|" ));   
       }
-#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
-      delete [] temp;
-#endif
+//CCRT : clutter :
+//CCRT#if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
+//CCRT      delete [] temp;
+//CCRT#endif
       delete[] familyArray ;
       //if (true == ToDestroy) {
       //  int NumberOfFamilies = myFamilies->size();
index f8956af936b124ef13dd03eeb2c8a4cf6e36d714..466aee083d24806577c36c6fdeead71924c1dfbd 100644 (file)
@@ -17,8 +17,9 @@
 //
 // See http://www.salome-platform.org/
 //
-using namespace std;
 #include "MEDMEM_PolyhedronArray.hxx"
+
+using namespace std;
 using namespace MEDMEM;
 using MED_EN::med_int;
 
index 7a6e4b67b82d3445a19cc91076c7784a8c46a6a0..401566816a03cda724ec0119cffa8ba5295c9ba5 100644 (file)
@@ -177,8 +177,8 @@ LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lmed_V2_1
 ifeq ($(MED_WITH_KERNEL),yes)
   CPPFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome
   CXXFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome
-  LDFLAGS+= -lSALOMELocalTrace  -L${KERNEL_ROOT_DIR}/lib/salome
-  LDFLAGSFORBIN+= -lSALOMELocalTrace -lSALOMEBasics -L${KERNEL_ROOT_DIR}/lib/salome
+  LDFLAGS+= -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace 
+  LDFLAGSFORBIN+= -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -lSALOMEBasics
 endif
 
 LIBSFORBIN=
index bfc08d661bd9a7a8a382ddb6f2fc08c93fd05fea..2cdb88beac11278377eee9a40db58a2734f96097 100644 (file)
@@ -33,33 +33,40 @@ int main(void)
   //POLYGONS
   const med_int NumberOfPolygons = 2;
   const med_int ConnectivitySize = 12;
-  med_int PolygonsConnectivityIndex[NumberOfPolygons+1] = {1,7,13};
+//CCRT  med_int PolygonsConnectivityIndex[NumberOfPolygons+1] = {1,7,13};
+  int PolygonsConnectivityIndex[NumberOfPolygons+1] = {1,7,13};
 
   //Nodal
-  med_int PolygonsNodalConnectivity[ConnectivitySize] = {1,2,3,4,5,10,10,5,6,7,8,9};
+//CCRT  med_int PolygonsNodalConnectivity[ConnectivitySize] = {1,2,3,4,5,10,10,5,6,7,8,9};
+  int PolygonsNodalConnectivity[ConnectivitySize] = {1,2,3,4,5,10,10,5,6,7,8,9};
 
   myNodalConnectivity.setPolygonsConnectivity(MED_NODAL,MED_CELL,PolygonsNodalConnectivity,PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
 
   //Descending
-  med_int PolygonsDescendingConnectivity[ConnectivitySize] = {1,2,3,4,11,10,11,5,6,7,8,9};
+//CCRT  med_int PolygonsDescendingConnectivity[ConnectivitySize] = {1,2,3,4,11,10,11,5,6,7,8,9};
+  int PolygonsDescendingConnectivity[ConnectivitySize] = {1,2,3,4,11,10,11,5,6,7,8,9};
 
   myDescendingConnectivity.setPolygonsConnectivity(MED_DESCENDING,MED_CELL,PolygonsDescendingConnectivity,PolygonsConnectivityIndex,ConnectivitySize,NumberOfPolygons);
 
   //POLYHEDRON
   const med_int NumberOfPolyhedron = 2;
-  med_int PolyhedronIndex[NumberOfPolyhedron+1] = {1,10,20};
+//CCRT  med_int PolyhedronIndex[NumberOfPolyhedron+1] = {1,10,20};
+  int PolyhedronIndex[NumberOfPolyhedron+1] = {1,10,20};
 
   //Nodal
   const med_int NumberOfFaces = 19;
   const med_int NumberOfNodes = 74;
-  med_int PolyhedronFacesIndex[NumberOfFaces+1] = {1,7,11,15,19,23,27,31,34,39,44,48,52,55,58,61,64,68,72,75};
-  med_int PolyhedronNodalConnectivity[NumberOfNodes] = {1,2,3,4,5,6,1,7,8,2,2,8,9,3,4,3,9,10,5,4,10,11,6,5,11,12,1,6,12,7,7,12,8,10,9,8,12,11,13,14,15,3,2,13,2,8,16,14,13,16,17,15,14,17,15,17,18,15,18,9,3,15,9,2,3,9,8,8,9,17,16,9,18,17};
+//CCRT  med_int PolyhedronFacesIndex[NumberOfFaces+1] = {1,7,11,15,19,23,27,31,34,39,44,48,52,55,58,61,64,68,72,75};
+  int PolyhedronFacesIndex[NumberOfFaces+1] = {1,7,11,15,19,23,27,31,34,39,44,48,52,55,58,61,64,68,72,75};
+//CCRT  med_int PolyhedronNodalConnectivity[NumberOfNodes] = {1,2,3,4,5,6,1,7,8,2,2,8,9,3,4,3,9,10,5,4,10,11,6,5,11,12,1,6,12,7,7,12,8,10,9,8,12,11,13,14,15,3,2,13,2,8,16,14,13,16,17,15,14,17,15,17,18,15,18,9,3,15,9,2,3,9,8,8,9,17,16,9,18,17};
+  int PolyhedronNodalConnectivity[NumberOfNodes] = {1,2,3,4,5,6,1,7,8,2,2,8,9,3,4,3,9,10,5,4,10,11,6,5,11,12,1,6,12,7,7,12,8,10,9,8,12,11,13,14,15,3,2,13,2,8,16,14,13,16,17,15,14,17,15,17,18,15,18,9,3,15,9,2,3,9,8,8,9,17,16,9,18,17};
 
   myNodalConnectivity.setPolyhedronConnectivity(MED_NODAL,PolyhedronNodalConnectivity,PolyhedronIndex,NumberOfNodes,NumberOfPolyhedron,PolyhedronFacesIndex,NumberOfFaces);
 
   //Descending
   const med_int DescendingConnectivitySize = 19;
-  med_int PolyhedronDescendingConnectivity[DescendingConnectivitySize] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,3,17,18};
+//CCRT  med_int PolyhedronDescendingConnectivity[DescendingConnectivitySize] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,3,17,18};
+  int PolyhedronDescendingConnectivity[DescendingConnectivitySize] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,3,17,18};
 
   myDescendingConnectivity.setPolyhedronConnectivity(MED_DESCENDING,PolyhedronDescendingConnectivity,PolyhedronIndex,DescendingConnectivitySize,NumberOfPolyhedron);
 
index 3634a9e4771878b9ca176371958740141290e653..e95ff91dfa5e02f798b8ddc43d890f22598243ef 100644 (file)
@@ -66,7 +66,7 @@ LDFLAGSFORBIN= -L$(top_builddir)/lib/salome
 
 CPPFLAGS+= $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS+= -I${KERNEL_ROOT_DIR}/include/salome
-LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -lSalomeCommunication -lSalomeGenericObj
+LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace -lSalomeCommunication -lSalomeGenericObj
 #LDFLAGS+=-lmedmem  -L. -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification
 # does we put only -lSalomeContainer and compiler retrieves -lSalomeNS -lRegistry -lOpUtil ????