Overture
Version 25
|
#include "Overture.h"
#include "Ogshow.h"
#include "CompositeGridOperators.h"
#include "PlotStuff.h"
#include "display.h"
#include "ParallelOverlappingGridInterpolator.h"
#include "ParallelUtility.h"
#include "LoadBalancer.h"
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 |
#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++ ) |
Referenced by getInitialConditions(), and main().
Referenced by getInitialConditions().
Referenced by getInitialConditions().
#define VERTEX0 | ( | i0, | |
i1, | |||
i2 | |||
) | xa+dx0*(i0-i0a) |
#define VERTEX1 | ( | i0, | |
i1, | |||
i2 | |||
) | ya+dy0*(i1-i1a) |
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. |
||
) |
References abs(), axis1, axis2, MappedGridOperators::derivative(), dx, fabs(), MappedGrid::getDeltaX(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMinValue(), MappedGrid::gridSpacing(), MappedGrid::indexRange(), MappedGrid::inverseVertexDerivative(), MappedGrid::isRectangular(), mask, MappedGrid::mask(), min(), MN, MappedGrid::numberOfDimensions(), pow(), REAL_MAX, RX, rx, MappedGrid::THEinverseVertexDerivative, MappedGrid::update(), MappedGridOperators::xDerivative, and MappedGridOperators::yDerivative.
void getInitialConditions | ( | InitialConditionOptionEnum | option, |
realCompositeGridFunction * | u, | ||
real | t, | ||
real | dt, | ||
real | c, | ||
const bool | plotOption | ||
) |
References CompositeGrid::destroy(), dimension, dx, fabs(), FOR_3, doubleCompositeGridFunction::getCompositeGrid(), getIndex(), ParallelUtility::getLocalArrayBounds(), i2, GenericGridCollection::numberOfComponentGrids(), OV_GET_SERIAL_ARRAY, printF(), smoothPulse, MappedGrid::THEvertex, U, U0, UM, CompositeGrid::update(), VERTEX, VERTEX0, and VERTEX1.
Referenced by main().
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().