CG  Version 25
Macros | Functions
sm/src/forcing.C File Reference
#include "Cgsm.h"
#include "CompositeGridOperators.h"
#include "display.h"
#include "UnstructuredMapping.h"
#include "OGPolyFunction.h"
#include "OGTrigFunction.h"
#include "OGPulseFunction.h"
#include "interpPoints.h"
#include "ShowFileReader.h"
#include "ParallelUtility.h"
Include dependency graph for sm/src/forcing.C:

Macros

#define scatCyl   EXTERN_C_NAME(scatcyl)
 
#define scatSphere   EXTERN_C_NAME(scatsphere)
 
#define exmax   EXTERN_C_NAME(exmax)
 
#define forcingOptSolidMechanics   EXTERN_C_NAME(forcingoptsolidmechanics)
 
#define OGF   EXTERN_C_NAME(ogf)
 
#define OGF2D   EXTERN_C_NAME(ogf2d)
 
#define OGDERIV   EXTERN_C_NAME(ogderiv)
 
#define OGDERIV3   EXTERN_C_NAME(ogderiv3)
 
#define OGDERIV2   EXTERN_C_NAME(ogderiv2)
 
#define OGF3D   EXTERN_C_NAME(ogf3d)
 
#define EXX   EXTERN_C_NAME(exx)
 
#define FOR_3D(i1, i2, i3, I1, I2, I3)   int I1Base =I1.getBase(), I2Base =I2.getBase(), I3Base =I3.getBase(); int I1Bound=I1.getBound(), I2Bound=I2.getBound(), I3Bound=I3.getBound(); for(i3=I3Base; i3<=I3Bound; i3++) for(i2=I2Base; i2<=I2Bound; i2++) for(i1=I1Base; i1<=I1Bound; i1++)
 
#define FOR_3(i1, i2, i3, I1, I2, I3)   I1Base =I1.getBase(), I2Base =I2.getBase(), I3Base =I3.getBase(); I1Bound=I1.getBound(), I2Bound=I2.getBound(), I3Bound=I3.getBound(); for(i3=I3Base; i3<=I3Bound; i3++) for(i2=I2Base; i2<=I2Bound; i2++) for(i1=I1Base; i1<=I1Bound; i1++)
 
#define exTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-ky/(eps*cc))
 
#define eyTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( kx/(eps*cc))
 
#define hzTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))
 
#define exLaplacianTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(+ky*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
 
#define eyLaplacianTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-kx*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
 
#define hzLaplacianTrue(x, y, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( -(twoPi*twoPi*(kx*kx+ky*ky) ) )
 
#define hzGaussianPulse(xi)   exp(-betaGaussianPlaneWave*((xi)*(xi)))
 
#define exGaussianPulse(xi)   hzGaussianPulse(xi)*(-ky/(eps*cc))
 
#define eyGaussianPulse(xi)   hzGaussianPulse(xi)*( kx/(eps*cc))
 
#define hzLaplacianGaussianPulse(xi)   ((4.*betaGaussianPlaneWave*betaGaussianPlaneWave*(kx*kx+ky*ky))*xi*xi-(2.*betaGaussianPlaneWave*(kx*kx+ky*ky)))*exp(-betaGaussianPlaneWave*((xi)*(xi)))
 
#define exLaplacianGaussianPulse(xi)   hzLaplacianGaussianPulse(xi,t)*(-ky/(eps*cc))
 
#define eyLaplacianGaussianPulse(xi)   hzLaplacianGaussianPulse(xi,t)*( kx/(eps*cc))
 
#define exTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))*(-ky/(eps*cc))
 
#define eyTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))*( kx/(eps*cc))
 
#define ezTrue3d(x, y, z, t)   0
 
#define hxTrue3d(x, y, z, t)   0
 
#define hyTrue3d(x, y, z, t)   0
 
#define hzTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))
 
#define exLaplacianTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(+ky*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
 
#define eyLaplacianTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-kx*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
 
#define ezLaplacianTrue3d(x, y, z, t)   0
 
#define hxLaplacianTrue3d(x, y, z, t)   0
 
#define hyLaplacianTrue3d(x, y, z, t)   0
 
#define hzLaplacianTrue3d(x, y, z, t)   sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( -(twoPi*twoPi*(kx*kx+ky*ky) ) )
 
#define U(i0, i1, i2, i3)   up[i0+uDim0*(i1+uDim1*(i2+uDim2*(i3)))]
 
#define X(i0, i1, i2, i3)   xp[i0+xDim0*(i1+xDim1*(i2+xDim2*(i3)))]
 

Functions

void scatCyl (const int &nd, const int &n1a, const int &n1b, const int &n2a, const int &n2b, const int &n3a, const int &n3b, 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 real &xy, real &u, const int &ipar, const real &rpar)
 
void scatSphere (const int &nd, const int &n1a, const int &n1b, const int &n2a, const int &n2b, const int &n3a, const int &n3b, 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 real &xy, real &u, const int &ipar, const real &rpar)
 
void exmax (double &Ez, double &Bx, double &By, const int &nsources, const double &xs, const double &ys, const double &tau, const double &var, const double &amp, const double &a, const double &x, const double &y, const double &time)
 
void forcingOptSolidMechanics (const int &nd, const int &nd1a, const int &nd1b, const int &nd2a, const int &nd2b, const int &nd3a, const int &nd3b, const int &ndf1a, const int &ndf1b, const int &ndf2a, const int &ndf2b, const int &ndf3a, const int &ndf3b, real &u, const real &f, const int &mask, const real &rx, const real &x, const int &ipar, const real &rpar, int &ierr)
 
real OGF (OGFunction *&ep, const real &x, const real &y, const real &z, const int &c, const real &t)
 
void OGF2D (OGFunction *&ep, const real &x, const real &y, const real &t, real &u, real &v)
 
void OGDERIV (OGFunction *&ep, const int &ntd, const int &nxd, const int &nyd, const int &nzd, const real &x, const real &y, const real &z, const real &t, const int &n, real &ud)
 
void OGDERIV3 (OGFunction *&ep, const int &ntd, const int &nxd, const int &nyd, const int &nzd, const real &x, const real &y, const real &z, const real &t, const int &n1, real &ud1, const int &n2, real &ud2, const int &n3, real &ud3)
 
void OGDERIV2 (OGFunction *&ep, const int &ntd, const int &nxd, const int &nyd, const int &nzd, const real &x, const real &y, const real &z, const real &t, const int &n1, real &ud1, const int &n2, real &ud2)
 
void OGF3D (OGFunction *&ep, const real &x, const real &y, const real &z, const real &t, real &u, real &v, real &w)
 
real EXX (OGFunction *&ep, const real &x, const real &y, const real &z, const int &c, const real &t)
 

Macro Definition Documentation

#define exGaussianPulse (   xi)    hzGaussianPulse(xi)*(-ky/(eps*cc))
#define exLaplacianGaussianPulse (   xi)    hzLaplacianGaussianPulse(xi,t)*(-ky/(eps*cc))
#define exLaplacianTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(+ky*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
#define exLaplacianTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(+ky*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
#define exmax   EXTERN_C_NAME(exmax)
#define exTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-ky/(eps*cc))
#define exTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))*(-ky/(eps*cc))
#define EXX   EXTERN_C_NAME(exx)
#define eyGaussianPulse (   xi)    hzGaussianPulse(xi)*( kx/(eps*cc))
#define eyLaplacianGaussianPulse (   xi)    hzLaplacianGaussianPulse(xi,t)*( kx/(eps*cc))
#define eyLaplacianTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-kx*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
#define eyLaplacianTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*(-kx*(twoPi*twoPi*(kx*kx+ky*ky))/(eps*cc))
#define eyTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( kx/(eps*cc))
#define eyTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))*( kx/(eps*cc))
#define ezLaplacianTrue3d (   x,
  y,
  z,
 
)    0
#define ezTrue3d (   x,
  y,
  z,
 
)    0
#define FOR_3 (   i1,
  i2,
  i3,
  I1,
  I2,
  I3 
)    I1Base =I1.getBase(), I2Base =I2.getBase(), I3Base =I3.getBase(); I1Bound=I1.getBound(), I2Bound=I2.getBound(), I3Bound=I3.getBound(); for(i3=I3Base; i3<=I3Bound; i3++) for(i2=I2Base; i2<=I2Bound; i2++) for(i1=I1Base; i1<=I1Bound; i1++)
#define FOR_3D (   i1,
  i2,
  i3,
  I1,
  I2,
  I3 
)    int I1Base =I1.getBase(), I2Base =I2.getBase(), I3Base =I3.getBase(); int I1Bound=I1.getBound(), I2Bound=I2.getBound(), I3Bound=I3.getBound(); for(i3=I3Base; i3<=I3Bound; i3++) for(i2=I2Base; i2<=I2Bound; i2++) for(i1=I1Base; i1<=I1Bound; i1++)
#define forcingOptSolidMechanics   EXTERN_C_NAME(forcingoptsolidmechanics)
#define hxLaplacianTrue3d (   x,
  y,
  z,
 
)    0
#define hxTrue3d (   x,
  y,
  z,
 
)    0
#define hyLaplacianTrue3d (   x,
  y,
  z,
 
)    0
#define hyTrue3d (   x,
  y,
  z,
 
)    0
#define hzGaussianPulse (   xi)    exp(-betaGaussianPlaneWave*((xi)*(xi)))
#define hzLaplacianGaussianPulse (   xi)    ((4.*betaGaussianPlaneWave*betaGaussianPlaneWave*(kx*kx+ky*ky))*xi*xi-(2.*betaGaussianPlaneWave*(kx*kx+ky*ky)))*exp(-betaGaussianPlaneWave*((xi)*(xi)))
#define hzLaplacianTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( -(twoPi*twoPi*(kx*kx+ky*ky) ) )
#define hzLaplacianTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))*( -(twoPi*twoPi*(kx*kx+ky*ky) ) )
#define hzTrue (   x,
  y,
 
)    sin(twoPi*(kx*(x)+ky*(y)-cc*(t)))
#define hzTrue3d (   x,
  y,
  z,
 
)    sin(twoPi*(kx*(x)+ky*(y)+kz*(z)-cc*(t)))
#define OGDERIV   EXTERN_C_NAME(ogderiv)
#define OGDERIV2   EXTERN_C_NAME(ogderiv2)
#define OGDERIV3   EXTERN_C_NAME(ogderiv3)
#define OGF   EXTERN_C_NAME(ogf)
#define OGF2D   EXTERN_C_NAME(ogf2d)
#define OGF3D   EXTERN_C_NAME(ogf3d)
#define scatCyl   EXTERN_C_NAME(scatcyl)
#define scatSphere   EXTERN_C_NAME(scatsphere)
#define U (   i0,
  i1,
  i2,
  i3 
)    up[i0+uDim0*(i1+uDim1*(i2+uDim2*(i3)))]
#define X (   i0,
  i1,
  i2,
  i3 
)    xp[i0+xDim0*(i1+xDim1*(i2+xDim2*(i3)))]

Function Documentation

void exmax ( double &  Ez,
double &  Bx,
double &  By,
const int &  nsources,
const double &  xs,
const double &  ys,
const double &  tau,
const double &  var,
const double &  amp,
const double &  a,
const double &  x,
const double &  y,
const double &  time 
)
real EXX ( OGFunction *&  ep,
const real &  x,
const real &  y,
const real &  z,
const int &  c,
const real &  t 
)
void forcingOptSolidMechanics ( const int &  nd,
const int &  nd1a,
const int &  nd1b,
const int &  nd2a,
const int &  nd2b,
const int &  nd3a,
const int &  nd3b,
const int &  ndf1a,
const int &  ndf1b,
const int &  ndf2a,
const int &  ndf2b,
const int &  ndf3a,
const int &  ndf3b,
real &  u,
const real &  f,
const int &  mask,
const real &  rx,
const real &  x,
const int &  ipar,
const real &  rpar,
int &  ierr 
)
void OGDERIV ( OGFunction *&  ep,
const int &  ntd,
const int &  nxd,
const int &  nyd,
const int &  nzd,
const real &  x,
const real &  y,
const real &  z,
const real &  t,
const int &  n,
real &  ud 
)
void OGDERIV2 ( OGFunction *&  ep,
const int &  ntd,
const int &  nxd,
const int &  nyd,
const int &  nzd,
const real &  x,
const real &  y,
const real &  z,
const real &  t,
const int &  n1,
real &  ud1,
const int &  n2,
real &  ud2 
)
void OGDERIV3 ( OGFunction *&  ep,
const int &  ntd,
const int &  nxd,
const int &  nyd,
const int &  nzd,
const real &  x,
const real &  y,
const real &  z,
const real &  t,
const int &  n1,
real &  ud1,
const int &  n2,
real &  ud2,
const int &  n3,
real &  ud3 
)
real OGF ( OGFunction *&  ep,
const real &  x,
const real &  y,
const real &  z,
const int &  c,
const real &  t 
)

References x, y, and z.

void OGF2D ( OGFunction *&  ep,
const real &  x,
const real &  y,
const real &  t,
real &  u,
real &  v 
)

References x, and y.

void OGF3D ( OGFunction *&  ep,
const real &  x,
const real &  y,
const real &  z,
const real &  t,
real &  u,
real &  v,
real &  w 
)

References x, y, and z.

void scatCyl ( const int &  nd,
const int &  n1a,
const int &  n1b,
const int &  n2a,
const int &  n2b,
const int &  n3a,
const int &  n3b,
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 real &  xy,
real &  u,
const int &  ipar,
const real &  rpar 
)
void scatSphere ( const int &  nd,
const int &  n1a,
const int &  n1b,
const int &  n2a,
const int &  n2b,
const int &  n3a,
const int &  n3b,
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 real &  xy,
real &  u,
const int &  ipar,
const real &  rpar 
)