Overture  Version 25
Macros | Enumerations | Functions
wave.C File Reference
#include "Overture.h"
#include "Ogshow.h"
#include "CompositeGridOperators.h"
#include "PlotStuff.h"
Include dependency graph for wave.C:

Macros

#define FD4_2D(u, i1, i2, i3)
 
#define FD4_3D(u, i1, i2, i3)
 
#define FOR_3(i1, i2, i3, I1, I2, I3)   for( i3=I3.getBase(); i3<=I3.getBound(); i3++ ) for( i2=I2.getBase(); i2<=I2.getBound(); i2++ ) for( i1=I1.getBase(); i1<=I1.getBound(); i1++ )
 
#define U0(x, y, t)   exp( - alpha*( pow( a0*( (x)-(xPulse+c*(t)) ),pulsePow) ) )
 
#define VERTEX0(i0, i1, i2)   xa+dx0*(i0-i0a)
 
#define VERTEX1(i0, i1, i2)   ya+dy0*(i1-i1a)
 
#define VERTEX2(i0, i1, i2)   za+dz0*(i2-i2a)
 
#define U(i0, i1, i2)   up[(i0)+(i1)*d1+(i2)*d2]
 
#define UM(i0, i1, i2)   upm[(i0)+(i1)*d1+(i2)*d2]
 
#define U1G(i1, i2, i3)   u1gp[(i1)+(i2)*d1+(i3)*d2]
 
#define U2G(i1, i2, i3)   u2gp[(i1)+(i2)*d1+(i3)*d2]
 
#define LAP(i1, i2, i3)   lapp[(i1)+(i2)*d1+(i3)*d2]
 

Enumerations

enum  InitialConditionOptionEnum { smoothPulse, pulse, smoothPulse, pulse }
 

Functions

real getDt (const real &cfl, const real &a, const real &b, const real &c, const real &nu, MappedGrid &mg, MappedGridOperators &op, const real alpha0=-2., const real beta0=1.)
 
real getTimeStep (CompositeGrid &cg, CompositeGridOperators &operators, real cfl, real c, real nu)
 
void getInitialConditions (InitialConditionOptionEnum option, realCompositeGridFunction *u, real t, real dt, real c)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define FD4_2D (   u,
  i1,
  i2,
  i3 
)
Value:
( -( u(i1-2,i2,i3)+u(i1+2,i2,i3)+u(i1,i2-2,i3)+u(i1,i2+2,i3) ) \
+4.*( u(i1-1,i2,i3)+u(i1+1,i2,i3)+u(i1,i2-1,i3)+u(i1,i2+1,i3) ) \
-12.*u(i1,i2,i3) )

Referenced by main().

#define FD4_3D (   u,
  i1,
  i2,
  i3 
)
Value:
( -( u(i1-2,i2,i3)+u(i1+2,i2,i3)+u(i1,i2-2,i3)+u(i1,i2+2,i3)+u(i1,i2,i3-2)+u(i1,i2,i3+2) ) \
+4.*( u(i1-1,i2,i3)+u(i1+1,i2,i3)+u(i1,i2-1,i3)+u(i1,i2+1,i3)+u(i1,i2,i3-1)+u(i1,i2,i3+1) ) \
-18.*u(i1,i2,i3) )

Referenced by main().

#define FOR_3 (   i1,
  i2,
  i3,
  I1,
  I2,
  I3 
)    for( i3=I3.getBase(); i3<=I3.getBound(); i3++ ) for( i2=I2.getBase(); i2<=I2.getBound(); i2++ ) for( i1=I1.getBase(); i1<=I1.getBound(); i1++ )

Referenced by getInitialConditions(), and main().

#define LAP (   i1,
  i2,
  i3 
)    lapp[(i1)+(i2)*d1+(i3)*d2]
#define U (   i0,
  i1,
  i2 
)    up[(i0)+(i1)*d1+(i2)*d2]
#define U0 (   x,
  y,
 
)    exp( - alpha*( pow( a0*( (x)-(xPulse+c*(t)) ),pulsePow) ) )
#define U1G (   i1,
  i2,
  i3 
)    u1gp[(i1)+(i2)*d1+(i3)*d2]
#define U2G (   i1,
  i2,
  i3 
)    u2gp[(i1)+(i2)*d1+(i3)*d2]
#define UM (   i0,
  i1,
  i2 
)    upm[(i0)+(i1)*d1+(i2)*d2]
#define VERTEX0 (   i0,
  i1,
  i2 
)    xa+dx0*(i0-i0a)
#define VERTEX1 (   i0,
  i1,
  i2 
)    ya+dy0*(i1-i1a)
#define VERTEX2 (   i0,
  i1,
  i2 
)    za+dz0*(i2-i2a)

Enumeration Type Documentation

Enumerator
smoothPulse 
pulse 
smoothPulse 
pulse 

Function Documentation

real getDt ( const real cfl,
const real a,
const real b,
const real c,
const real nu,
MappedGrid mg,
MappedGridOperators op,
const real  alpha0 = -2.,
const real  beta0 = 1. 
)
void getInitialConditions ( InitialConditionOptionEnum  option,
realCompositeGridFunction u,
real  t,
real  dt,
real  c 
)
real getTimeStep ( CompositeGrid cg,
CompositeGridOperators operators,
real  cfl,
real  c,
real  nu 
)
int main ( int  argc,
char *  argv[] 
)

References DialogData::addOptionMenu(), BCTypes::allBoundaries, doubleCompositeGridFunction::applyBoundaryCondition(), assert, aString, boundaryCondition, c, PlotIt::contour(), BCTypes::dirichlet, discretizationWidth, GL_GraphicsInterface::erase(), BCTypes::evenSymmetry, BCTypes::extrapolate, BCTypes::extrapolateInterpolationNeighbours, FALSE, FD4_2D, FD4_3D, Overture::finish(), doubleCompositeGridFunction::finishBoundaryConditions(), FOR_3, GL_GraphicsInterface::getAnswer(), getCPU(), getFromADataBase(), getIndex(), getInitialConditions(), DialogData::getOptionMenu(), getTimeStep(), BoundaryConditionParameters::ghostLineToAssign, GI_PLOT_THE_OBJECT_AND_EXIT, GI_TOP_LABEL, gridIndexRange, i2, GL_GraphicsInterface::inputString(), doubleCompositeGridFunction::interpolate(), LAP, MappedGridOperators::laplacianOperator, max(), BCTypes::neumann, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), Ogshow::open(), BoundaryConditionParameters::orderOfExtrapolation, GL_GraphicsInterface::outputString(), PlotIt::plot(), GL_GraphicsInterface::popGUI(), pulse, GL_GraphicsInterface::pushGUI(), GenericGraphicsInterface::readCommandFile(), GL_GraphicsInterface::redraw(), GenericGraphicsInterface::saveCommandFile(), Ogshow::saveComment(), Ogshow::saveGeneralComment(), Ogshow::saveSolution(), GraphicsParameters::set(), OptionMenu::setCurrentChoice(), DialogData::setExitCommand(), Ogshow::setFlushFrequency(), doubleGridCollectionFunction::setName(), doubleCompositeGridFunction::setOperators(), DialogData::setOptionMenuColumns(), GenericCompositeGridOperators::setOrderOfAccuracy(), DialogData::setPushButtons(), DialogData::setTextBoxes(), DialogData::setTextLabel(), DialogData::setToggleButtons(), DialogData::setToggleState(), DialogData::setWindowTitle(), smoothPulse, sPrintF(), sScanF(), Overture::start(), Ogshow::startFrame(), GL_GraphicsInterface::stopReadingCommandFile(), MappedGrid::THEmask, TRUE, U1G, u1g, U2G, CompositeGrid::update(), doubleCompositeGridFunction::updateToMatchGrid(), and GenericCompositeGridOperators::useConservativeApproximations().