HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros
global.loops.boundaries.h File Reference

Boundary Conditions Loop definitions/macros. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BOUNDLOOPF(i, in, out)   for(i=in;i<=out;i++)
 boundary condition loops: More...
 
#define LOOPX1dir   LOOPORDER1(,BOUNDLOOPF(j,innormalloop[2],outnormalloop[2]),BOUNDLOOPF(k,innormalloop[3],outnormalloop[3])) LOOPORDER2(,BOUNDLOOPF(j,innormalloop[2],outnormalloop[2]),BOUNDLOOPF(k,innormalloop[3],outnormalloop[3])) LOOPORDER3(,BOUNDLOOPF(j,innormalloop[2],outnormalloop[2]),BOUNDLOOPF(k,innormalloop[3],outnormalloop[3]))
 for X1-dir [Note always uses innormal and outnormal so assumed to use this X1-dir loop first] More...
 
#define LOOPX2dir   LOOPORDER1(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),,BOUNDLOOPF(k,innormalloop[3],outnormalloop[3])) LOOPORDER2(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),,BOUNDLOOPF(k,innormalloop[3],outnormalloop[3])) LOOPORDER3(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),,BOUNDLOOPF(k,innormalloop[3],outnormalloop[3]))
 for X2-dir [Note innormal and outnormal for 3rd direction and full inbound and outbound for 1st direction, so assume 1st came first and 3rd comes next] More...
 
#define LOOPX3dir   LOOPORDER1(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),) LOOPORDER2(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),) LOOPORDER3(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),)
 for X3-dir [ Note only use of inbound and outbound, so assumes 1st and 2nd directions came first] More...
 
#define LOOPXalldir   LOOPORDER1(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),BOUNDLOOPF(k,inboundloop[3],outboundloop[3])) LOOPORDER2(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),BOUNDLOOP3(k,inboundloop[3],outboundloop[3])) LOOPORDER1(BOUNDLOOPF(i,inboundloop[1],outboundloop[1]),BOUNDLOOPF(j,inboundloop[2],outboundloop[2]),BOUNDLOOPF(k,inboundloop[3],outboundloop[3]))
 loop over all directions (block of data in i,j,k only going out as far as the boundary conditions would go out) More...
 
#define LOOPBOUNDGENMORE(i, iloopstart, iloopend, iloopstep)   for(i=iloopstart;i<=iloopend;i+=iloopstep)
 boundary loops for CENT quantities (these 1D loops need no generalization for any ORDERSTORAGE) More...
 
#define LOOPBOUNDINGEN(i, start, end)   for(i=end;i>=start;i--)
 make start near boundary so periodic works for MAXBND up to 2N More...
 
#define LOOPBOUNDINMOREGEN(i, start, end, ri)   LOOPBOUNDINGEN(i,start,end)
 bound entire region inside non-evolved portion of grid special horizon code still needed for multiple CPUs – GODMARK – unless chose range of CPUs inside horizon to apply inner BCs More...
 
#define LOOPBOUNDOUTGEN(i, start, end)   for(i=start;i<=end;i++)
 
#define LOOPBOUND1INSPECIAL   LOOPBOUNDINMOREGEN(i,inoutlohi[POINTDOWN][POINTDOWN][1],inoutlohi[POINTDOWN][POINTUP][1],ri)
 user should use set_boundloop() to control shifts More...
 
#define LOOPBOUND1IN   LOOPBOUNDINGEN (i,inoutlohi[POINTDOWN][POINTDOWN][1],inoutlohi[POINTDOWN][POINTUP][1])
 
#define LOOPBOUND1OUT   LOOPBOUNDOUTGEN(i,inoutlohi[POINTUP][POINTDOWN][1],inoutlohi[POINTUP][POINTUP][1])
 
#define LOOPBOUND2IN   LOOPBOUNDINGEN (j,inoutlohi[POINTDOWN][POINTDOWN][2],inoutlohi[POINTDOWN][POINTUP][2])
 
#define LOOPBOUND2OUT   LOOPBOUNDOUTGEN(j,inoutlohi[POINTUP][POINTDOWN][2],inoutlohi[POINTUP][POINTUP][2])
 
#define LOOPBOUND3IN   LOOPBOUNDINGEN (k,inoutlohi[POINTDOWN][POINTDOWN][3],inoutlohi[POINTDOWN][POINTUP][3])
 
#define LOOPBOUND3OUT   LOOPBOUNDOUTGEN(k,inoutlohi[POINTUP][POINTDOWN][3],inoutlohi[POINTUP][POINTUP][3])
 
#define LOWERBOUND1   (inoutlohi[POINTDOWN][POINTDOWN][1])
 
#define UPPERBOUND1   (inoutlohi[POINTUP][POINTUP][1])
 

Detailed Description

Boundary Conditions Loop definitions/macros.

BOUNDARY CONDITION RELATED LOOPS

Definition in file global.loops.boundaries.h.

Macro Definition Documentation

#define BOUNDLOOPF (   i,
  in,
  out 
)    for(i=in;i<=out;i++)

boundary condition loops:

The below loops have been generalized for any ORDERSTORAGE, which may help when boundary conditions are expensive for memorygeneral loop for boundary conditions

Definition at line 21 of file global.loops.boundaries.h.

#define LOOPBOUND1IN   LOOPBOUNDINGEN (i,inoutlohi[POINTDOWN][POINTDOWN][1],inoutlohi[POINTDOWN][POINTUP][1])

Definition at line 65 of file global.loops.boundaries.h.

#define LOOPBOUND1INSPECIAL   LOOPBOUNDINMOREGEN(i,inoutlohi[POINTDOWN][POINTDOWN][1],inoutlohi[POINTDOWN][POINTUP][1],ri)

user should use set_boundloop() to control shifts

Definition at line 64 of file global.loops.boundaries.h.

#define LOOPBOUND1OUT   LOOPBOUNDOUTGEN(i,inoutlohi[POINTUP][POINTDOWN][1],inoutlohi[POINTUP][POINTUP][1])

Definition at line 66 of file global.loops.boundaries.h.

#define LOOPBOUND2IN   LOOPBOUNDINGEN (j,inoutlohi[POINTDOWN][POINTDOWN][2],inoutlohi[POINTDOWN][POINTUP][2])

Definition at line 68 of file global.loops.boundaries.h.

#define LOOPBOUND2OUT   LOOPBOUNDOUTGEN(j,inoutlohi[POINTUP][POINTDOWN][2],inoutlohi[POINTUP][POINTUP][2])

Definition at line 69 of file global.loops.boundaries.h.

#define LOOPBOUND3IN   LOOPBOUNDINGEN (k,inoutlohi[POINTDOWN][POINTDOWN][3],inoutlohi[POINTDOWN][POINTUP][3])

Definition at line 71 of file global.loops.boundaries.h.

#define LOOPBOUND3OUT   LOOPBOUNDOUTGEN(k,inoutlohi[POINTUP][POINTDOWN][3],inoutlohi[POINTUP][POINTUP][3])

Definition at line 72 of file global.loops.boundaries.h.

#define LOOPBOUNDGENMORE (   i,
  iloopstart,
  iloopend,
  iloopstep 
)    for(i=iloopstart;i<=iloopend;i+=iloopstep)

boundary loops for CENT quantities (these 1D loops need no generalization for any ORDERSTORAGE)

normally start is a lower index than end and then loops take into account how to deal with this

most general loop ignorant of start begin before end

Definition at line 53 of file global.loops.boundaries.h.

#define LOOPBOUNDINGEN (   i,
  start,
  end 
)    for(i=end;i>=start;i--)

make start near boundary so periodic works for MAXBND up to 2N

Definition at line 55 of file global.loops.boundaries.h.

#define LOOPBOUNDINMOREGEN (   i,
  start,
  end,
  ri 
)    LOOPBOUNDINGEN(i,start,end)

bound entire region inside non-evolved portion of grid special horizon code still needed for multiple CPUs – GODMARK – unless chose range of CPUs inside horizon to apply inner BCs

above "MORE" version is not more enough with "-1" and this technique is out-of-date compared to new grid sectioning approach

Definition at line 60 of file global.loops.boundaries.h.

#define LOOPBOUNDOUTGEN (   i,
  start,
  end 
)    for(i=start;i<=end;i++)

Definition at line 61 of file global.loops.boundaries.h.

for X1-dir [Note always uses innormal and outnormal so assumed to use this X1-dir loop first]

Definition at line 25 of file global.loops.boundaries.h.

for X2-dir [Note innormal and outnormal for 3rd direction and full inbound and outbound for 1st direction, so assume 1st came first and 3rd comes next]

Definition at line 28 of file global.loops.boundaries.h.

for X3-dir [ Note only use of inbound and outbound, so assumes 1st and 2nd directions came first]

Definition at line 31 of file global.loops.boundaries.h.

loop over all directions (block of data in i,j,k only going out as far as the boundary conditions would go out)

Definition at line 35 of file global.loops.boundaries.h.

#define LOWERBOUND1   (inoutlohi[POINTDOWN][POINTDOWN][1])

Definition at line 74 of file global.loops.boundaries.h.

#define UPPERBOUND1   (inoutlohi[POINTUP][POINTUP][1])

Definition at line 75 of file global.loops.boundaries.h.