49     int npts = xc.num_elements();
    51     int nq = streak->GetTotPoints();    
    55     streak->GetCoords(x,y);         
    57     streak->BwdTrans(streak->GetCoeffs(),streak->UpdatePhys());
    64     for(i = 0; i < npts; ++i)
    66         xc[i]  = x_min + (x_max - x_min)*i/((
NekDouble)(npts-1));
    71     int elmtid, offset,cnt;    
    81     for(
int e=0; e<npts; e++)
    93         while((abs(F)> ConvTol)&&(cnt < maxiter))
    95             elmtid = streak->GetExpIndex(coord,CoordTol);
    96             offset = streak->GetPhys_Offset(elmtid);
    98             U  = streak->GetExp(elmtid)->PhysEvaluate(coord, streak->GetPhys() + offset);
    99             dU = streak->GetExp(elmtid)->PhysEvaluate(coord, derstreak + offset);
   101             coord[1] = coord[1] - (U-cr)/dU;   
   106         ASSERTL0(cnt < maxiter, 
"Failed to converge Newton iteration");
   115         FILE *fp = fopen(
"interfacedat.geo",
"w");
   121         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0}; \n",
   123         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0}; \n",
   125         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0}; \n",
   127         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0}; \n",
   130         for(i = 0; i < npts; ++i)
   132             fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",
   140         fp = fopen(
"interfacedat_up.geo",
"w");
   145         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",cnt++,xc[0],yc[0]+trans);
   147         for(i = 1; i < npts-1; ++i)
   149             norm = sqrt((xc[i+1]-xc[i-1])*(xc[i+1]-xc[i-1])+(yc[i+1]-yc[i-1])*(yc[i+1]-yc[i-1]));
   150             nx = (yc[i-1]-yc[i+1])/norm;
   151             ny = (xc[i+1]-xc[i-1])/norm;
   153             fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",
   154                     cnt++,xc[i]+nx*trans,yc[i]+ny*trans);
   157         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",cnt++,xc[npts-1],yc[npts-1]+trans);
   161         fp = fopen(
"interfacedat_dn.geo",
"w");
   165         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",cnt++,xc[0],yc[0]+trans);
   167         for(i = 1; i < npts-1; ++i)
   169             norm = sqrt((xc[i+1]-xc[i-1])*(xc[i+1]-xc[i-1])+(yc[i+1]-yc[i-1])*(yc[i+1]-yc[i-1]));
   170             nx = (yc[i-1]-yc[i+1])/norm;
   171             ny = (xc[i+1]-xc[i-1])/norm;
   173             fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",
   174                     cnt++,xc[i]+nx*trans,yc[i]+ny*trans);
   177         fprintf(fp,
"Point(%d)={%12.10lf,%12.10lf,0,1.0};  \n",cnt++,xc[npts-1],yc[npts-1]+trans);
 
#define ASSERTL0(condition, msg)
 
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object. 
 
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max. 
 
T Vmin(int n, const T *x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min. 
 
static const NekDouble kNekUnsetDouble