Ignore:
Timestamp:
05/31/23 12:20:29 (13 months ago)
Author:
ymipsl
Message:

Supress limitation of number of vertex max in remaper.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS2/trunk/extern/remap/src/meshutil.cpp

    r2502 r2506  
    2424  Coord *a_gno   = new Coord[na]; 
    2525   
    26   Coord OC=barycentre(a.vertex,a.n) ; 
     26  Coord OC=barycentre(a.vertex.data(),a.n) ; 
    2727  Coord Oz=OC ; 
    2828  Coord Ox=crossprod(Coord(0,0,1),Oz) ; 
     
    6767  { 
    6868    bary = bary * (-1.) ; 
    69     switchOrientation(a.n, a.vertex,a.edge,a.d) ; 
     69    switchOrientation(a.n, a.vertex.data(),a.edge.data(),a.d.data()) ; 
    7070  } 
    7171   
     
    7979void cptEltGeom(Elt& elt, const Coord &pole) 
    8080{ 
    81    orient(elt.n, elt.vertex, elt.edge, elt.d, elt.x); 
     81   orient(elt.n, elt.vertex.data(), elt.edge.data(), elt.d.data(), elt.x); 
    8282   normals(elt, pole); 
    8383//  Coord gg; 
     
    205205    elts[j]->val = 0; 
    206206 
    207   Elt *neighbours[NMAX]; 
     207//  Elt *neighbours[NMAX]; 
    208208  for (int j = 0; j < N; j++) 
    209209  { 
     210    vector<Elt*> neighbours(elts[j]->n) ; 
     211 
    210212    for (int i = 0; i < elts[j]->n; i++)  
    211213      if ( elts[j]->neighbour[i]== NOT_FOUND) neighbours[i]=NULL ; // no neighbour 
     
    223225        /* for weight computation all values are always kept zero and only set to one when used .. */ 
    224226        neighbours[i]->val = 1; 
    225         elts[j]->gradNeigh[i] = gradient(*(elts[j]), neighbours); 
     227        elts[j]->gradNeigh[i] = gradient(*(elts[j]), neighbours.data()); 
    226228        /* .. and right after zeroed again */ 
    227229        neighbours[i]->val = 0; 
     
    234236    } 
    235237 
     238/*  not needed anymore 
    236239    for(int i = elts[j]->n ; i < NMAX; i++) 
    237240    { 
     
    239242      elts[j]->neighId[i].ind = -1; // mark end 
    240243    } 
     244*/ 
    241245    /* For the most naive algorithm the case where the element itself is one must also be considered. 
    242246       Thomas says this can later be optimized out. */ 
    243247    elts[j]->val = 1; 
    244     elts[j]->grad = gradient(*(elts[j]), neighbours); 
     248    elts[j]->grad = gradient(*(elts[j]), neighbours.data()); 
    245249    elts[j]->val = 0; 
    246250  } 
Note: See TracChangeset for help on using the changeset viewer.