Overture  Version 25
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Ogmg Class Reference

#include <Ogmg.h>

Collaboration diagram for Ogmg:
Collaboration graph
[legend]

Public Types

enum  TransferTypesEnum { fullWeighting =0, restrictedFullWeighting, injection }
 
enum  OptionEnum { assumeSparseStencilOnRectangularGrids }
 
enum  SmootherTypeEnum {
  Jacobi =OgmgParameters::Jacobi, GaussSeidel =OgmgParameters::GaussSeidel, redBlack =OgmgParameters::redBlack, lineJacobiInDirection1 =OgmgParameters::lineJacobiInDirection1,
  lineJacobiInDirection2 =OgmgParameters::lineJacobiInDirection2, lineJacobiInDirection3 =OgmgParameters::lineJacobiInDirection3, lineZebraInDirection1 =OgmgParameters::lineZebraInDirection1, lineZebraInDirection2 =OgmgParameters::lineZebraInDirection2,
  lineZebraInDirection3 =OgmgParameters::lineZebraInDirection3, alternatingLineJacobi =OgmgParameters::alternatingLineJacobi, alternatingLineZebra =OgmgParameters::alternatingLineZebra, numberOfSmoothers
}
 
enum  { allGrids =-99, allLevels =-100 }
 
enum  Timing {
  timeForDefect =0, timeForSmooth, timeForFineToCoarse, timeForFineToCoarseBC,
  timeForCoarseToFine, timeForDirectSolver, timeForSolve, timeForInterpolation,
  timeForBoundaryConditions, timeForDefectInSmooth, timeForTridiagonalSolverInSmooth, timeForTridiagonalFactorInSmooth,
  timeForRelaxInSmooth, timeForBoundarySmooth, timeForInterpolationSmooth, timeForInitialize,
  timeForBuildExtraLevels, timeForOperatorAveraging, timeForBuildPredefinedEquations, timeForFullMultigrid,
  timeForDefectNorm, timeForOgesSmootherInit, timeForMiscellaneous, timeForGhostBoundaryUpdate,
  timeForInterpolateCoarseFromFine, numberOfThingsToTime
}
 
enum  InterpolationQualityEnum {
  canInterpolateQuality1 =0, canInterpolateQuality2, canInterpolateQuality3, canInterpolateWithExtrapolation,
  canInterpolateQualityBad, canInterpolateQualityVeryBad, canNotInterpolate
}
 
enum  StencilTypeEnum {
  general =0, sparse =1, constantCoeff =2, sparseConstantCoefficients =3,
  variableCoefficients =4, sparseVariableCoefficients =5
}
 
enum  CycleResultsEnum { defectPerCycle =0, workUnitsPerCycle, grid0DefectPerCycle, numberOfCycleResults }
 

Public Member Functions

 Ogmg ()
 
 Ogmg (CompositeGrid &mg, GenericGraphicsInterface *ps=0)
 
 ~Ogmg ()
 /brief Destructor.
 
void displaySmoothers (const aString &label, FILE *file=stdout)
 
CompositeGridgetCompositeGrid ()
 
FILE * getInfoFile ()
 
FILE * getCheckFile ()
 
realCompositeGridFunctiongetDefect ()
 
void computeDefect (int level)
 
realCompositeGridFunctiongetRhs ()
 
real getMaximumResidual () const
 
real getMean (realCompositeGridFunction &u)
 
int getNumberOfIterations () const
 
int getOrderOfExtrapolation (const int level) const
 Return the order of extrapolation to use for a given order of accuracy and level.
 
void set (GenericGraphicsInterface *ps)
 
void set (MultigridCompositeGrid &mgcg)
 Supply a MultigridCompositeGrid to use.
 
void setGridName (const aString &name)
 
void setSolverName (const aString &name)
 
int setOgmgParameters (OgmgParameters &parameters)
 
int setOption (OptionEnum option, bool trueOrFalse)
 Assign an option.
 
int setOrderOfAccuracy (const int &orderOfAccuracy)
 
int setCoefficientArray (realCompositeGridFunction &coeff, const IntegerArray &boundaryConditions=Overture::nullIntArray(), const RealArray &bcData=Overture::nullRealArray())
 
int setCornerBoundaryConditions (BoundaryConditionParameters &bcParams, const int level)
 Set the boundary condition parameters for edges and corners.
 
int setEquationAndBoundaryConditions (OgesParameters::EquationEnum equation, CompositeGridOperators &op, const IntegerArray &boundaryConditions, const RealArray &bcData, const RealArray &constantCoeff=Overture::nullRealArray(), realCompositeGridFunction *variableCoeff=NULL)
 Specify the (predefined) equation to solve. **this is not finished yet **.
 
virtual real sizeOf (FILE *file=NULL) const
 
int chooseBestSmoother ()
 
int update (GenericGraphicsInterface &gi)
 
int update (GenericGraphicsInterface &gi, CompositeGrid &cg)
 
void updateToMatchGrid (CompositeGrid &mg)
 
int solve (realCompositeGridFunction &u, realCompositeGridFunction &f)
 
void printStatistics (FILE *file=stdout) const
 
int smoothTest (GenericGraphicsInterface &ps, int plotOption)
 
int coarseToFineTest ()
 
int fineToCoarseTest ()
 
int bcTest ()
 
int coarseGridSolverTest (int plotOption=0)
 
int applyInitialConditions ()
 
int applyFinalConditions ()
 
void assignBoundaryConditionCoefficients (realMappedGridFunction &coeff, int grid, int level, int sideToCheck=-1, int axisToCheck=-1)
 
void checkParameters ()
 Check the validity of parameters.
 
void init ()
 
void setup (CompositeGrid &mg)
 
void setMean (realCompositeGridFunction &u, const real meanValue, int level)
 Set the "mean" of a grid function The mean is just the sum of all points with mask!=0.
 
real l2Norm (const realCompositeGridFunction &e)
 
real l2Norm (const realMappedGridFunction &e)
 
real maxNorm (const realCompositeGridFunction &e)
 
real maxNorm (const realMappedGridFunction &e)
 
real l2Error (const realCompositeGridFunction &u, const realCompositeGridFunction &v)
 
int initializeBoundaryConditions (realCompositeGridFunction &coeff)
 
int initializeConstantCoefficients ()
 
int createNullVector ()
 
int saveLeftNullVector ()
 
int readLeftNullVector ()
 
real rightNullVectorDotU (const int &level, const RealCompositeGridFunction &u)
 
int buildExtraLevels (CompositeGrid &mg)
 
int buildExtraLevelsNew (CompositeGrid &mg)
 
int buildPredefinedEquations (CompositeGridOperators &cgop)
 build the predefined equations
 
int buildPredefinedCoefficientMatrix (int level, bool buildRectangular, bool buildCurvilinear)
 Build the coefficient matrix for the predefined equations on a given level.
 
int buildPredefinedVariableCoefficients (RealCompositeGridFunction &coeff, const int level)
 
int cycle (const int &level, const int &iteration, real &maximumDefect, const int &numberOfCycleIterations)
 
OgmgParameters::FourthOrderBoundaryConditionEnum getGhostLineBoundaryCondition (int bc, int ghostLine, int grid, int level, int &orderOfExtrapolation, aString *bcName=NULL) const
 
int setBoundaryConditions (const IntegerArray &boundaryConditions, const RealArray &bcData=Overture::nullRealArray())
 
void smooth (const int &level, int numberOfSmoothingSteps, int cycleNumber)
 
void smoothJacobi (const int &level, const int &grid, int smootherChoice=0)
 
void smoothGaussSeidel (const int &level, const int &grid)
 
void smoothRedBlack (const int &level, const int &grid)
 
void smoothLine (const int &level, const int &grid, const int &direction, bool useZebra=true, const int smoothBoundarySide=-1)
 
void alternatingLineSmooth (const int &level, const int &grid, bool useZebra=true)
 
void applyOgesSmoother (const int level, const int grid)
 
void smoothBoundary (int level, int grid, int bcOption[6], int numberOfLayers=1, int numberOfIterations=1)
 
void smoothInterpolationNeighbours (int level, int grid)
 
void computeDefectRatios (int level)
 
bool useEquationOnGhostLineForDirichletBC (MappedGrid &mg, int level)
 
bool useEquationOnGhostLineForNeumannBC (MappedGrid &mg, int level)
 
void defect (const int &level)
 
void defect (const int &level, const int &grid)
 
void fineToCoarse (const int &level, bool transferForcing=false)
 
void fineToCoarse (const int &level, const int &grid, bool transferForcing=false)
 
void coarseToFine (const int &level)
 
void coarseToFine (const int &level, const int &grid)
 
real defectMaximumNorm (const int &level, int approximationStride=1)
 
real defectNorm (const int &level, const int &grid, int option=0, int approximationStride=8)
 
real getDefect (const int &level, const int &grid, realArray &f, realArray &u, const Index &I1, const Index &I2, const Index &I3, realArray &defect, const int lineSmoothOption=-1, const int defectOption=0, real &defectL2Norm=bogusRealArgument1, real &defectMaxNorm=bogusRealArgument2)
 
void evaluateTheDefectFormula (const int &level, const int &grid, const realArray &c, const realArray &u, const realArray &f, realArray &defect, MappedGrid &mg, const Index &I1, const Index &I2, const Index &I3, const Index &I1u, const Index &I2u, const Index &I3u, const int lineSmoothOption)
 
int fullMultigrid ()
 
int interpolate (realCompositeGridFunction &u, const int &grid=-1, int level=-1)
 
int applyBoundaryConditions (const int &level, const int &grid, RealMappedGridFunction &u, RealMappedGridFunction &f)
 
int applyBoundaryConditions (const int &level, RealCompositeGridFunction &u, RealCompositeGridFunction &f)
 
int operatorAveraging (RealCompositeGridFunction &coeff, const int &level)
 
int operatorAveraging (RealMappedGridFunction &coeffFine, RealMappedGridFunction &coeffCoarse, const IntegerArray &coarseningRatio, int grid=0, int level=0)
 
int averageCoefficients (Index &I1, Index &I2, Index &I3, Index &I1p, Index &I2p, Index &I3p, Index &J1, Index &J2, Index &J3, TransferTypesEnum option[3], const realSerialArray &cFine, realSerialArray &cCoarse, int ipar[])
 
int markGhostPoints (CompositeGrid &cg)
 
int getInterpolationCoordinates (CompositeGrid &cg0, CompositeGrid &cg1, const IntegerArray &ib, const int grid, const IntegerArray &gridsToCheck, realSerialArray &rb, const bool isRectangular, int iv0[3], real dx0[3], real xab0[2][3], int iv1[3], real dx1[3], real xab1[2][3])
 
int getInterpolationCoordinates (CompositeGrid &cg0, CompositeGrid &cg1, const IntegerArray &ib, const int grid, const IntegerArray &gridsToCheck, realSerialArray &rb, const bool isRectangular, int iv0[3], real dx0[3], real xab0[2][3], int iv1[3], real dx1[3], real xab1[2][3], InterpolationData &ipd)
 
int getInterpolationCoordinatesNew (CompositeGrid &cg0, CompositeGrid &cg1, const IntegerArray &ib, const RealArray &xa, const int grid, const IntegerArray &gridsToCheck, realSerialArray &rb, const bool isRectangular, int iv0[3], real dx0[3], real xab0[2][3], int iv1[3], real dx1[3], real xab1[2][3], InterpolationData &ipd, IntegerArray &ia0, realSerialArray &donorDist)
 
int getInterpolationCoordinatesNewOld (CompositeGrid &cg0, CompositeGrid &cg1, const IntegerArray &ib, const RealArray &xa, const int grid, const IntegerArray &gridsToCheck, realSerialArray &rb, const bool isRectangular, int iv0[3], real dx0[3], real xab0[2][3], int iv1[3], real dx1[3], real xab1[2][3], InterpolationData &ipd)
 
int getInterpolationCoordinates (CompositeGrid &cg0, CompositeGrid &cg1, int i, int grid, int iv[], int jv[], realSerialArray &r, bool isRectangular, int iv0[3], real dx0[3], real xab0[2][3], int iv1[3], real dx[3], real xab[2][3])
 
InterpolationQualityEnum getInterpolationStencil (CompositeGrid &cg0, CompositeGrid &cg1, int i, int iv[3], int grid, int l, intSerialArray &inverseGrid, intSerialArray &interpoleeGrid, intSerialArray &interpoleeLocation, intSerialArray &interpolationPoint, intSerialArray &variableInterpolationWidth, realSerialArray &interpolationCoordinates, realSerialArray &inverseCoordinates)
 
int checkForBetterQualityInterpolation (realSerialArray &x, int gridI, InterpolationQualityEnum &interpolationQuality, CompositeGrid &cg0, CompositeGrid &cg1, int i, int iv[3], int grid, int l, intSerialArray &inverseGrid, intSerialArray &interpoleeGrid, intSerialArray &interpoleeLocation, intSerialArray &interpolationPoint, intSerialArray &variableInterpolationWidth, realSerialArray &interpolationCoordinates, realSerialArray &inverseCoordinates)
 Check to see if a point x can interpolate from gridI with a better quality interpolation.
 
int outputCycleInfo ()
 Output results about the cycle convergence rates etc. in a form suitable for matlab.
 
int outputResults (const int &level, const int &iteration, real &maximumDefect, real &defectNew, real &defectOld)
 Output results for this multigrid cycle.
 
int buildCoefficientArrays ()
 Once the coefficient matrix is known on the finest level we can automatically build the coeff matrices on coarser levels.
 
int addAdjustmentForSingularProblem (int level, int iteration)
 Adjust the right-hand-side for a singular problem.
 
int removeAdjustmentForSingularProblem (int level, int iteration)
 Remove the adjustment to the right-handside for a singular problem.
 
int getSingularParameter (int level)
 
int computeLeftNullVector ()
 

Public Attributes

OgmgParameters parameters
 
Oges directSolver
 
OgesogesSmoother
 
MultigridCompositeGrid multigridCompositeGrid
 
aString gridName
 
aString solverName
 
realCompositeGridFunction uMG
 
realCompositeGridFunction fMG
 
realCompositeGridFunction defectMG
 
realCompositeGridFunction cMG
 
realCompositeGridFunction rightNullVector
 
realCompositeGridFunctionleftNullVector
 
bool leftNullVectorIsComputed
 
realCompositeGridFunctionv
 
realCompositeGridFunction uOld
 
bool useForcingAsBoundaryConditionOnAllLevels
 
RealArray alpha
 
RealArray workUnits
 
RealArray constantCoefficients
 
RealArray equationCoefficients
 
realCompositeGridFunctionvarCoeff
 
RealArray cycleResults
 
IntegerArray interpolantWasCreated
 
IntegerArray lineSmoothIsInitialized
 
IntegerArray boundaryCondition
 
bool bcSupplied
 
bool bcDataSupplied
 
IntegerArray bc
 
RealArray boundaryConditionData
 
int subSmoothReferenceGrid
 
RealArray defectRatio
 
IntegerArray isConstantCoefficients
 
IntegerArray active
 
BoundaryConditionParameters bcParams
 
TridiagonalSolver **** tridiagonalSolver
 
CompositeGridOperatorsoperatorsForExtraLevels
 
Interpolant ** interpolant
 
GenericGraphicsInterfaceps
 
GraphicsParameters psp
 
int myid
 
FILE * debugFile
 
FILE * pDebugFile
 
FILE * infoFile
 
FILE * checkFile
 
FILE * gridCheckFile
 
bool initialized
 
bool assumeSparseStencilForRectangularGrids
 
int orderOfAccuracy
 
int width1
 
int width2
 
int width3
 
int halfWidth1
 
int halfWidth2
 
int halfWidth3
 
int numberOfGridPoints
 
int numberOfSolves
 
int totalNumberOfCycles
 
int numberOfCycles
 
int numberOfIterations
 
int numberOfExtraLevels
 
int levelZero
 
int * iterationCount
 
real workUnit
 
real timeForAddition
 
real timeForMultiplication
 
real timeForDivision
 
real totalWorkUnits
 
real totalResidualReduction
 
real fullMultigridWorkUnits
 
real averageEffectiveConvergenceRate
 
real sumTotalWorkUnits
 
real l2NormRightHandSide
 
real maximumResidual
 
real tm [numberOfThingsToTime]
 
int timerGranularity
 
int totalNumberOfCoarseGridIterations
 
OgesParameters::EquationEnum equationToSolve
 
Interpolate interp
 
char buff [100]
 
int * nipn
 
int * ndipn
 
int ** ipn
 
int numberOfIBSArrays
 

Static Public Attributes

static int debug =0
 
static OGFunctionpExactSolution =NULL
 
static aString infoFileCaption [5]
 
static int numberOfInstances =0
 
static real bogusRealArgument1 =0.
 
static real bogusRealArgument2 =0.
 

Member Enumeration Documentation

anonymous enum
Enumerator
allGrids 
allLevels 
Enumerator
defectPerCycle 
workUnitsPerCycle 
grid0DefectPerCycle 
numberOfCycleResults 
Enumerator
canInterpolateQuality1 
canInterpolateQuality2 
canInterpolateQuality3 
canInterpolateWithExtrapolation 
canInterpolateQualityBad 
canInterpolateQualityVeryBad 
canNotInterpolate 
Enumerator
assumeSparseStencilOnRectangularGrids 
Enumerator
Jacobi 
GaussSeidel 
redBlack 
lineJacobiInDirection1 
lineJacobiInDirection2 
lineJacobiInDirection3 
lineZebraInDirection1 
lineZebraInDirection2 
lineZebraInDirection3 
alternatingLineJacobi 
alternatingLineZebra 
numberOfSmoothers 
Enumerator
general 
sparse 
constantCoeff 
sparseConstantCoefficients 
variableCoefficients 
sparseVariableCoefficients 
Enumerator
timeForDefect 
timeForSmooth 
timeForFineToCoarse 
timeForFineToCoarseBC 
timeForCoarseToFine 
timeForDirectSolver 
timeForSolve 
timeForInterpolation 
timeForBoundaryConditions 
timeForDefectInSmooth 
timeForTridiagonalSolverInSmooth 
timeForTridiagonalFactorInSmooth 
timeForRelaxInSmooth 
timeForBoundarySmooth 
timeForInterpolationSmooth 
timeForInitialize 
timeForBuildExtraLevels 
timeForOperatorAveraging 
timeForBuildPredefinedEquations 
timeForFullMultigrid 
timeForDefectNorm 
timeForOgesSmootherInit 
timeForMiscellaneous 
timeForGhostBoundaryUpdate 
timeForInterpolateCoarseFromFine 
numberOfThingsToTime 
Enumerator
fullWeighting 
restrictedFullWeighting 
injection 

Constructor & Destructor Documentation

Ogmg::Ogmg ( )

Referenced by main().

Ogmg::Ogmg ( CompositeGrid mg,
GenericGraphicsInterface ps = 0 
)
Ogmg::~Ogmg ( )

/brief Destructor.

Member Function Documentation

int Ogmg::addAdjustmentForSingularProblem ( int  level,
int  iteration 
)
void Ogmg::alternatingLineSmooth ( const int &  level,
const int &  grid,
bool  useZebra = true 
)
int Ogmg::applyBoundaryConditions ( const int &  level,
const int &  grid,
RealMappedGridFunction u,
RealMappedGridFunction f 
)

References BoundaryConditionParameters::a, Overture::abort(), MappedGridOperators::applyBoundaryCondition(), assert, aString, bc, bcOpt, bcParams, bcSupplied, BCTypes::boundary1, boundaryCondition, MappedGrid::boundaryCondition(), boundaryConditionData, buff, c, MappedGrid::center(), SparseRepForMGF::classify, cMG, debug, debugFile, defect(), defectMG, MappedGrid::dimension(), OgmgParameters::dirichlet, OgmgParameters::dirichletFirstGhostLineBC, OgmgParameters::dirichletSecondGhostLineBC, display(), dx, End, OgmgParameters::equation, equationToSolve, evaluateTheDefectFormula(), extendedGridIndexRange(), MappedGrid::extendedIndexRange(), OgesParameters::extrapolate, OgmgParameters::extrapolate, BoundaryConditionParameters::extrapolateCorner, SparseRepForMGF::extrapolation, fabs(), GenericMappedGridOperators::finishBoundaryConditions(), OgmgParameters::fourthOrderBoundaryConditionOption, fPrintF(), getCPU(), getCPUOpt, MappedGrid::getDeltaX(), getGhostIndex(), getGhostLineBoundaryCondition(), getIndex(), ParallelGridUtility::getLocalIndexBoundsAndBoundaryConditions(), doubleMappedGridFunction::getOperators(), getOrderOfExtrapolation(), MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, ia, MappedGrid::inverseVertexDerivative(), MappedGridOperators::isRectangular(), levelZero, BoundaryConditionParameters::lineToAssign, OgmgParameters::lowerLevelDirichletFirstGhostLineBC, OgmgParameters::lowerLevelDirichletSecondGhostLineBC, OgmgParameters::lowerLevelNeumannFirstGhostLineBC, OgmgParameters::lowerLevelNeumannSecondGhostLineBC, M123, M2, M3, mask, MappedGrid::mask(), max(), min(), BCTypes::mixed, OgesParameters::mixed, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, myid, BCTypes::neumann, OgesParameters::neumann, OgmgParameters::neumannFirstGhostLineBC, OgmgParameters::neumannSecondGhostLineBC, nr, NULL, BoundaryConditionParameters::numberOfCornerGhostLinesToAssign, MappedGrid::numberOfDimensions(), orderOfAccuracy, BoundaryConditionParameters::orderOfExtrapolation, OgmgParameters::orderOfExtrapolationForDirichlet, OgmgParameters::orderOfExtrapolationForDirichletOnLowerLevels, OgmgParameters::orderOfExtrapolationForNeumann, OgmgParameters::orderOfExtrapolationForNeumannOnLowerLevels, OV_ABORT, parameters, pDebugFile, pExactSolution, printF(), REAL_EPSILON, BoundaryConditionParameters::setCornerBoundaryCondition(), MappedGridOperators::setTwilightZoneFlow(), OgmgParameters::solveEquationWithBoundaryConditions, doubleMappedGridFunction::sparse, sPrintF(), Start, BoundaryConditionParameters::taylor2ndOrderEvenCorner, BoundaryConditionParameters::taylor4thOrderEvenCorner, MappedGrid::THEcenter, MappedGrid::THEinverseVertexDerivative, MappedGrid::THEvertex, timeForBC, timeForBCOpt, timeForBCUpdateGeometry, timeForBoundaryConditions, timeForExtrapolationBC, timeForFinishBC, timeForGeneralNeumannBC, timeForGhostBoundaryUpdate, timeForNeumannBC, timeForSetupBC, tm, GenericMappedGridOperators::twilightZoneFlow, MappedGrid::update(), useEquationOnGhostLineForDirichletBC(), OgmgParameters::useEquationToSecondOrder, OgmgParameters::useExtrapolation, useForcingAsBoundaryConditionOnAllLevels, OgmgParameters::useOptimizedVersion, OgesParameters::userDefined, OgmgParameters::useSymmetry, and OgmgParameters::useSymmetryCornerBoundaryCondition.

Referenced by applyBoundaryConditions(), applyInitialConditions(), bcTest(), coarseToFine(), smoothBoundary(), smoothJacobi(), smoothLine(), and smoothRedBlack().

int Ogmg::applyBoundaryConditions ( const int &  level,
RealCompositeGridFunction u,
RealCompositeGridFunction f 
)
int Ogmg::applyFinalConditions ( )
int Ogmg::applyInitialConditions ( )
void Ogmg::applyOgesSmoother ( const int  level,
const int  grid 
)
void Ogmg::assignBoundaryConditionCoefficients ( realMappedGridFunction coeff,
int  grid,
int  level,
int  sideToCheck = -1,
int  axisToCheck = -1 
)

References BoundaryConditionParameters::a, Overture::abort(), doubleMappedGridFunction::applyBoundaryConditionCoefficients(), assert, MappedGridOperators::assignCoefficients(), bc, bcParams, BCTypes::boundary(), boundaryCondition, MappedGrid::boundaryCondition(), boundaryConditionData, debug, debugFile, BCTypes::dirichlet, OgmgParameters::dirichlet, display(), dr, dx, equationToSolve, BCTypes::evenSymmetry, BCTypes::extrapolate, OgmgParameters::extrapolate, FOR_3D, FOR_M, fPrintF(), getBoundaryIndex(), MappedGrid::getDeltaX(), getGhostIndex(), ParallelUtility::getLocalArrayBounds(), doubleMappedGridFunction::getOperators(), getOrderOfExtrapolation(), SparseRepForMGF::ghost1, SparseRepForMGF::ghost2, BoundaryConditionParameters::ghostLineToAssign, MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, ig1, MappedGrid::inverseVertexDerivative(), MappedGrid::isRectangular(), OgesParameters::laplaceEquation, MappedGridOperators::laplacianOperator, OgmgParameters::lowerLevelNeumannFirstGhostLineBC, mask, MappedGrid::mask(), BCTypes::mixed, OgmgParameters::mixed, multigridCompositeGrid, CompositeGrid::multigridLevel, BCTypes::neumann, OgmgParameters::neumann, GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), orderOfAccuracy, BoundaryConditionParameters::orderOfExtrapolation, OV_ABORT, OV_GET_SERIAL_ARRAY_CONST, parameters, printF(), RX, SparseRepForMGF::setClassify(), SparseRepForMGF::setCoefficientIndex(), GenericMappedGridOperators::setExtrapolationCoefficients(), MappedGridOperators::setOrderOfAccuracy(), doubleMappedGridFunction::sparse, SQR, MappedGrid::THEvertexBoundaryNormal, MappedGrid::update(), useEquationOnGhostLineForDirichletBC(), useEquationOnGhostLineForNeumannBC(), OgmgParameters::useEquationToSecondOrder, and OgmgParameters::useSymmetryForNeumannOnLowerLevels.

Referenced by buildPredefinedCoefficientMatrix(), and operatorAveraging().

int Ogmg::averageCoefficients ( Index &  I1,
Index &  I2,
Index &  I3,
Index &  I1p,
Index &  I2p,
Index &  I3p,
Index &  J1,
Index &  J2,
Index &  J3,
TransferTypesEnum  option[3],
const realSerialArray cFine,
realSerialArray cCoarse,
int  ipar[] 
)
int Ogmg::bcTest ( )
int Ogmg::buildCoefficientArrays ( )

Once the coefficient matrix is known on the finest level we can automatically build the coeff matrices on coarser levels.

References BCTypes::allBoundaries, doubleCompositeGridFunction::applyBoundaryConditionCoefficients(), axis1, axis2, bcParams, buff, cMG, debug, debugFile, doubleGridCollectionFunction::destroy(), directSolver, BCTypes::dirichlet, doubleGridCollectionFunction::display(), End, equationToSolve, BCTypes::extrapolate, doubleCompositeGridFunction::finishBoundaryConditions(), doubleCompositeGridFunction::getCompositeGrid(), BoundaryConditionParameters::getCornerBC(), getCPU(), doubleCompositeGridFunction::getOperators(), BoundaryConditionParameters::ghostLineToAssign, initializeConstantCoefficients(), MappedGrid::isRectangular(), lineSmoothIsInitialized, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), numberOfExtraLevels, doubleGridCollectionFunction::numberOfMultigridLevels(), GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::ogesParameters, operatorAveraging(), operatorsForExtraLevels, orderOfAccuracy, BoundaryConditionParameters::orderOfExtrapolation, parameters, pow(), printF(), OgmgParameters::problemIsSingular, OgmgParameters::projectRightHandSideForSingularProblem, CompositeGrid::rcData, readLeftNullVector(), OgesParameters::set(), Oges::setCoefficientArray(), BoundaryConditionParameters::setCornerBoundaryCondition(), setCornerBoundaryConditions(), Oges::setGrid(), doubleCompositeGridFunction::setIsACoefficientMatrix(), doubleCompositeGridFunction::setOperators(), GenericCompositeGridOperators::setOrderOfAccuracy(), GenericCompositeGridOperators::setStencilSize(), sPrintF(), BoundaryConditionParameters::taylor2ndOrderEvenCorner, BoundaryConditionParameters::taylor4thOrderEvenCorner, OgesParameters::THEcompatibilityConstraint, timeForInitialize, CompositeGridOperators::updateToMatchGrid(), doubleCompositeGridFunction::updateToMatchGrid(), OgmgParameters::useDirectSolverForOneLevel, OgmgParameters::useDirectSolverOnCoarseGrid, OgesParameters::userDefined, and OgmgParameters::useSymmetryCornerBoundaryCondition.

Referenced by buildPredefinedEquations().

int Ogmg::buildExtraLevels ( CompositeGrid mg)

References Overture::abort(), CompositeGrid::add(), CompositeGrid::addMultigridCoarsening(), Mapping::approximateGlobalInverse, assert, aString, axis1, axis2, axis3, boundaryCondition, MappedGrid::boundaryCondition(), CompositeGrid::breakReference(), buff, buildExtraLevelsNew(), c, Ogen::canDiscretize(), canInterpolateQualityBad, canInterpolateWithExtrapolation, MappedGrid::center(), CENTER, center, CENTER10, CENTER11, CENTER12, cf, checkForBetterQualityInterpolation(), checkGrid(), checkOverlappingGrid(), OgmgParameters::coarseGridInterpolationWidth, GenericGridCollectionData::computedGeometry, GenericGridCollection::COMPUTEnothing, debug, debugFile, dimension, MappedGrid::dimension(), MappedGrid::discretizationWidth(), display(), displayMask(), displayMaskLaTeX(), EIR, eir, End, GenericGraphicsInterface::erase(), MappedGrid::extendedIndexRange(), FALSE, FOR_3, FOR_3D, fPrintF(), getBoundaryIndex(), Mapping::getBoundingBox(), getCPU(), getGhostIndex(), ApproximateGlobalInverse::getGrid(), getIndex(), getInterpolationCoordinates(), getInterpolationStencil(), ListOfIntDistributedArray::getLength(), getLocalArrayWithGhostBoundaries(), MappingRC::getMapping(), MappedGrid::getRectangularGridParameters(), gridCheckFile, MappedGrid::gridIndexRange(), gridIndexRange, gridName, GRIDSTART, halfWidth1, halfWidth2, halfWidth3, i2, ia, IA, IB, IndexBB(), indexRange, INDEXRANGE, MappedGrid::indexRange(), indexRange0, INDEXRANGE0, CompositeGridData::interpolationCoordinates, CompositeGrid::interpolationCoordinates, interpolationCoordinates, INTERPOLATIONCOORDINATES, INTERPOLATIONCOORDINATES0, INTERPOLATIONCOORDINATES1, CompositeGrid::interpolationIsAllExplicit(), CompositeGrid::interpolationIsAllImplicit(), CompositeGrid::interpolationIsImplicit, CompositeGridData::interpolationPoint, CompositeGrid::interpolationPoint, INTERPOLATIONPOINT, INTERPOLATIONPOINT0, INTERPOLATIONPOINT1, CompositeGrid::interpolationStartEndIndex, CompositeGrid::interpolationWidth, CompositeGridData::interpoleeGrid, CompositeGrid::interpoleeGrid, interpoleeGrid, INTERPOLEEGRID, INTERPOLEEGRID0, INTERPOLEEGRID1, CompositeGridData::interpoleeLocation, CompositeGrid::interpoleeLocation, interpoleeLocation, INTERPOLEELOCATION, INTERPOLEELOCATION1, INVERSECOORDINATES, INVERSEGRID, MappedGrid::isAllCellCentered(), MappedGrid::ISinterpolationPoint, MappedGrid::isPeriodic(), MappedGrid::isRectangular(), MappedGrid::mapping(), markGhostPoints(), mask, MappedGrid::mask(), MASK1, mask1, OgmgParameters::maximumNumberOfExtraLevels, min(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, CompositeGrid::multigridLevel, NG, NULL, GenericGridCollection::numberOfBaseGrids(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), numberOfExtraLevels, MappedGrid::numberOfGhostPoints(), GenericGridCollection::numberOfGrids(), numberOfInstances, CompositeGrid::numberOfInterpolationPoints, GenericGridCollection::numberOfMultigridLevels(), ogen(), orderOfAccuracy, parameters, pDebugFile, intMappedGridFunction::periodicUpdate(), PlotIt::plot(), pow(), printF(), ps, r, R, ListOfIntDistributedArray::reference(), ListOfFloatDistributedArray::reference(), CompositeGrid::reference(), ApproximateGlobalInverse::reinitialize(), OgmgParameters::saveGridCheckFile, sPrintF(), Start, MappedGrid::THEcenter, CompositeGrid::THEinterpolationCoordinates, CompositeGrid::THEinterpolationPoint, CompositeGrid::THEinterpoleeGrid, CompositeGrid::THEinterpoleeLocation, GridCollection::THEmask, MappedGrid::THEmask, GenericGridCollection::THEmultigridLevel, MappedGrid::THEvertex, timeForBuildExtraLevels, tm, TRUE, CompositeGrid::update(), MappedGrid::update(), CompositeGrid::updateReferences(), CompositeGridData::variableInterpolationWidth, CompositeGrid::variableInterpolationWidth, variableInterpolationWidth, VARIABLEINTERPOLATIONWIDTH, VARIABLEINTERPOLATIONWIDTH1, X, and x.

int Ogmg::buildExtraLevelsNew ( CompositeGrid mg)

References Overture::abort(), CompositeGrid::add(), CompositeGrid::addMultigridCoarsening(), adjustSizeMacro, assert, LoadBalancer::assignWorkLoads(), aString, axis1, axis2, axis3, boundaryCondition, MappedGrid::boundaryCondition(), boundingBox, CompositeGrid::breakReference(), buff, c, Ogen::canDiscretize(), CanInterpolate::canInterpolate(), canInterpolateQuality1, canInterpolateQuality2, canInterpolateQuality3, canNotInterpolate, MappedGrid::center(), CENTER, center, CENTER10, CENTER11, CENTER12, cf, checkGrid(), checkOverlappingGrid(), ci, ci0, ci1, OgmgParameters::coarseGridInterpolationWidth, GenericGridCollectionData::computedGeometry, GenericGridCollection::COMPUTEnothing, CopyArray::copyArray(), debug, debugFile, LoadBalancer::determineLoadBalance(), MappedGrid::dimension(), MappedGrid::discretizationWidth(), display(), GridCollection::displayDistribution(), displayMask(), displayMaskLaTeX(), eir, End, GenericGraphicsInterface::erase(), extendedGridIndexRange(), extendedIndexRange, MappedGrid::extendedIndexRange(), fabs(), FALSE, FOR_3, FOR_3D, fPrintF(), CopyArray::getAggregateArray(), getBoundaryIndex(), getCPU(), getGhostIndex(), getIndex(), getInterpolationCoordinatesNew(), getInterpolationCoordinatesNewOld(), ListOfIntDistributedArray::getLength(), ListOfFloatDistributedArray::getLength(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), ParallelGridUtility::getLocalInterpolationData(), MappingRC::getMapping(), ParallelUtility::getMaxValue(), MappedGrid::getRectangularGridParameters(), ParallelUtility::getSum(), ParallelUtility::getSums(), gridCheckFile, GenericGridCollectionData::gridDistributionList, MappedGrid::gridIndexRange(), gridIndexRange, gridName, MappedGrid::gridSpacing(), GRIDSTART, halfWidth1, halfWidth2, halfWidth3, i2, IA, IB, ig, ig0, ig1, il, il1, IndexBB(), INDEXRANGE, MappedGrid::indexRange(), infoFile, InterpolationData::interpolationCoordinates, CompositeGridData::interpolationCoordinates, CompositeGrid::interpolationCoordinates, CompositeGridData::interpolationCoordinatesLocal, CompositeGrid::interpolationIsAllExplicit(), CompositeGrid::interpolationIsAllImplicit(), CompositeGrid::interpolationIsImplicit, CompositeGrid::interpolationOverlap, InterpolationData::interpolationPoint, CompositeGridData::interpolationPoint, CompositeGrid::interpolationPoint, CompositeGridData::interpolationPointLocal, CompositeGridData::interpolationStartEndIndex, CompositeGrid::interpolationStartEndIndex, CompositeGrid::interpolationWidth, InterpolationData::interpoleeGrid, CompositeGridData::interpoleeGrid, CompositeGrid::interpoleeGrid, CompositeGridData::interpoleeGridLocal, InterpolationData::interpoleeLocation, CompositeGridData::interpoleeLocation, CompositeGrid::interpoleeLocation, CompositeGridData::interpoleeLocationLocal, INVERSEGRID, ip, ip0, ip1, MappedGrid::isAllCellCentered(), MappedGrid::ISinterpolationPoint, MappedGrid::isPeriodic(), MappedGrid::isRectangular(), LoadBalancer::KernighanLin, OgmgParameters::loadBalancer, CompositeGridData::localInterpolationDataForAll, CompositeGridData::localInterpolationDataState, MappedGrid::mapping(), Mapping::mapS(), markGhostPoints(), mask, MappedGrid::mask(), MASK1, mask1, max(), OgmgParameters::maximumNumberOfExtraLevels, min(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, CompositeGrid::multigridLevel, GenericGridCollectionData::multigridLevelNumber, myid, NG, NULL, GenericGridCollection::numberOfBaseGrids(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), numberOfExtraLevels, MappedGrid::numberOfGhostPoints(), GenericGridCollection::numberOfGrids(), numberOfInstances, InterpolationData::numberOfInterpolationPoints, CompositeGrid::numberOfInterpolationPoints, CompositeGridData::numberOfInterpolationPointsLocal, GenericGridCollection::numberOfMultigridLevels(), ogen(), orderOfAccuracy, OV_ABORT, parameters, pDebugFile, intMappedGridFunction::periodicUpdate(), PlotIt::plot(), pow(), printF(), ps, r, R, RA, ra, REAL_MAX, ListOfIntDistributedArray::reference(), ListOfIntSerialArray::reference(), ListOfFloatDistributedArray::reference(), ListOfFloatSerialArray::reference(), CompositeGrid::reference(), OgmgParameters::saveGridCheckFile, LoadBalancer::setLoadBalancer(), CompositeGrid::specifyProcesses(), sPrintF(), SQR, Start, MappedGrid::THEboundingBox, MappedGrid::THEcenter, CompositeGrid::THEinterpolationCoordinates, CompositeGrid::THEinterpolationPoint, CompositeGrid::THEinterpoleeGrid, CompositeGrid::THEinterpoleeLocation, GridCollection::THEmask, MappedGrid::THEmask, GenericGridCollection::THEmultigridLevel, MappedGrid::THEvertex, timeForBuildExtraLevels, tm, TRUE, CompositeGrid::update(), CompositeGrid::updateReferences(), InterpolationData::variableInterpolationWidth, CompositeGridData::variableInterpolationWidth, CompositeGrid::variableInterpolationWidth, CompositeGridData::variableInterpolationWidthLocal, viw, viw1, x, and XA.

Referenced by buildExtraLevels().

int Ogmg::buildPredefinedCoefficientMatrix ( int  level,
bool  buildRectangular,
bool  buildCurvilinear 
)

Build the coefficient matrix for the predefined equations on a given level.

Parameters
buildRectangular(input) : if true build coeff matrices for curvilinear grids. If true build matrices for rectangular ONLY. This is normally only done on the coarsest level if we have to call a direct solver.
buildCurvilinear(input) if true, build coefficients for curvilinear grids.

References Overture::abort(), assert, assignBoundaryConditionCoefficients(), buff, cc, cMG, COEFFA, MappedGridOperators::coefficients(), CONC, constantCoefficients, debug, debugFile, displayCoeff(), MappedGridOperators::divergenceScalarGradient, OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, equationCoefficients, equationToSolve, fabs(), FOR_3, getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getOperators(), MappedGrid::gridIndexRange(), OgesParameters::heatEquationOperator, i2, MappedGrid::isRectangular(), OgesParameters::laplaceEquation, MappedGridOperators::laplacianOperator, mask, MappedGrid::mask(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, multiply(), NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, pow(), printF(), MappedGridOperators::setOrderOfAccuracy(), MappedGridOperators::setStencilSize(), sPrintF(), varCoeff, and OgesParameters::variableHeatEquationOperator.

Referenced by buildPredefinedEquations(), and operatorAveraging().

int Ogmg::buildPredefinedEquations ( CompositeGridOperators cgop)
int Ogmg::buildPredefinedVariableCoefficients ( RealCompositeGridFunction coeff,
const int  level 
)
int Ogmg::checkForBetterQualityInterpolation ( realSerialArray x,
int  gridI,
InterpolationQualityEnum interpolationQuality,
CompositeGrid cg0,
CompositeGrid cg1,
int  i,
int  iv[3],
int  grid,
int  l,
intSerialArray &  inverseGrid,
intSerialArray &  interpoleeGrid,
intSerialArray &  interpoleeLocation,
intSerialArray &  interpolationPoint,
intSerialArray &  variableInterpolationWidth,
realSerialArray interpolationCoordinates,
realSerialArray inverseCoordinates 
)

Check to see if a point x can interpolate from gridI with a better quality interpolation.

/param gridI (input): try interpolating from this grid. /param interpolationQuality (input/output) : on input the current quality, on output the new quality /param inverseGrid, inverseCoordinates (input/output) :

References OgmgParameters::allowExtrapolationOfInterpolationPoints, assert, canInterpolateWithExtrapolation, debug, dr, End, fabs(), getInterpolationStencil(), i2, max(), min(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), parameters, pDebugFile, r, and Start.

Referenced by buildExtraLevels().

void Ogmg::checkParameters ( )
int Ogmg::chooseBestSmoother ( )
int Ogmg::coarseGridSolverTest ( int  plotOption = 0)

References BoundaryConditionParameters::a, axis1, axis2, bcParams, MappedGrid::boundaryCondition(), MappedGrid::center(), PlotIt::contour(), Oges::debug, MappedGrid::dimension(), directSolver, OgmgParameters::dirichlet, doubleGridCollectionFunction::display(), equationCoefficients, equationToSolve, fabs(), fMG, ForBoundary, getBoundaryIndex(), doubleCompositeGridFunction::getCompositeGrid(), getGhostIndex(), Overture::getGraphicsInterface(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), Oges::getMaximumResidual(), ParallelUtility::getMaxValue(), Oges::getNumberOfIterations(), GI_TOP_LABEL, MappedGrid::gridIndexRange(), OgesParameters::heatEquationOperator, MappedGrid::isRectangular(), Oges::isSolverIterative(), Mapping::mappingName, MappedGrid::mask(), max(), OgmgParameters::mixed, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, normal, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, OV_GET_SERIAL_ARRAY, printF(), ps, psp, REAL_EPSILON, Oges::set(), GraphicsParameters::set(), Oges::solve(), MappedGrid::THEcenter, OgesParameters::THEmaximumNumberOfIterations, OgesParameters::THErelativeTolerance, MappedGrid::THEvertex, MappedGrid::THEvertexBoundaryNormal, uMG, MappedGrid::update(), MappedGrid::vertexBoundaryNormal(), and MappedGrid::vertexBoundaryNormalArray().

Referenced by main().

void Ogmg::coarseToFine ( const int &  level)
void Ogmg::coarseToFine ( const int &  level,
const int &  grid 
)
int Ogmg::coarseToFineTest ( )
void Ogmg::computeDefect ( int  level)
inline

References defect().

Referenced by main().

void Ogmg::computeDefectRatios ( int  level)
int Ogmg::computeLeftNullVector ( )

References SparseRepForMGF::boundary, c, CLASSIFY, cMG, OgmgParameters::computeAndSaveNullVector, debug, MappedGrid::dimension(), display(), doubleGridCollectionFunction::display(), FOR_3D, Oges::get(), getCPU(), getIndex(), ParallelUtility::getLocalArrayBounds(), Oges::getMaximumResidual(), Oges::getNumberOfIterations(), SparseRepForMGF::ghost1, SparseRepForMGF::ghost2, i2, Oges::initialize(), SparseRepForMGF::interior, Oges::isSolverIterative(), Integrate::leftNullVector(), leftNullVector, leftNullVectorIsComputed, mask, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, NULLVECTOR, OgmgParameters::nullVectorOption, OgmgParameters::nullVectorParameters, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), numberOfGridPoints, GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, OV_GET_SERIAL_ARRAY, OV_GET_SERIAL_ARRAY_CONST, parameters, printF(), readLeftNullVector(), OgmgParameters::readOrComputeAndSaveNullVector, REAL_EPSILON, saveLeftNullVector(), Oges::set(), Oges::setCoefficientArray(), Oges::setExtraEquationValues(), Oges::setOgesParameters(), Oges::solve(), doubleGridCollectionFunction::sparse, sPrintF(), OgesParameters::THEabsoluteTolerance, OgesParameters::THEbestIterativeSolver, OgesParameters::THEcompatibilityConstraint, OgesParameters::THEfixupRightHandSide, OgesParameters::THErelativeTolerance, OgesParameters::THEsolveForTranspose, OgesParameters::THEtolerance, Oges::updateToMatchGrid(), and OgmgParameters::useDirectSolverOnCoarseGrid.

Referenced by addAdjustmentForSingularProblem().

int Ogmg::createNullVector ( )
int Ogmg::cycle ( const int &  level,
const int &  iteration,
real maximumDefect,
const int &  numberOfCycleIterations 
)

References OgmgParameters::absoluteTolerance, addAdjustmentForSingularProblem(), assign(), buff, coarseToFine(), computeDefectRatios(), PlotIt::contour(), OgmgParameters::convergenceCriteria, OgmgParameters::cycleType, OgmgParameters::cycleTypeF, debug, debugFile, defect(), defectMaximumNorm(), defectMG, defectNorm(), defectRatio, directSolver, GenericGraphicsInterface::erase(), fineToCoarse(), fMG, fullMultigridWorkUnits, getCPU(), Oges::getNumberOfIterations(), GI_TOP_LABEL, GenericGraphicsInterface::isGraphicsWindowOpen(), Oges::isSolverIterative(), iterationCount, l2NormRightHandSide, max(), maxNorm(), OgmgParameters::meanValueForSingularProblem, OgmgParameters::minimumNumberOfInitialSmooths, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, OgmgParameters::numberOfCycles, numberOfCycles, GridCollection::numberOfDimensions(), numberOfGridPoints, OgmgParameters::numberOfIterationsOnCoarseGrid, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSmooths, orderOfAccuracy, outputResults(), parameters, pow(), printF(), OgmgParameters::problemIsSingular, ps, psp, REAL_MAX, OgmgParameters::residualConverged, OgmgParameters::residualConvergedOldWay, OgmgParameters::residualTolerance, GraphicsParameters::set(), Oges::setExtraEquationValues(), setMean(), OgmgParameters::showSmoothingRates, smooth(), Oges::solve(), sPrintF(), timeForDirectSolver, tm, totalNumberOfCoarseGridIterations, uMG, OgmgParameters::useDirectSolverOnCoarseGrid, and workUnits.

Referenced by fullMultigrid().

void Ogmg::defect ( const int &  level)
void Ogmg::defect ( const int &  level,
const int &  grid 
)
real Ogmg::defectMaximumNorm ( const int &  level,
int  approximationStride = 1 
)
real Ogmg::defectNorm ( const int &  level,
const int &  grid,
int  option = 0,
int  approximationStride = 8 
)
void Ogmg::displaySmoothers ( const aString label,
FILE *  file = stdout 
)
void Ogmg::evaluateTheDefectFormula ( const int &  level,
const int &  grid,
const realArray c,
const realArray u,
const realArray f,
realArray defect,
MappedGrid mg,
const Index &  I1,
const Index &  I2,
const Index &  I3,
const Index &  I1u,
const Index &  I2u,
const Index &  I3u,
const int  lineSmoothOption 
)
void Ogmg::fineToCoarse ( const int &  level,
bool  transferForcing = false 
)
void Ogmg::fineToCoarse ( const int &  level,
const int &  grid,
bool  transferForcing = false 
)
int Ogmg::fineToCoarseTest ( )
int Ogmg::fullMultigrid ( )
FILE* Ogmg::getCheckFile ( )
inline

References checkFile.

Referenced by main().

CompositeGrid& Ogmg::getCompositeGrid ( )
inline

References multigridCompositeGrid.

Referenced by main().

realCompositeGridFunction& Ogmg::getDefect ( )
inline
real Ogmg::getDefect ( const int &  level,
const int &  grid,
realArray f,
realArray u,
const Index &  I1,
const Index &  I2,
const Index &  I3,
realArray defect,
const int  lineSmoothOption = -1,
const int  defectOption = 0,
real defectL2Norm = bogusRealArgument1,
real defectMaxNorm = bogusRealArgument2 
)
OgmgParameters::FourthOrderBoundaryConditionEnum Ogmg::getGhostLineBoundaryCondition ( int  bc,
int  ghostLine,
int  grid,
int  level,
int &  orderOfExtrapolation,
aString bcName = NULL 
) const
FILE* Ogmg::getInfoFile ( )
inline

References infoFile.

Referenced by main().

int Ogmg::getInterpolationCoordinates ( CompositeGrid cg0,
CompositeGrid cg1,
const IntegerArray ib,
const int  grid,
const IntegerArray gridsToCheck,
realSerialArray rb,
const bool  isRectangular,
int  iv0[3],
real  dx0[3],
real  xab0[2][3],
int  iv1[3],
real  dx1[3],
real  xab1[2][3] 
)
int Ogmg::getInterpolationCoordinates ( CompositeGrid cg0,
CompositeGrid cg1,
const IntegerArray ib,
const int  grid,
const IntegerArray gridsToCheck,
realSerialArray rb,
const bool  isRectangular,
int  iv0[3],
real  dx0[3],
real  xab0[2][3],
int  iv1[3],
real  dx1[3],
real  xab1[2][3],
InterpolationData ipd 
)
int Ogmg::getInterpolationCoordinates ( CompositeGrid cg0,
CompositeGrid cg1,
int  i,
int  grid,
int  iv[],
int  jv[],
realSerialArray r,
bool  isRectangular,
int  iv0[3],
real  dx0[3],
real  xab0[2][3],
int  iv1[3],
real  dx[3],
real  xab[2][3] 
)
int Ogmg::getInterpolationCoordinatesNew ( CompositeGrid cg0,
CompositeGrid cg1,
const IntegerArray ib,
const RealArray xa,
const int  grid,
const IntegerArray gridsToCheck,
realSerialArray rb,
const bool  isRectangular,
int  iv0[3],
real  dx0[3],
real  xab0[2][3],
int  iv1[3],
real  dx1[3],
real  xab1[2][3],
InterpolationData ipd,
IntegerArray ia0,
realSerialArray donorDist 
)
int Ogmg::getInterpolationCoordinatesNewOld ( CompositeGrid cg0,
CompositeGrid cg1,
const IntegerArray ib,
const RealArray xa,
const int  grid,
const IntegerArray gridsToCheck,
realSerialArray rb,
const bool  isRectangular,
int  iv0[3],
real  dx0[3],
real  xab0[2][3],
int  iv1[3],
real  dx1[3],
real  xab1[2][3],
InterpolationData ipd 
)
Ogmg::InterpolationQualityEnum Ogmg::getInterpolationStencil ( CompositeGrid cg0,
CompositeGrid cg1,
int  i,
int  iv[3],
int  grid,
int  l,
intSerialArray &  inverseGrid,
intSerialArray &  interpoleeGrid,
intSerialArray &  interpoleeLocation,
intSerialArray &  interpolationPoint,
intSerialArray &  variableInterpolationWidth,
realSerialArray interpolationCoordinates,
realSerialArray inverseCoordinates 
)
real Ogmg::getMaximumResidual ( ) const
real Ogmg::getMean ( realCompositeGridFunction u)

Referenced by main().

int Ogmg::getNumberOfIterations ( ) const
int Ogmg::getOrderOfExtrapolation ( const int  level) const

Return the order of extrapolation to use for a given order of accuracy and level.

References levelZero, and orderOfAccuracy.

Referenced by applyBoundaryConditions(), assignBoundaryConditionCoefficients(), and operatorAveraging().

realCompositeGridFunction& Ogmg::getRhs ( )
inline

References fMG.

Referenced by main().

int Ogmg::getSingularParameter ( int  level)
void Ogmg::init ( )
int Ogmg::initializeBoundaryConditions ( realCompositeGridFunction coeff)
int Ogmg::initializeConstantCoefficients ( )
int Ogmg::interpolate ( realCompositeGridFunction u,
const int &  grid = -1,
int  level = -1 
)
real Ogmg::l2Error ( const realCompositeGridFunction u,
const realCompositeGridFunction v 
)
real Ogmg::l2Norm ( const realCompositeGridFunction e)
real Ogmg::l2Norm ( const realMappedGridFunction e)
int Ogmg::markGhostPoints ( CompositeGrid cg)
real Ogmg::maxNorm ( const realCompositeGridFunction e)
real Ogmg::maxNorm ( const realMappedGridFunction e)
int Ogmg::operatorAveraging ( RealCompositeGridFunction coeff,
const int &  level 
)
int Ogmg::operatorAveraging ( RealMappedGridFunction coeffFine,
RealMappedGridFunction coeffCoarse,
const IntegerArray coarseningRatio,
int  grid = 0,
int  level = 0 
)

References BoundaryConditionParameters::a, Overture::abort(), doubleMappedGridFunction::applyBoundaryConditionCoefficients(), assert, assignBoundaryConditionCoefficients(), MappedGridOperators::assignCoefficients(), aString, averageCoefficients(), OgmgParameters::averagingOption, axis1, axis2, axis3, bc, bcParams, BCTypes::boundary(), BCTypes::boundary1, OgmgParameters::boundaryAveragingOption, boundaryCondition, MappedGrid::boundaryCondition(), boundaryConditionData, doubleMappedGridFunction::breakReference(), buff, buildPredefinedCoefficientMatrix(), C, c, cf, MappedGridOperators::coefficients(), CopyArray::copyArray(), debug, debugFile, MappedGrid::dimension(), BCTypes::dirichlet, display(), displayCoeff(), OgmgParameters::doNotAverageCoarseCurvilinearGridEquations, OgmgParameters::doNotAverageCoarseGridEquations, E, End, OgmgParameters::equation, equationToSolve, BCTypes::evenSymmetry, BCTypes::extrapolate, OgesParameters::extrapolate, OgmgParameters::extrapolate, FOR_3, FOR_3D, ForStencil, OgmgParameters::fourthOrderBoundaryConditionOption, fPrintF(), fullWeighting, getBoundaryIndex(), getGhostIndex(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getMappedGrid(), doubleMappedGridFunction::getOperators(), getOrderOfExtrapolation(), SparseRepForMGF::ghost1, OgmgParameters::ghostLineAveragingOption, BoundaryConditionParameters::ghostLineToAssign, gridCheckFile, MappedGrid::gridIndexRange(), i2, ia, ig1, OgmgParameters::imposeDirichlet, OgmgParameters::imposeExtrapolation, OgmgParameters::imposeNeumann, IndexBB(), MappedGrid::indexRange(), MappedGrid::isPeriodic(), MappedGrid::isRectangular(), OgesParameters::laplaceEquation, MappedGridOperators::laplacianOperator, OgmgParameters::lowerLevelNeumannFirstGhostLineBC, OgmgParameters::lumpedPartialWeighting, M123CE, MappedGrid::mask(), max(), BCTypes::mixed, OgmgParameters::mixed, multigridCompositeGrid, myid, BCTypes::neumann, OgmgParameters::neumann, Mapping::notPeriodic, NULL, GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), MappedGrid::numberOfGhostPoints(), GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, BoundaryConditionParameters::orderOfExtrapolation, OgmgParameters::orderOfExtrapolationForDirichletOnLowerLevels, OV_ABORT, parameters, OgmgParameters::partialWeighting, pDebugFile, doubleMappedGridFunction::periodicUpdate(), pow(), printF(), doubleMappedGridFunction::reference(), restrictedFullWeighting, OgmgParameters::saveGridCheckFile, SparseRepForMGF::setClassify(), SparseRepForMGF::setCoefficientIndex(), GenericMappedGridOperators::setExtrapolationCoefficients(), MappedGridOperators::setOrderOfAccuracy(), MappedGridOperators::setStencilSize(), doubleMappedGridFunction::sparse, sPrintF(), Start, OgmgParameters::useDirectSolverOnCoarseGrid, useEquationOnGhostLineForDirichletBC(), useEquationOnGhostLineForNeumannBC(), OgmgParameters::useEquationToSecondOrder, OgesParameters::userDefined, OgmgParameters::useSymmetry, and OgmgParameters::useSymmetryForNeumannOnLowerLevels.

int Ogmg::outputCycleInfo ( )
int Ogmg::outputResults ( const int &  level,
const int &  iteration,
real maximumDefect,
real defectNew,
real defectOld 
)
void Ogmg::printStatistics ( FILE *  file = stdout) const

Referenced by main().

int Ogmg::readLeftNullVector ( )
int Ogmg::removeAdjustmentForSingularProblem ( int  level,
int  iteration 
)

Remove the adjustment to the right-handside for a singular problem.

==================================================================================

References alpha, dimension, F, fMG, FOR_3D, getIndex(), ParallelUtility::getLocalArrayBounds(), i2, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfComponentGrids(), OV_GET_SERIAL_ARRAY, parameters, OgmgParameters::problemIsSingular, RIGHTNULL, and rightNullVector.

real Ogmg::rightNullVectorDotU ( const int &  level,
const RealCompositeGridFunction u 
)
int Ogmg::saveLeftNullVector ( )
void Ogmg::set ( GenericGraphicsInterface ps)
void Ogmg::set ( MultigridCompositeGrid mgcg)

Supply a MultigridCompositeGrid to use.

Parameters
mgcg(input) : use this object to hold the multigrid hierarchy.

The MultigridCompositeGrid object can be used to share a multigrid hierarchy amongst different applications and means that the coarse grid levels need only be generated once.

int Ogmg::setBoundaryConditions ( const IntegerArray boundaryConditions,
const RealArray bcData = Overture::nullRealArray() 
)
int Ogmg::setCoefficientArray ( realCompositeGridFunction coeff,
const IntegerArray boundaryConditions = Overture::nullIntArray(),
const RealArray bcData = Overture::nullRealArray() 
)
int Ogmg::setCornerBoundaryConditions ( BoundaryConditionParameters bcParams,
const int  level 
)
int Ogmg::setEquationAndBoundaryConditions ( OgesParameters::EquationEnum  equation_,
CompositeGridOperators op,
const IntegerArray bc_,
const RealArray bcData,
const RealArray constantCoeff = Overture::nullRealArray(),
realCompositeGridFunction variableCoeff = NULL 
)

Specify the (predefined) equation to solve. **this is not finished yet **.

Parameters
bc(0:1,0:2,numberOfComponentGrids)(input): boundary conditions, Ogmg::dirichlet, neumann or mixed.
bcData(0:1,0:1,0:2,numberOfComponentGrids)(input): For a neumann BC, a(0:1)=bcData(0:1,side,axis,grid) are the coefficients of u and du/dn : a(0)*u + a(1)*u.n
constantCoeff(input) : For equation_==heatEquationOperator we solve constantCoeff(0,grid)*I + constantCoeff(1,grid)*Laplacian

Notes: updateToMatchGrid should be called before this function. It is assumed that the extra grid levels have already been generated. When calling MG through Oges, the MultigridEquationSolver: function setEquationAndBoundaryConditions will call Ogmg::updateToMatchGrid before calling this function.

Referenced by main(), and MultigridEquationSolver::setEquationAndBoundaryConditions().

void Ogmg::setGridName ( const aString name)

/brief Set the name for the composite grid. /param name (input) : name for the composite grid (used for labels for e.g.)

Referenced by main(), and MultigridEquationSolver::MultigridEquationSolver().

void Ogmg::setMean ( realCompositeGridFunction u,
const real  meanValue,
int  level 
)
int Ogmg::setOgmgParameters ( OgmgParameters parameters)
int Ogmg::setOption ( OptionEnum  option,
bool  trueOrFalse 
)

Assign an option.

/param option==assumeSparseStencilOnRectangularGrids : assume the operator is a 5-point operator (2D) or 7-point operator (3D) on a rectangular grid.

References assumeSparseStencilForRectangularGrids, and assumeSparseStencilOnRectangularGrids.

int Ogmg::setOrderOfAccuracy ( const int &  orderOfAccuracy)
void Ogmg::setSolverName ( const aString name)

/brief Set the name of this instance of Ogmg (for info in debug files etc.) /param name (input) : name for this instnace of Ogmg.

Referenced by main(), and MultigridEquationSolver::MultigridEquationSolver().

void Ogmg::setup ( CompositeGrid mg)
real Ogmg::sizeOf ( FILE *  file = NULL) const
virtual
void Ogmg::smooth ( const int &  level,
int  numberOfSmoothingSteps,
int  cycleNumber 
)

References Overture::abort(), active, OgmgParameters::alternatingLineJacobi, alternatingLineSmooth(), OgmgParameters::alternatingLineZebra, applyOgesSmoother(), OgmgParameters::autoSubSmoothDetermination, axis1, axis2, axis3, buff, OgmgParameters::combineSmoothsWithIBS, computeDefectRatios(), debug, debugFile, defect(), defectMG, defectNorm(), defectRatio, OgmgParameters::defectRatioLowerBound, OgmgParameters::defectRatioLowerBoundLineSmooth, OgmgParameters::defectRatioUpperBound, OgmgParameters::defectRatioUpperBoundLineSmooth, display(), fabs(), fMG, fPrintF(), OgmgParameters::GaussSeidel, getCPU(), getIndex(), MappedGrid::gridIndexRange(), OgmgParameters::gridOrderingForSmooth, interpolate(), OgmgParameters::interpolateAfterSmoothing, OgmgParameters::Jacobi, l2Norm(), OgmgParameters::lineJacobiInDirection1, OgmgParameters::lineJacobiInDirection2, OgmgParameters::lineJacobiInDirection3, OgmgParameters::lineZebraInDirection1, OgmgParameters::lineZebraInDirection2, OgmgParameters::lineZebraInDirection3, max(), OgmgParameters::maximumNumberOfLineSubSmooths, OgmgParameters::maximumNumberOfSubSmooths, maxNorm(), min(), OgmgParameters::minimumNumberOfInitialSmooths, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, GenericGridCollection::numberOfComponentGrids(), numberOfCycles, OgmgParameters::numberOfIBSIterations, OgmgParameters::numberOfInterpolationLayersToSmooth, OgmgParameters::numberOfInterpolationSmoothIterations, OgmgParameters::numberOfLevelsForInterpolationSmoothing, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSubSmooths, OgmgParameters::ogesSmoother, parameters, pow(), printF(), REAL_MIN, OgmgParameters::redBlack, OgmgParameters::redBlackJacobi, OgmgParameters::showSmoothingRates, OgmgParameters::smootherType, smoothGaussSeidel(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), sPrintF(), subSmoothReferenceGrid, timeForDefect, timeForDefectInSmooth, timeForSmooth, tm, OgmgParameters::totalNumberOfSmooths, OgmgParameters::totalNumberOfSmoothsPerLevel, OgmgParameters::totalNumberOfSubSmooths, uMG, and OgmgParameters::useNewAutoSubSmooth.

Referenced by addAdjustmentForSingularProblem(), cycle(), displaySmoothers(), fullMultigrid(), and smoothTest().

void Ogmg::smoothBoundary ( int  level,
int  grid,
int  bcOption[6],
int  numberOfLayers = 1,
int  numberOfIterations = 1 
)
void Ogmg::smoothGaussSeidel ( const int &  level,
const int &  grid 
)

References smoothJacobi().

Referenced by smooth().

void Ogmg::smoothInterpolationNeighbours ( int  level,
int  grid 
)

References assert, assumeSparseStencilForRectangularGrids, bc, boundaryCondition, buff, c, cMG, constantCoeff, constantCoefficients, debug, defect(), defectMG, MappedGrid::dimension(), display(), OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, dx, eir, equationToSolve, OgmgParameters::extrapolate, fMG, general, getCPU(), MappedGrid::getDeltaX(), getInterpNeighbours, getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getOperators(), gid, MappedGrid::gridIndexRange(), MappedGrid::indexRange(), CompositeGridData::interpolationPointLocal, ip, ipn, IPN, ir, MappedGrid::isRectangular(), CompositeGridData::localInterpolationDataForAMR, CompositeGridData::localInterpolationDataState, markInterpNeighbours, mask, MappedGrid::mask(), mask2, max(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, ndipn, nipn, CompositeGridData::noLocalInterpolationData, NULL, GenericGridCollection::numberOfBaseGrids(), GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), numberOfExtraLevels, numberOfIBSArrays, OgmgParameters::numberOfInterpolationLayersToSmooth, OgmgParameters::numberOfInterpolationSmoothIterations, numberOfIterations, OgmgParameters::numberOfLevelsForInterpolationSmoothing, GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, OV_ABORT, parameters, pDebugFile, smoothJacobiOpt, sparse, sparseConstantCoefficients, sparseVariableCoefficients, sPrintF(), timeForInterpolationSmooth, tm, uMG, OgesParameters::userDefined, varCoeff, variableCoefficients, and OgesParameters::variableHeatEquationOperator.

Referenced by smooth().

void Ogmg::smoothJacobi ( const int &  level,
const int &  grid,
int  smootherChoice = 0 
)

References OgmgParameters::alternateSmoothingDirections, applyBoundaryConditions(), assert, assumeSparseStencilForRectangularGrids, bc, boundaryCondition, MappedGrid::boundaryCondition(), buff, C, c, cMG, constantCoeff, constantCoefficients, debug, debugFile, defect(), defectMG, MappedGrid::dimension(), display(), OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, dx, equationToSolve, OgmgParameters::extrapolate, fMG, fPrintF(), general, getCPU(), getDefect(), MappedGrid::getDeltaX(), getIndex(), doubleMappedGridFunction::getOperators(), MappedGrid::gridIndexRange(), ip, MappedGrid::isPeriodic(), MappedGrid::isRectangular(), mask, MappedGrid::mask(), max(), maxNorm(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, OgmgParameters::numberOfBoundaryLayersToSmooth, MappedGrid::numberOfDimensions(), numberOfExtraLevels, numberOfGridPoints, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSubSmooths, OgmgParameters::omegaGaussSeidel, OgmgParameters::omegaJacobi, orderOfAccuracy, parameters, smoothJacobiOpt, sparse, sparseConstantCoefficients, sparseVariableCoefficients, sPrintF(), timeForDefectInSmooth, timeForRelaxInSmooth, tm, OgmgParameters::totalNumberOfSubSmooths, uMG, OgmgParameters::useOptimizedVersion, OgesParameters::userDefined, varCoeff, variableCoefficients, OgesParameters::variableHeatEquationOperator, and workUnits.

Referenced by smooth(), and smoothGaussSeidel().

void Ogmg::smoothLine ( const int &  level,
const int &  grid,
const int &  direction,
bool  useZebra = true,
const int  smoothBoundarySide = -1 
)

References Overture::abort(), OgmgParameters::alternateSmoothingDirections, alternatingLineJacobi, alternatingLineSmooth(), alternatingLineZebra, applyBoundaryConditions(), assert, assumeSparseStencilForRectangularGrids, axis1, axis2, axis3, bc, bcSupplied, boundaryCondition, boundaryConditionData, buff, c, cMG, COEFF, constantCoeff, constantCoefficients, debug, debugFile, DEFECT, defect(), defectMG, delta1, delta2, direction(), display(), displayMask(), dx, End, OgmgParameters::equation, equationToSolve, TridiagonalSolver::extended, MappedGrid::extendedIndexRange(), OgesParameters::extrapolate, OgmgParameters::extrapolate, F, fabs(), TridiagonalSolver::factor(), fMG, FOR_3, FOR_3S, fPrintF(), general, getCPU(), getDefect(), MappedGrid::getDeltaX(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getOperators(), gid, MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, ia, IndexBB(), CompositeGridData::interpolationPointLocal, MappedGrid::inverseVertexDerivative(), ip, IP, isPeriodic, MappedGrid::isPeriodic(), MappedGrid::isRectangular(), OgesParameters::laplaceEquation, lineSmoothBuild, lineSmoothIsInitialized, lineSmoothRHS, lineSmoothUpdate, CompositeGridData::localInterpolationDataForAMR, CompositeGridData::localInterpolationDataState, OgmgParameters::lowerLevelNeumannSecondGhostLineBC, mask, MASK, MappedGrid::mask(), max(), min(), OgesParameters::mixed, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, myid, OgesParameters::neumann, OgmgParameters::neumannSecondGhostLineBC, CompositeGridData::noLocalInterpolationData, TridiagonalSolver::normal, Mapping::notPeriodic, GenericGridCollection::numberOfBaseGrids(), OgmgParameters::numberOfBoundaryLayersToSmooth, OgmgParameters::numberOfBoundarySmoothIterations, GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), numberOfExtraLevels, numberOfGridPoints, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSubSmooths, OgmgParameters::omegaLineJacobi, OgmgParameters::omegaLineZebra, orderOfAccuracy, OgmgParameters::orderOfExtrapolationForDirichletOnLowerLevels, OgmgParameters::orderOfExtrapolationForNeumann, OgmgParameters::orderOfExtrapolationForNeumannOnLowerLevels, OV_ABORT, OgmgParameters::parallelGhostBoundary, parameters, pDebugFile, TridiagonalSolver::periodic, printF(), REAL_EPSILON, smoothBoundary(), OgmgParameters::smootherType, TridiagonalSolver::solve(), sparse, sparseConstantCoefficients, sPrintF(), Start, timeForDefectInSmooth, timeForRelaxInSmooth, timeForTridiagonalFactorInSmooth, timeForTridiagonalSolverInSmooth, tm, OgmgParameters::totalNumberOfSubSmooths, tridiagonalSolver, U, uMG, useEquationOnGhostLineForDirichletBC(), useEquationOnGhostLineForNeumannBC(), OgmgParameters::useEquationToSecondOrder, OgmgParameters::useLocallyOptimalLineOmega, OgesParameters::userDefined, OgmgParameters::useSymmetryForDirichletOnLowerLevels, OgmgParameters::useSymmetryForNeumannOnLowerLevels, variableCoefficients, OgmgParameters::variableOmegaScaleFactor, and workUnits.

Referenced by alternatingLineSmooth(), and smooth().

void Ogmg::smoothRedBlack ( const int &  level,
const int &  grid 
)

References OgmgParameters::alternateSmoothingDirections, applyBoundaryConditions(), assumeSparseStencilForRectangularGrids, aString, bc, boundaryCondition, MappedGrid::boundaryCondition(), buff, C, c, cMG, constantCoeff, constantCoefficients, OgmgParameters::cycleTypeF, debug, debugFile, defect(), defectMG, MappedGrid::dimension(), display(), displayMask(), OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, dx, eir, equationToSolve, MappedGrid::extendedIndexRange(), OgmgParameters::extrapolate, FALSE, fMG, fPrintF(), general, getCPU(), getDefect(), MappedGrid::getDeltaX(), getIndex(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getOperators(), gid, MappedGrid::gridIndexRange(), IndexBB(), MappedGrid::isPeriodic(), MappedGrid::isRectangular(), M123, mask, MappedGrid::mask(), max(), maxNorm(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, nab, NULL, OgmgParameters::numberOfBoundaryLayersToSmooth, OgmgParameters::numberOfBoundarySmoothIterations, OgmgParameters::numberOfCycles, numberOfCycles, MappedGrid::numberOfDimensions(), numberOfExtraLevels, numberOfGridPoints, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSmooths, OgmgParameters::numberOfSubSmooths, OgmgParameters::omegaRedBlack, orderOfAccuracy, parameters, pDebugFile, printF(), OgmgParameters::redBlackJacobi, smoothBoundary(), OgmgParameters::smootherType, smoothRedBlackOpt, smRedBlack, sparse, sparseConstantCoefficients, sparseVariableCoefficients, sPrintF(), timeForDefectInSmooth, timeForRelaxInSmooth, tm, OgmgParameters::totalNumberOfSubSmooths, uMG, OgmgParameters::useLocallyOptimalOmega, OgmgParameters::useNewRedBlackSmoother, OgmgParameters::useOptimizedVersion, OgesParameters::userDefined, v, varCoeff, variableCoefficients, OgesParameters::variableHeatEquationOperator, OgmgParameters::variableOmegaScaleFactor, and workUnits.

Referenced by alternatingLineSmooth(), and smooth().

int Ogmg::smoothTest ( GenericGraphicsInterface ps,
int  plotOption 
)
int Ogmg::solve ( realCompositeGridFunction u,
realCompositeGridFunction f 
)
int Ogmg::update ( GenericGraphicsInterface gi)
int Ogmg::update ( GenericGraphicsInterface gi,
CompositeGrid cg 
)
void Ogmg::updateToMatchGrid ( CompositeGrid mg)
bool Ogmg::useEquationOnGhostLineForDirichletBC ( MappedGrid mg,
int  level 
)
bool Ogmg::useEquationOnGhostLineForNeumannBC ( MappedGrid mg,
int  level 
)

Member Data Documentation

IntegerArray Ogmg::active

Referenced by smooth().

RealArray Ogmg::alpha
bool Ogmg::assumeSparseStencilForRectangularGrids
real Ogmg::averageEffectiveConvergenceRate

Referenced by setup().

IntegerArray Ogmg::bc
bool Ogmg::bcDataSupplied

Referenced by init(), and setBoundaryConditions().

bool Ogmg::bcSupplied
real Ogmg::bogusRealArgument1 =0.
static
real Ogmg::bogusRealArgument2 =0.
static
IntegerArray Ogmg::boundaryCondition
RealArray Ogmg::boundaryConditionData
char Ogmg::buff[100]
FILE* Ogmg::checkFile

Referenced by getCheckFile(), init(), and outputResults().

RealArray Ogmg::constantCoefficients
RealArray Ogmg::cycleResults

Referenced by outputCycleInfo(), and outputResults().

int Ogmg::debug =0
static
FILE* Ogmg::debugFile
realCompositeGridFunction Ogmg::defectMG
RealArray Ogmg::defectRatio
Oges Ogmg::directSolver
RealArray Ogmg::equationCoefficients
OgesParameters::EquationEnum Ogmg::equationToSolve
real Ogmg::fullMultigridWorkUnits

Referenced by cycle(), and fullMultigrid().

FILE* Ogmg::gridCheckFile
aString Ogmg::gridName
int Ogmg::halfWidth1
int Ogmg::halfWidth2
int Ogmg::halfWidth3
FILE* Ogmg::infoFile
aString Ogmg::infoFileCaption
static

Referenced by init(), main(), and outputCycleInfo().

bool Ogmg::initialized

Referenced by setup().

Interpolate Ogmg::interp
Interpolant** Ogmg::interpolant

Referenced by init(), and setup().

IntegerArray Ogmg::interpolantWasCreated

Referenced by setup().

int ** Ogmg::ipn
IntegerArray Ogmg::isConstantCoefficients
int* Ogmg::iterationCount

Referenced by cycle(), and init().

real Ogmg::l2NormRightHandSide

Referenced by cycle().

realCompositeGridFunction* Ogmg::leftNullVector
bool Ogmg::leftNullVectorIsComputed
int Ogmg::levelZero
IntegerArray Ogmg::lineSmoothIsInitialized
real Ogmg::maximumResidual
MultigridCompositeGrid Ogmg::multigridCompositeGrid
int Ogmg::myid
int * Ogmg::ndipn
int* Ogmg::nipn
int Ogmg::numberOfCycles
int Ogmg::numberOfExtraLevels
int Ogmg::numberOfGridPoints
int Ogmg::numberOfIBSArrays
int Ogmg::numberOfInstances =0
static
int Ogmg::numberOfIterations
int Ogmg::numberOfSolves

Referenced by setup().

Oges* Ogmg::ogesSmoother

Referenced by applyOgesSmoother(), and init().

CompositeGridOperators* Ogmg::operatorsForExtraLevels
int Ogmg::orderOfAccuracy
OgmgParameters Ogmg::parameters
FILE* Ogmg::pDebugFile
OGFunction * Ogmg::pExactSolution =NULL
static
GraphicsParameters Ogmg::psp
realCompositeGridFunction Ogmg::rightNullVector
aString Ogmg::solverName
int Ogmg::subSmoothReferenceGrid

Referenced by init(), and smooth().

real Ogmg::sumTotalWorkUnits

Referenced by setup().

real Ogmg::timeForAddition

Referenced by setup().

real Ogmg::timeForDivision

Referenced by setup().

real Ogmg::timeForMultiplication

Referenced by setup().

int Ogmg::timerGranularity

Referenced by init().

int Ogmg::totalNumberOfCoarseGridIterations

Referenced by cycle(), and init().

int Ogmg::totalNumberOfCycles

Referenced by setup().

real Ogmg::totalResidualReduction

Referenced by outputResults().

real Ogmg::totalWorkUnits

Referenced by outputResults(), and setup().

TridiagonalSolver**** Ogmg::tridiagonalSolver

Referenced by setup(), and smoothLine().

bool Ogmg::useForcingAsBoundaryConditionOnAllLevels
realCompositeGridFunction* Ogmg::varCoeff
int Ogmg::width1

Referenced by setup().

int Ogmg::width2

Referenced by setup().

int Ogmg::width3

Referenced by setup().

real Ogmg::workUnit

Referenced by setup().

RealArray Ogmg::workUnits

The documentation for this class was generated from the following files: