Overture  Version 25
Macros | Enumerations | Functions | Variables
pwave.C File Reference
#include "Overture.h"
#include "Ogshow.h"
#include "CompositeGridOperators.h"
#include "PlotStuff.h"
#include "display.h"
#include "ParallelOverlappingGridInterpolator.h"
#include "ParallelUtility.h"
#include "LoadBalancer.h"
Include dependency graph for pwave.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 U(i0, i1, i2)   up[(i0)+(i1)*d1+(i2)*d2]
 
#define UM(i0, i1, i2)   upm[(i0)+(i1)*d1+(i2)*d2]
 
#define VERTEX(i0, i1, i2, i3)   vertexp[i0+vertexDim0*(i1+vertexDim1*(i2+vertexDim2*(i3)))]
 
#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

int getLineFromFile (FILE *file, char s[], int lim)
 
real if (measureCPU)
 
real getDt (const real &cfl, const real &a, const real &b, 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, const bool plotOption)
 
int main (int argc, char *argv[])
 

Variables

bool measureCPU =TRUE
 

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]

Referenced by main().

#define U (   i0,
  i1,
  i2 
)    up[(i0)+(i1)*d1+(i2)*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]

Referenced by main().

#define U2G (   i1,
  i2,
  i3 
)    u2gp[(i1)+(i2)*d1+(i3)*d2]

Referenced by main().

#define UM (   i0,
  i1,
  i2 
)    upm[(i0)+(i1)*d1+(i2)*d2]

Referenced by getInitialConditions().

#define UM (   i0,
  i1,
  i2 
)    upm[(i0)+(i1)*d1+(i2)*d2]
#define VERTEX (   i0,
  i1,
  i2,
  i3 
)    vertexp[i0+vertexDim0*(i1+vertexDim1*(i2+vertexDim2*(i3)))]

Referenced by getInitialConditions().

#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 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,
const bool  plotOption 
)
int getLineFromFile ( FILE *  file,
char  s[],
int  lim 
)

References c.

real getTimeStep ( CompositeGrid cg,
CompositeGridOperators operators,
real  cfl,
real  c,
real  nu 
)
real if ( measureCPU  )
int main ( int  argc,
char *  argv[] 
)

References DialogData::addOptionMenu(), BCTypes::allBoundaries, doubleCompositeGridFunction::applyBoundaryCondition(), assert, aString, boundaryCondition, MappedGrid::boundaryCondition(), c, PlotIt::contour(), debug, dimension, MappedGrid::dimension(), BCTypes::dirichlet, discretizationWidth, GL_GraphicsInterface::erase(), BCTypes::evenSymmetry, BCTypes::extrapolate, BCTypes::extrapolateInterpolationNeighbours, FD4_2D, FD4_3D, Overture::finish(), doubleCompositeGridFunction::finishBoundaryConditions(), FOR_3, GL_GraphicsInterface::getAnswer(), getBoundaryIndex(), getFromADataBase(), getIndex(), getInitialConditions(), ParallelUtility::getLocalArrayBounds(), DialogData::getOptionMenu(), getTimeStep(), BoundaryConditionParameters::ghostLineToAssign, GI_PLOT_THE_OBJECT_AND_EXIT, GI_TOP_LABEL, MappedGrid::gridIndexRange(), gridIndexRange, i2, doubleCompositeGridFunction::interpolate(), LAP, MappedGridOperators::laplacianOperator, mask, max(), min(), BCTypes::neumann, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), GridCollection::numberOfGridPoints(), Ogshow::open(), BoundaryConditionParameters::orderOfExtrapolation, OV_GET_SERIAL_ARRAY, PlotIt::plot(), GL_GraphicsInterface::popGUI(), printF(), 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(), MappedGrid::setMinimumNumberOfDistributedGhostLines(), 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, timeForBoundaryConditions, U1G, u1g, U2G, CompositeGrid::update(), doubleCompositeGridFunction::updateToMatchGrid(), and GenericCompositeGridOperators::useConservativeApproximations().

Variable Documentation

bool measureCPU =TRUE

Referenced by main().