-#!/bin/bash
+#!/bin/sh
#
# Tool for updating list of .in file for the SALOME project
# 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
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
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
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}
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
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
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 ---------------------------------------------
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
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
{
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];
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
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
{
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 !"));
}
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 !"));
}
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 !"));
}
_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];
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]);
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
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;
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;
}
// (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
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;
// 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;
{
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,
// 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 *>
{
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,
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,
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 !") ;
}
// 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 !") ;
}
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;
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;
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" );
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 *>
(AttributesDescription.c_str()),
&NumberOfAttributes, const_cast <char *>
(GroupsNames.c_str()),&NumberOfGroups);
+#endif
SCRUTE(GroupsNames);
{
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() << "|"));
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,
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;
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);
<< "| 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];
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 |" <<
// 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
//
// 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)),
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
// 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)),
_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
// (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,
(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
// 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)),
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
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)),
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
// 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;
#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]
);
<< "| 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();
}
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] ;
<< "| 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++)
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;
}
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] ;
<< "| 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();
//
// See http://www.salome-platform.org/
//
-using namespace std;
#include "MEDMEM_PolyhedronArray.hxx"
+
+using namespace std;
using namespace MEDMEM;
using MED_EN::med_int;
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=
//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);
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 ????