Overture  Version 25
Macros | Functions
operatorAveraging.C File Reference
#include "Ogmg.h"
#include "SparseRep.h"
#include "ParallelUtility.h"
Include dependency graph for operatorAveraging.C:

Macros

#define ForBoundary(side, axis)
 
#define FOR_3(i1, i2, i3, I1, I2, I3)
 
#define FOR_3D(i1, i2, i3, I1, I2, I3)
 
#define M123(m1, m2, m3)   (m1+halfWidth1+width*(m2+halfWidth2+width*(m3+halfWidth3)))
 
#define CE(c, e)   (stencilSize*((c)+numberOfComponentsForCoefficients*(e)))
 
#define M123CE(m1, m2, m3, c, e)   (M123(m1,m2,m3)+CE(c,e))
 
#define ForStencil(m1, m2, m3)
 
#define averageOpt   EXTERN_C_NAME(averageopt)
 
#define FW0_1D_0(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m0,I1-1,I2,I3)+.5*F(m1,I1-1,I2,I3)+F(m0,I1 ,I2,I3)) )
 
#define FW0_1D_1(F, m0, m1, m2, I1, I2, I3)
 
#define FW0_1D_2(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1+1,I2,I3)+F(m2,I1+1,I2,I3)) )
 
#define FW1_1D_0(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m0,I1,I2-1,I3)+.5*F(m1,I1,I2-1,I3)+F(m0,I1,I2 ,I3)) )
 
#define FW1_1D_1(F, m0, m1, m2, I1, I2, I3)
 
#define FW1_1D_2(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1,I2+1,I3)+F(m2,I1,I2+1,I3)) )
 
#define FW2_1D_0(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m0,I1,I2,I3-1)+.5*F(m1,I1,I2,I3-1)+F(m0,I1,I2 ,I3)) )
 
#define FW2_1D_1(F, m0, m1, m2, I1, I2, I3)
 
#define FW2_1D_2(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1,I2,I3+1)+F(m2,I1,I2,I3+1)) )
 
#define INJECTION_1D_0(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m0,I1,I2,I3)+.5*F(m1,I1,I2,I3)+F(m0,I1,I2,I3)) )
 
#define INJECTION_1D_1(F, m0, m1, m2, I1, I2, I3)
 
#define INJECTION_1D_2(F, m0, m1, m2, I1, I2, I3)   (.25*(F(m2,I1,I2,I3)+.5*F(m1,I1,I2,I3)+F(m2,I1,I2,I3)) )
 

Functions

void averageOpt (const int &nd, const int &nd1a, const int &nd1b, const int &nd2a, const int &nd2b, const int &nd3a, const int &nd3b, const int &md1a, const int &md1b, const int &md2a, const int &md2b, const int &md3a, const int &md3b, const int &j1a, const int &j1b, const int &j2a, const int &j2b, const int &j3a, const int &j3b, const int &i1a, const int &i1b, const int &i1c, const int &i2a, const int &i2b, const int &i2c, const int &i3a, const int &i3b, const int &i3c, const int &i1pa, const int &i1pb, const int &i2pa, const int &i2pb, const int &i3pa, const int &i3pb, const int &ndc, const real &cFine, real &cCoarse, const int &ndc0, real &c0, real &c1, const int &option, const int &orderOfAccuracy, const int &ipar)
 

Macro Definition Documentation

#define averageOpt   EXTERN_C_NAME(averageopt)
#define CE (   c,
 
)    (stencilSize*((c)+numberOfComponentsForCoefficients*(e)))
#define FOR_3 (   i1,
  i2,
  i3,
  I1,
  I2,
  I3 
)
Value:
I1Base=I1.getBase(); I2Base=I2.getBase(); I3Base=I3.getBase();\
I1Bound=I1.getBound(); I2Bound=I2.getBound(); I3Bound=I3.getBound();\
for( int i3=I3Base; i3<=I3Bound; i3++ ) \
for( int i2=I2Base; i2<=I2Bound; i2++ ) \
for( int i1=I1Base; i1<=I1Bound; i1++ )

Referenced by Ogmg::operatorAveraging().

#define FOR_3D (   i1,
  i2,
  i3,
  I1,
  I2,
  I3 
)
Value:
int I1Base=I1.getBase(), I2Base=I2.getBase(), I3Base=I3.getBase(),\
I1Bound=I1.getBound(), I2Bound=I2.getBound(), I3Bound=I3.getBound();\
for( int i3=I3Base; i3<=I3Bound; i3++ ) \
for( int i2=I2Base; i2<=I2Bound; i2++ ) \
for( int i1=I1Base; i1<=I1Bound; i1++ )

Referenced by Ogmg::operatorAveraging().

#define ForBoundary (   side,
  axis 
)
Value:
for( axis=0; axis<numberOfDimensions; axis++ ) \
for( side=0; side<=1; side++ )
#define ForStencil (   m1,
  m2,
  m3 
)
Value:
for( m3=-halfWidth3; m3<=halfWidth3; m3++) \
for( m2=-halfWidth2; m2<=halfWidth2; m2++) \
for( m1=-halfWidth1; m1<=halfWidth1; m1++)

Referenced by Ogmg::operatorAveraging().

#define FW0_1D_0 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m0,I1-1,I2,I3)+.5*F(m1,I1-1,I2,I3)+F(m0,I1 ,I2,I3)) )
#define FW0_1D_1 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)
Value:
(.5*F(m1,I1 ,I2,I3)+.125*(F(m1,I1-1,I2,I3)+F(m1,I1+1,I2,I3))+ \
.25*(F(m2,I1-1,I2,I3)+F(m2,I1 ,I2,I3)+ \
F(m0,I1 ,I2,I3)+F(m0,I1+1,I2,I3)) )

Referenced by Ogmg::averageCoefficients().

#define FW0_1D_2 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1+1,I2,I3)+F(m2,I1+1,I2,I3)) )
#define FW1_1D_0 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m0,I1,I2-1,I3)+.5*F(m1,I1,I2-1,I3)+F(m0,I1,I2 ,I3)) )
#define FW1_1D_1 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)
Value:
(.5*F(m1,I1 ,I2,I3)+.125*(F(m1,I1,I2-1,I3)+F(m1,I1,I2+1,I3))+ \
.25*(F(m2,I1,I2-1,I3)+F(m2,I1 ,I2,I3)+ \
F(m0,I1 ,I2,I3)+F(m0,I1,I2+1,I3)) )

Referenced by Ogmg::averageCoefficients().

#define FW1_1D_2 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1,I2+1,I3)+F(m2,I1,I2+1,I3)) )
#define FW2_1D_0 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m0,I1,I2,I3-1)+.5*F(m1,I1,I2,I3-1)+F(m0,I1,I2 ,I3)) )
#define FW2_1D_1 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)
Value:
(.5*F(m1,I1 ,I2,I3)+.125*(F(m1,I1,I2,I3-1)+F(m1,I1,I2,I3+1))+ \
.25*(F(m2,I1,I2,I3-1)+F(m2,I1 ,I2,I3)+ \
F(m0,I1 ,I2,I3)+F(m0,I1,I2,I3+1)) )

Referenced by Ogmg::averageCoefficients().

#define FW2_1D_2 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m2,I1 ,I2,I3)+.5*F(m1,I1,I2,I3+1)+F(m2,I1,I2,I3+1)) )
#define INJECTION_1D_0 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m0,I1,I2,I3)+.5*F(m1,I1,I2,I3)+F(m0,I1,I2,I3)) )
#define INJECTION_1D_1 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)
Value:
(.5*F(m1,I1,I2,I3)+.125*(F(m1,I1,I2,I3)+F(m1,I1,I2,I3))+ \
.25*(F(m2,I1,I2,I3)+F(m2,I1,I2,I3)+ \
F(m0,I1,I2,I3)+F(m0,I1,I2,I3)) )

Referenced by Ogmg::averageCoefficients().

#define INJECTION_1D_2 (   F,
  m0,
  m1,
  m2,
  I1,
  I2,
  I3 
)    (.25*(F(m2,I1,I2,I3)+.5*F(m1,I1,I2,I3)+F(m2,I1,I2,I3)) )
#define M123 (   m1,
  m2,
  m3 
)    (m1+halfWidth1+width*(m2+halfWidth2+width*(m3+halfWidth3)))
#define M123CE (   m1,
  m2,
  m3,
  c,
 
)    (M123(m1,m2,m3)+CE(c,e))

Referenced by Ogmg::operatorAveraging().

Function Documentation

void averageOpt ( const int &  nd,
const int &  nd1a,
const int &  nd1b,
const int &  nd2a,
const int &  nd2b,
const int &  nd3a,
const int &  nd3b,
const int &  md1a,
const int &  md1b,
const int &  md2a,
const int &  md2b,
const int &  md3a,
const int &  md3b,
const int &  j1a,
const int &  j1b,
const int &  j2a,
const int &  j2b,
const int &  j3a,
const int &  j3b,
const int &  i1a,
const int &  i1b,
const int &  i1c,
const int &  i2a,
const int &  i2b,
const int &  i2c,
const int &  i3a,
const int &  i3b,
const int &  i3c,
const int &  i1pa,
const int &  i1pb,
const int &  i2pa,
const int &  i2pb,
const int &  i3pa,
const int &  i3pb,
const int &  ndc,
const real cFine,
real cCoarse,
const int &  ndc0,
real c0,
real c1,
const int &  option,
const int &  orderOfAccuracy,
const int &  ipar 
)