CG  Version 25
Macros | Functions
asfp.C File Reference
#include "Cgasf.h"
#include "MappedGridOperators.h"
#include "interpPoints.h"
#include "Reactions.h"
#include "CompositeGridOperators.h"
#include "Oges.h"
#include "AdamsPCData.h"
#include "ParallelUtility.h"
#include "App.h"
#include "AsfParameters.h"
Include dependency graph for asfp.C:

Macros

#define mixedRHS(component, side, axis, grid)   bcData(component+numberOfComponents*(0),side,axis,grid)
 
#define mixedCoeff(component, side, axis, grid)   bcData(component+numberOfComponents*(1),side,axis,grid)
 
#define mixedNormalCoeff(component, side, axis, grid)   bcData(component+numberOfComponents*(2),side,axis,grid)
 
#define asfAssignPressureRhs   EXTERN_C_NAME(asfassignpressurerhs)
 
#define ForBoundary(side, axis)   for( axis=0; axis<c.numberOfDimensions(); axis++ ) for( side=0; side<=1; side++ )
 
#define PN1(I1, I2, I3)   ( (2*side-1)*(mu*uxx(I1,I2,I3,uc) +acRho*uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) ) )
 
#define PXB2(I1, I2, I3)   ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+(1./3.)*uxy(I1,I2,I3,vc)) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)) )
 
#define PYB2(I1, I2, I3)   ( mu*(uxx(I1,I2,I3,vc)+(4./3.)*uyy(I1,I2,I3,vc)+(1./3.)*uxy(I1,I2,I3,uc)) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,vc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,vc)) )
 
#define PN2(I1, I2, I3)   ( normal(I1,I2,I3,0)*PXB2(I1,I2,I3) +normal(I1,I2,I3,1)*PYB2(I1,I2,I3) )
 
#define PXB3(I1, I2, I3)   ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+uzz(I1,I2,I3,uc)+(1./3.)*(uxy(I1,I2,I3,vc)+uxz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,uc)) )
 
#define PXB3(I1, I2, I3)   ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+uzz(I1,I2,I3,uc)+(1./3.)*(uxy(I1,I2,I3,vc)+uxz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,uc)) )
 
#define PYB3(I1, I2, I3)   ( mu*(uxx(I1,I2,I3,vc)+(4./3.)*uyy(I1,I2,I3,vc)+uzz(I1,I2,I3,vc)+(1./3.)*(uxy(I1,I2,I3,uc)+uyz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,vc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,vc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,vc)) )
 
#define PZB3(I1, I2, I3)   ( mu*(uxx(I1,I2,I3,wc)+uyy(I1,I2,I3,wc)+(4./3.)*uzz(I1,I2,I3,wc)+(1./3.)*(uxz(I1,I2,I3,uc)+uyz(I1,I2,I3,vc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,wc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,wc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,wc)) )
 
#define PN3(I1, I2, I3)   ( normal(I1,I2,I3,0)*PXB3(I1,I2,I3) +normal(I1,I2,I3,1)*PYB3(I1,I2,I3) +normal(I1,I2,I3,2)*PZB3(I1,I2,I3) )
 
#define POW2(x)   pow((x),2)
 
#define DAI1(cd, I1, I2, I3)   ( cd/ ( POW2(xy(I1+1,I2 ,I3 ,0)-xy(I1-1,I2 ,I3 ,0)) +POW2(x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
#define UXZ(n)   e.xz(c,I1,I2,I3,n,t)
 
#define UYZ(n)   e.yz(c,I1,I2,I3,n,t)
 
#define P0(c, I1, I2, I3, t)   e(c,I1,I2,I3,pc,t)
 
#define P02N(c, I1, I2, I3, t)   ( normal(I1,I2,I3,0)*e.x(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,1)*e.y(c,I1,I2,I3,pc,t) )
 
#define P03N(c, I1, I2, I3, t)   ( normal(I1,I2,I3,0)*e.x(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,1)*e.y(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,2)*e.z(c,I1,I2,I3,pc,t) )
 
#define PN1(I1, I2, I3)   ( (2*side-1)*(rho*UT(uc) +acRho*uu(I1,I2,I3,uc)*UX(uc) - mu*UXX(uc) ) )
 
#define PXB2(I1, I2, I3)   ( rho*UT(uc) + acRho*( uu(I1,I2,I3,uc)*UX(uc) + uu(I1,I2,I3,vc)*UY(uc)) + e.x(c,I1,I2,I3,pc,t) - mu*((4./3.)*UXX(uc)+UYY(uc)+(1./3.)*UXY(vc)) )
 
#define PYB2(I1, I2, I3)   ( rho*UT(vc) + acRho*( uu(I1,I2,I3,uc)*UX(vc) + uu(I1,I2,I3,vc)*UY(vc)) + e.y(c,I1,I2,I3,pc,t) -mu*(UXX(vc)+(4./3.)*UYY(vc)+(1./3.)*UXY(uc)) )
 
#define PN2(I1, I2, I3)   ( normal(I1,I2,I3,0)*PXB2(I1,I2,I3) +normal(I1,I2,I3,1)*PYB2(I1,I2,I3) )
 
#define DELTAU(I1, I2, I3, dir)   (ctxx[dir]*UXX(dir)+ctyy[dir]*UYY(dir)+ctzz[dir]*UZZ(dir))
 
#define P3B(I1, I2, I3, dir)   ( rho*UT(dir) - mu*DELTAU(I1,I2,I3,dir) +acRho*( uu(I1,I2,I3,uc)*UX(dir) + uu(I1,I2,I3,vc)*UY(dir) + uu(I1,I2,I3,wc)*UZ(dir)) )
 
#define PN3(I1, I2, I3)   ( normal(I1,I2,I3,0)*(P3B(I1,I2,I3,uc)+e.x(c,I1,I2,I3,pc,t)) +normal(I1,I2,I3,1)*(P3B(I1,I2,I3,vc)+e.y(c,I1,I2,I3,pc,t)) +normal(I1,I2,I3,2)*(P3B(I1,I2,I3,wc)+e.z(c,I1,I2,I3,pc,t)) )
 

Functions

void asfAssignPressureRhs (const int &nd, const int &nd1a, const int &nd1b, const int &nd2a, const int &nd2b, const int &nd3a, const int &nd3b, const int &nd4a, const int &nd4b, const int &ipar, const real &rpar, real &f, real &u, real &p, real &gam, const int &mask, const real &rsxy, const int &ierr)
 

Macro Definition Documentation

#define asfAssignPressureRhs   EXTERN_C_NAME(asfassignpressurerhs)
#define DAI1 (   cd,
  I1,
  I2,
  I3 
)    ( cd/ ( POW2(xy(I1+1,I2 ,I3 ,0)-xy(I1-1,I2 ,I3 ,0)) +POW2(xy(I1+1,I2 ,I3 ,1)-xy(I1-1,I2 ,I3 ,1)) ) )
#define DAI2 (   cd,
  I1,
  I2,
  I3 
)    ( cd/ ( POW2(xy(I1+1,I2 ,I3 ,0)-xy(I1-1,I2 ,I3 ,0)) +POW2(xy(I1+1,I2 ,I3 ,1)-xy(I1-1,I2 ,I3 ,1)) ) + cd/ ( POW2(xy(I1 ,I2+1,I3 ,0)-xy(I1 ,I2-1,I3 ,0)) +POW2(xy(I1 ,I2+1,I3 ,1)-xy(I1 ,I2-1,I3 ,1)) ) )
#define DAI3 (   cd,
  I1,
  I2,
  I3 
)    ( cd/ ( POW2(xy(I1+1,I2 ,I3 ,0)-xy(I1-1,I2 ,I3 ,0)) +POW2(xy(I1+1,I2 ,I3 ,1)-xy(I1-1,I2 ,I3 ,1)) +POW2(xy(I1+1,I2 ,I3 ,2)-xy(I1-1,I2 ,I3 ,2)) ) + cd/ ( POW2(xy(I1 ,I2+1,I3 ,0)-xy(I1 ,I2-1,I3 ,0)) +POW2(xy(I1 ,I2+1,I3 ,1)-xy(I1 ,I2-1,I3 ,1)) +POW2(xy(I1 ,I2+1,I3 ,2)-xy(I1 ,I2-1,I3 ,2)) ) + cd/ ( POW2(xy(I1 ,I2 ,I3+1,0)-xy(I1 ,I2 ,I3-1,0)) +POW2(xy(I1 ,I2 ,I3+1,1)-xy(I1 ,I2 ,I3-1,1)) +POW2(xy(I1 ,I2 ,I3+1,2)-xy(I1 ,I2 ,I3-1,2)) ) )
#define DELTAU (   I1,
  I2,
  I3,
  dir 
)    (ctxx[dir]*UXX(dir)+ctyy[dir]*UYY(dir)+ctzz[dir]*UZZ(dir))
#define ForBoundary (   side,
  axis 
)    for( axis=0; axis<c.numberOfDimensions(); axis++ ) for( side=0; side<=1; side++ )
#define mixedCoeff (   component,
  side,
  axis,
  grid 
)    bcData(component+numberOfComponents*(1),side,axis,grid)
#define mixedNormalCoeff (   component,
  side,
  axis,
  grid 
)    bcData(component+numberOfComponents*(2),side,axis,grid)
#define mixedRHS (   component,
  side,
  axis,
  grid 
)    bcData(component+numberOfComponents*(0),side,axis,grid)
#define P0 (   c,
  I1,
  I2,
  I3,
 
)    e(c,I1,I2,I3,pc,t)
#define P02N (   c,
  I1,
  I2,
  I3,
 
)    ( normal(I1,I2,I3,0)*e.x(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,1)*e.y(c,I1,I2,I3,pc,t) )
#define P03N (   c,
  I1,
  I2,
  I3,
 
)    ( normal(I1,I2,I3,0)*e.x(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,1)*e.y(c,I1,I2,I3,pc,t) +normal(I1,I2,I3,2)*e.z(c,I1,I2,I3,pc,t) )
#define P3B (   I1,
  I2,
  I3,
  dir 
)    ( rho*UT(dir) - mu*DELTAU(I1,I2,I3,dir) +acRho*( uu(I1,I2,I3,uc)*UX(dir) + uu(I1,I2,I3,vc)*UY(dir) + uu(I1,I2,I3,wc)*UZ(dir)) )
#define PN1 (   I1,
  I2,
  I3 
)    ( (2*side-1)*(mu*uxx(I1,I2,I3,uc) +acRho*uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) ) )
#define PN1 (   I1,
  I2,
  I3 
)    ( (2*side-1)*(rho*UT(uc) +acRho*uu(I1,I2,I3,uc)*UX(uc) - mu*UXX(uc) ) )
#define PN2 (   I1,
  I2,
  I3 
)    ( normal(I1,I2,I3,0)*PXB2(I1,I2,I3) +normal(I1,I2,I3,1)*PYB2(I1,I2,I3) )
#define PN2 (   I1,
  I2,
  I3 
)    ( normal(I1,I2,I3,0)*PXB2(I1,I2,I3) +normal(I1,I2,I3,1)*PYB2(I1,I2,I3) )
#define PN3 (   I1,
  I2,
  I3 
)    ( normal(I1,I2,I3,0)*PXB3(I1,I2,I3) +normal(I1,I2,I3,1)*PYB3(I1,I2,I3) +normal(I1,I2,I3,2)*PZB3(I1,I2,I3) )
#define PN3 (   I1,
  I2,
  I3 
)    ( normal(I1,I2,I3,0)*(P3B(I1,I2,I3,uc)+e.x(c,I1,I2,I3,pc,t)) +normal(I1,I2,I3,1)*(P3B(I1,I2,I3,vc)+e.y(c,I1,I2,I3,pc,t)) +normal(I1,I2,I3,2)*(P3B(I1,I2,I3,wc)+e.z(c,I1,I2,I3,pc,t)) )
#define POW2 (   x)    pow((x),2)
#define PXB2 (   I1,
  I2,
  I3 
)    ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+(1./3.)*uxy(I1,I2,I3,vc)) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)) )
#define PXB2 (   I1,
  I2,
  I3 
)    ( rho*UT(uc) + acRho*( uu(I1,I2,I3,uc)*UX(uc) + uu(I1,I2,I3,vc)*UY(uc)) + e.x(c,I1,I2,I3,pc,t) - mu*((4./3.)*UXX(uc)+UYY(uc)+(1./3.)*UXY(vc)) )
#define PXB3 (   I1,
  I2,
  I3 
)    ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+uzz(I1,I2,I3,uc)+(1./3.)*(uxy(I1,I2,I3,vc)+uxz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,uc)) )
#define PXB3 (   I1,
  I2,
  I3 
)    ( mu*((4./3.)*uxx(I1,I2,I3,uc)+uyy(I1,I2,I3,uc)+uzz(I1,I2,I3,uc)+(1./3.)*(uxy(I1,I2,I3,vc)+uxz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,uc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,uc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,uc)) )
#define PYB2 (   I1,
  I2,
  I3 
)    ( mu*(uxx(I1,I2,I3,vc)+(4./3.)*uyy(I1,I2,I3,vc)+(1./3.)*uxy(I1,I2,I3,uc)) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,vc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,vc)) )
#define PYB2 (   I1,
  I2,
  I3 
)    ( rho*UT(vc) + acRho*( uu(I1,I2,I3,uc)*UX(vc) + uu(I1,I2,I3,vc)*UY(vc)) + e.y(c,I1,I2,I3,pc,t) -mu*(UXX(vc)+(4./3.)*UYY(vc)+(1./3.)*UXY(uc)) )
#define PYB3 (   I1,
  I2,
  I3 
)    ( mu*(uxx(I1,I2,I3,vc)+(4./3.)*uyy(I1,I2,I3,vc)+uzz(I1,I2,I3,vc)+(1./3.)*(uxy(I1,I2,I3,uc)+uyz(I1,I2,I3,wc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,vc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,vc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,vc)) )
#define PZB3 (   I1,
  I2,
  I3 
)    ( mu*(uxx(I1,I2,I3,wc)+uyy(I1,I2,I3,wc)+(4./3.)*uzz(I1,I2,I3,wc)+(1./3.)*(uxz(I1,I2,I3,uc)+uyz(I1,I2,I3,vc)) ) +acRho*( uu(I1,I2,I3,uc)*ux(I1,I2,I3,wc) + uu(I1,I2,I3,vc)*uy(I1,I2,I3,wc)+ uu(I1,I2,I3,wc)*uz(I1,I2,I3,wc)) )
#define U (   n)    e(c,I1,I2,I3,n,t)
#define UT (   n)    e.t(c,I1,I2,I3,n,t)
#define UX (   n)    e.x(c,I1,I2,I3,n,t)
#define UXX (   n)    e.xx(c,I1,I2,I3,n,t)
#define UXY (   n)    e.xy(c,I1,I2,I3,n,t)
#define UXZ (   n)    e.xz(c,I1,I2,I3,n,t)
#define UY (   n)    e.y(c,I1,I2,I3,n,t)
#define UYY (   n)    e.yy(c,I1,I2,I3,n,t)
#define UYZ (   n)    e.yz(c,I1,I2,I3,n,t)
#define UZ (   n)    e.z(c,I1,I2,I3,n,t)
#define UZZ (   n)    e.zz(c,I1,I2,I3,n,t)

Function Documentation

void asfAssignPressureRhs ( const int &  nd,
const int &  nd1a,
const int &  nd1b,
const int &  nd2a,
const int &  nd2b,
const int &  nd3a,
const int &  nd3b,
const int &  nd4a,
const int &  nd4b,
const int &  ipar,
const real &  rpar,
real &  f,
real &  u,
real &  p,
real &  gam,
const int &  mask,
const real &  rsxy,
const int &  ierr 
)