HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
interppoint.c File Reference

Spatial Interpolation for fluxes based upon providing each point Inefficient compared to interpline.c, but simpler. More...

#include "decs.h"
Include dependency graph for interppoint.c:

Go to the source code of this file.

Macros

#define DOUSEPPMCONTACTSTEEP   1
 whether to send all pl's for access by interpolator (such as for steepening and flattening) whether to use contact steepener for reallim=MCSTEEP More...
 
#define DOUSEPARAMONOCHECK   1
 
#define DOUSEPARAFLAT   1
 using the 2 above, contacts are as steep as with PARA! More...
 
#define DOINGALLMCSTEEP   (DOUSEPPMCONTACTSTEEP&&DOUSEPARAFLAT&&DOUSEPARAMONOCHECK)
 
#define WHICH3POINTLIMT   MC
 
#define DQALLOWEXTREMUM   1
 below not accounted for unless DOINGALLMCSTEEP==1 for blast wave (sasha TESTNUMBER==8) actually helps contact but hurts only peak a bit – contact much better relatively speaking) More...
 
#define CONNECTUANDRHO   (0 && (DOEVOLVERHO&&DOEVOLVEUU))
 whether to interpolate and enforce steepening on u and rho in consistent way see comments where used first as to why turned off More...
 
#define CONNECTBANDRHO   (0 && (DOEVOLVERHO) )
 whether to interpolate and enforce steepening on B and rho in consistent way Should I turn this off? Maybe for same reason of U version turned off – may cause current sheet to spontaneously dissipate – just use separate steepening Seems to cause lots of problems with MCSTEEP and MHD torus problem – too much steepening More...
 
#define MCSTEEPMINMOD(a, b)   MINMODB(a,b)
 
#define MIN3(x, y, z)   (min(min(x,y),z))
 
#define MAX3(x, y, z)   (max(max(x,y),z))
 
#define MIN4(w, x, y, z)   (min(w,MIN3(x,y,z)))
 
#define MAX4(w, x, y, z)   (max(w,MAX3(x,y,z)))
 
#define MINMODMP5(x, y)   (0.5*(sign(x)+sign(y))*min(fabs(x),fabs(y)))
 
#define MINMOD4(w, x, y, z)   (0.125*(sign(w)+sign(x))*fabs( (sign(w)+sign(y))*(sign(w)+sign(z)) ) * MIN4(fabs(w),fabs(x),fabs(y),fabs(z)) )
 
#define MEDIAN(x, y, z)   ((x) + MINMODMP5((y)-(x),(z)-(x)));
 

Functions

void slope_lim_pointtype (int interporflux, int realisinterp, int pl, int dir, int loc, int continuous, int idel, int jdel, int kdel, FTYPE(*primreal)[NSTORE2][NSTORE3][NPR], FTYPE(*p2interp)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*dq)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pleft)[NSTORE2][NSTORE3][NPR2INTERP], FTYPE(*pright)[NSTORE2][NSTORE3][NPR2INTERP])
 whether primreal is p2interp can't assume this is true in general (e.g. More...
 
void slope_lim_point_c2e (int i, int j, int k, int loc, int realisinterp, int dir, int reallim, int pl, int startorderi, int endorderi, FTYPE *yreal, FTYPE *y, FTYPE *dq, FTYPE *left, FTYPE *right)
 interpolate from a center point to a left/right interface More...
 
void slope_lim_point_e2c_continuous (int i, int j, int k, int loc, int realisinterp, int dir, int reallim, int pl, int startorderi, int endorderi, FTYPE *yreal, FTYPE *y, FTYPE *dq, FTYPE *left, FTYPE *right)
 DEVELOPING RIGHT NOW interpolate from a center point to a left/right interface. More...
 
void slope_lim_point_allpl (int i, int j, int k, int loc, int realisinterp, int dir, int reallim, int startorderi, int endorderi, FTYPE **yreal, FTYPE **y, FTYPE *dq, FTYPE *left, FTYPE *right)
 interpolate from a center point to a left/right interface More...
 
void slope_lim_3points (int reallim, FTYPE yl, FTYPE yc, FTYPE yr, FTYPE *dq)
 limited slopes using 3 points Gives slope that will be assumed to be located at same location as yc – center of cell More...
 
void slope_lim_4points_e2c_continuous (int reallim, FTYPE yl, FTYPE yc, FTYPE yr, FTYPE yrr, FTYPE *ddq)
 limited 2nd derivatives using 4 points see e2c_continuous.nb More...
 
void mp5 (FTYPE *y, FTYPE *lout, FTYPE *rout)
 http://mesa.sourceforge.net/pdfs/suresh+huynh_97.pdf http://iopscience.iop.org/0264-9381/31/1/015005/pdf/0264-9381_31_1_015005.pdf http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1304.5544 see Suresh & Huynh (1997) and Mosta et al. More...
 
void mp5face (FTYPE yll, FTYPE yl, FTYPE yc, FTYPE yr, FTYPE yrr, FTYPE *out)
 if yll,yl,yc,yr,yrr are really in that order, then get lout. More...
 
void eppm (FTYPE *y, FTYPE *lout, FTYPE *rout)
 Enhanced PPM The Einstein Toolkit source code says that the relevant references are: Colella & Sekora 2008 (http://crd.lbl.gov/assets/pubs_presos/AMCS/ANAG/ColellaSekora.pdf) McCorquodale & Colella 2011 (http://msp.org/camcos/2011/6-1/camcos-v6-n1-p01-s.pdf) More...
 

Detailed Description

Spatial Interpolation for fluxes based upon providing each point Inefficient compared to interpline.c, but simpler.

Definition in file interppoint.c.

Macro Definition Documentation

#define CONNECTBANDRHO   (0 && (DOEVOLVERHO) )

whether to interpolate and enforce steepening on B and rho in consistent way Should I turn this off? Maybe for same reason of U version turned off – may cause current sheet to spontaneously dissipate – just use separate steepening Seems to cause lots of problems with MCSTEEP and MHD torus problem – too much steepening

Definition at line 37 of file interppoint.c.

#define CONNECTUANDRHO   (0 && (DOEVOLVERHO&&DOEVOLVEUU))

whether to interpolate and enforce steepening on u and rho in consistent way see comments where used first as to why turned off

Definition at line 32 of file interppoint.c.

#define DOINGALLMCSTEEP   (DOUSEPPMCONTACTSTEEP&&DOUSEPARAFLAT&&DOUSEPARAMONOCHECK)

Definition at line 21 of file interppoint.c.

#define DOUSEPARAFLAT   1

using the 2 above, contacts are as steep as with PARA!

Definition at line 19 of file interppoint.c.

#define DOUSEPARAMONOCHECK   1

Definition at line 16 of file interppoint.c.

#define DOUSEPPMCONTACTSTEEP   1

whether to send all pl's for access by interpolator (such as for steepening and flattening) whether to use contact steepener for reallim=MCSTEEP

Definition at line 15 of file interppoint.c.

#define DQALLOWEXTREMUM   1

below not accounted for unless DOINGALLMCSTEEP==1 for blast wave (sasha TESTNUMBER==8) actually helps contact but hurts only peak a bit – contact much better relatively speaking)

Definition at line 27 of file interppoint.c.

#define MAX3 (   x,
  y,
 
)    (max(max(x,y),z))

Definition at line 1352 of file interppoint.c.

#define MAX4 (   w,
  x,
  y,
 
)    (max(w,MAX3(x,y,z)))

Definition at line 1355 of file interppoint.c.

#define MCSTEEPMINMOD (   a,
 
)    MINMODB(a,b)

Definition at line 43 of file interppoint.c.

#define MEDIAN (   x,
  y,
 
)    ((x) + MINMODMP5((y)-(x),(z)-(x)));

Definition at line 1361 of file interppoint.c.

#define MIN3 (   x,
  y,
 
)    (min(min(x,y),z))

Definition at line 1351 of file interppoint.c.

#define MIN4 (   w,
  x,
  y,
 
)    (min(w,MIN3(x,y,z)))

Definition at line 1354 of file interppoint.c.

#define MINMOD4 (   w,
  x,
  y,
 
)    (0.125*(sign(w)+sign(x))*fabs( (sign(w)+sign(y))*(sign(w)+sign(z)) ) * MIN4(fabs(w),fabs(x),fabs(y),fabs(z)) )

Definition at line 1359 of file interppoint.c.

#define MINMODMP5 (   x,
 
)    (0.5*(sign(x)+sign(y))*min(fabs(x),fabs(y)))

Definition at line 1357 of file interppoint.c.

#define WHICH3POINTLIMT   MC

Definition at line 23 of file interppoint.c.

Function Documentation

void eppm ( FTYPE y,
FTYPE lout,
FTYPE rout 
)

Enhanced PPM The Einstein Toolkit source code says that the relevant references are: Colella & Sekora 2008 (http://crd.lbl.gov/assets/pubs_presos/AMCS/ANAG/ColellaSekora.pdf) McCorquodale & Colella 2011 (http://msp.org/camcos/2011/6-1/camcos-v6-n1-p01-s.pdf)

Definition at line 1447 of file interppoint.c.

Here is the caller graph for this function:

void mp5 ( FTYPE y,
FTYPE lout,
FTYPE rout 
)

http://mesa.sourceforge.net/pdfs/suresh+huynh_97.pdf http://iopscience.iop.org/0264-9381/31/1/015005/pdf/0264-9381_31_1_015005.pdf http://adsabs.harvard.edu/cgi-bin/bib_query?arXiv:1304.5544 see Suresh & Huynh (1997) and Mosta et al.

(2014) Use of alpha=4 below may require cour=0.2 but cour=0.4 said to be ok in practice

Definition at line 1369 of file interppoint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mp5face ( FTYPE  yll,
FTYPE  yl,
FTYPE  yc,
FTYPE  yr,
FTYPE  yrr,
FTYPE out 
)

if yll,yl,yc,yr,yrr are really in that order, then get lout.

reverse order gives rout Takes 5 point positions and gives back point interface values, while original takes averages and gets points.

Definition at line 1387 of file interppoint.c.

Here is the caller graph for this function:

void slope_lim_3points ( int  reallim,
FTYPE  yl,
FTYPE  yc,
FTYPE  yr,
FTYPE dq 
)

limited slopes using 3 points Gives slope that will be assumed to be located at same location as yc – center of cell

Definition at line 833 of file interppoint.c.

Here is the caller graph for this function:

void slope_lim_4points_e2c_continuous ( int  reallim,
FTYPE  yl,
FTYPE  yc,
FTYPE  yr,
FTYPE  yrr,
FTYPE ddq 
)

limited 2nd derivatives using 4 points see e2c_continuous.nb

Definition at line 850 of file interppoint.c.

Here is the caller graph for this function:

void slope_lim_point_allpl ( int  i,
int  j,
int  k,
int  loc,
int  realisinterp,
int  dir,
int  reallim,
int  startorderi,
int  endorderi,
FTYPE **  yreal,
FTYPE **  y,
FTYPE dq,
FTYPE left,
FTYPE right 
)

interpolate from a center point to a left/right interface

Definition at line 807 of file interppoint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void slope_lim_point_c2e ( int  i,
int  j,
int  k,
int  loc,
int  realisinterp,
int  dir,
int  reallim,
int  pl,
int  startorderi,
int  endorderi,
FTYPE yreal,
FTYPE y,
FTYPE dq,
FTYPE left,
FTYPE right 
)

interpolate from a center point to a left/right interface

Definition at line 696 of file interppoint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void slope_lim_point_e2c_continuous ( int  i,
int  j,
int  k,
int  loc,
int  realisinterp,
int  dir,
int  reallim,
int  pl,
int  startorderi,
int  endorderi,
FTYPE yreal,
FTYPE y,
FTYPE dq,
FTYPE left,
FTYPE right 
)

DEVELOPING RIGHT NOW interpolate from a center point to a left/right interface.

Definition at line 766 of file interppoint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void slope_lim_pointtype ( int  interporflux,
int  realisinterp,
int  pl,
int  dir,
int  loc,
int  continuous,
int  idel,
int  jdel,
int  kdel,
FTYPE(*)  primreal[NSTORE2][NSTORE3][NPR],
FTYPE(*)  p2interp[NSTORE2][NSTORE3][NPR2INTERP],
FTYPE(*)  dq[NSTORE2][NSTORE3][NPR2INTERP],
FTYPE(*)  pleft[NSTORE2][NSTORE3][NPR2INTERP],
FTYPE(*)  pright[NSTORE2][NSTORE3][NPR2INTERP] 
)

whether primreal is p2interp can't assume this is true in general (e.g.

for FIELDCTSTAG input is not even complete range) interpolation with loop over POINTS

Definition at line 55 of file interppoint.c.

Here is the call graph for this function:

Here is the caller graph for this function: