-// Copyright (C) 2006-2015 EDF R&D
+// Copyright (C) 2006-2021 EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
cout << "\tMaille " << i << " :" << endl;
//Boucle sur les noeuds de la maille de numéro local i dans le type tm
- int * offset = CNX[tm] + nnoeuds * i;
+ med_int * offset = CNX[tm] + nnoeuds * i;
for (int j = 0; j < nnoeuds; j++)
{
int ngnoeud = *(offset + j);
}
}
-void Maillage::listeMaillesType(TYPE_MAILLE tm)
+void Maillage::listeMaillesType(TYPE_MAILLE /*tm*/)
{
cout << "La fonction \"Restitution des mailles par type\" est obsolète " << endl;
int Maillage::noeudVoisin(int ngnoeud, int imaille, TYPE_MAILLE tm)
{
float x, y, z;
- int ngv;
+ int ngv = -1;
float x0 = XX[ngnoeud - 1];
float y0 = YY[ngnoeud - 1];
float z0 = ZZ[ngnoeud - 1];
// Lecture des infos concernant le premier maillage
if (MEDmeshInfo(fid, 1, maa, &spacedim, &mdim, &type, desc, dtunit, &sortingtype, &nPasTemps, &axistype, axisname,
unitname) < 0)
- ERREUR("Error while reading mesh informations ");
+ ERREUR("Error while reading mesh information ");
//cout << chrono() << " --- inputMED: MEDmeshInfo: OK" << endl;
// cerr << "maa=" << maa << endl;
ostringstream OSCOORD;
med_int nnoe = 0; // Nbre de noeuds
- med_float *coo1; // Table des coordonnées
+ med_float *coo1 = 0; // Table des coordonnées
// char nomcoo[mdim * MED_SNAME_SIZE + 1]; // Table des noms des coordonnées
// char unicoo[mdim * MED_SNAME_SIZE + 1]; // Table des unités des coordonnées
- char *nomnoe;
+ char *nomnoe = 0;
- med_int *numnoe;
- med_int *nufano;
+ med_int *numnoe = 0;
+ med_int *nufano = 0;
// med_grid_type rep;
// med_bool inonoe, inunoe;
// med_int profil[2] = { 2, 3 };
}
void Maillage::acquisitionTYPE_inputMED(TYPE_MAILLE TYPE, int nTYPE, med_idt fid, char maa[MED_NAME_SIZE + 1],
- med_int mdim)
+ med_int /*mdim*/)
{
// int taille, numeromaille, numeroFamille;
med_int *famTYPE = (med_int*) malloc(sizeof(med_int) * nTYPE);
//med_int *conTYPE = (med_int*) malloc(sizeof(med_int)*tTYPE*nTYPE);
- CNX[TYPE] = (int*) malloc(sizeof(int) * tTYPE * nTYPE);
+ CNX[TYPE] = (med_int*) malloc(sizeof(med_int) * tTYPE * nTYPE);
med_bool inomTYPE, inumTYPE, ifamTYPE;
med_geometry_type typeBanaliseMED = InstanceMGE(TYPE);
void Maillage::outputMED(std::string fichierMED)
{
// int i, j, k;
- int nTYPE, tTYPE;
+ int nTYPE;//, tTYPE;
string line, s, stype, nomnoeud;
// med_err ret = 0; // Code retour
// int ig, jg;
// float x, y, z;
med_int nnoe = nombreNoeudsMaillage; // Nombre de noeuds
- med_float *coo; // Table des coordonnées
+ med_float *coo = 0; // Table des coordonnées
// Noms des coordonnées (variable nomcoo)
char* nomcoo = new char[mdim * MED_SNAME_SIZE + 1];
// Tables des noms, numeros, numeros de familles des noeuds
// autant d'elements que de noeuds - les noms ont pout longueur MED_SNAME_SIZE
- char *nomnoe;
+ char *nomnoe = 0;
med_int *numnoe = NULL;
- med_int *nufano;
+ med_int *nufano = NULL;
med_bool inonoe = MED_FALSE;
med_bool inunoe = MED_FALSE;
if (EFFECTIFS_TYPES[tm])
{
nTYPE = EFFECTIFS_TYPES[tm];
- tTYPE = Nnoeuds(tm);
+ //tTYPE = Nnoeuds(tm);
MGE = InstanceMGE(tm);
stype = TM2string(tm);
TYPE_MAILLE Maillage::TYPE(int nglobal)
{
// Attention, les num. globaux commencent à 1, les num. locaux à 0
- TYPE_MAILLE resultat;
+ TYPE_MAILLE resultat = (TYPE_MAILLE)-1;
int cpt = 0;
for (int itm = (int) POI1; itm <= (int) HEXA20; itm++)
{
return resultat;
}
-int Maillage::NLOCAL(int nglobal, TYPE_MAILLE tm)
+int Maillage::NLOCAL(int nglobal, TYPE_MAILLE /*tm*/)
{
// Attention, les num. globaux commencent à 1, les num. locaux à 0
int nPOI1 = EFFECTIFS_TYPES[POI1];
// ************* Modification de la connectivité du type concerné
- int* CNX2;
+ med_int* CNX2;
int nNoeudsType = Nnoeuds(tm);
int tailleCNX2 = nNoeudsType * (EFFECTIFS_TYPES[tm] - listeMaillesSuppr.size());
- CNX2 = (int*) malloc(sizeof(int) * tailleCNX2);
+ CNX2 = (med_int*) malloc(sizeof(med_int) * tailleCNX2);
// Recopie sélective des connectivités
int isuppr = 0; // indice dans listeMaillesSuppr
int ih2 = 0; // nouveau numéro local ( remarque: ih2 = ih1 - isuppr )