Overture
Version 25
|
#include <Ogmg.h>
Public Member Functions | |
Ogmg () | |
Ogmg (CompositeGrid &mg, GenericGraphicsInterface *ps=0) | |
~Ogmg () | |
/brief Destructor. | |
void | displaySmoothers (const aString &label, FILE *file=stdout) |
CompositeGrid & | getCompositeGrid () |
FILE * | getInfoFile () |
FILE * | getCheckFile () |
realCompositeGridFunction & | getDefect () |
void | computeDefect (int level) |
realCompositeGridFunction & | getRhs () |
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 ¶meters) |
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 () |
Static Public Attributes | |
static int | debug =0 |
static OGFunction * | pExactSolution =NULL |
static aString | infoFileCaption [5] |
static int | numberOfInstances =0 |
static real | bogusRealArgument1 =0. |
static real | bogusRealArgument2 =0. |
enum Ogmg::OptionEnum |
enum Ogmg::Timing |
Ogmg::Ogmg | ( | ) |
Referenced by main().
Ogmg::Ogmg | ( | CompositeGrid & | mg, |
GenericGraphicsInterface * | ps = 0 |
||
) |
Ogmg::~Ogmg | ( | ) |
/brief Destructor.
int Ogmg::addAdjustmentForSingularProblem | ( | int | level, |
int | iteration | ||
) |
Adjust the right-hand-side for a singular problem.
References alpha, computeLeftNullVector(), dimension, F, fMG, FOR_3D, getIndex(), ParallelUtility::getLocalArrayBounds(), getSingularParameter(), i2, leftNullVectorIsComputed, OgmgParameters::meanValueForSingularProblem, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfComponentGrids(), GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSmooths, OV_GET_SERIAL_ARRAY, parameters, OgmgParameters::problemIsSingular, OgmgParameters::projectRightHandSideForSingularProblem, RIGHTNULL, rightNullVector, rightNullVectorDotU(), smooth(), uMG, OgmgParameters::useDirectSolverOnCoarseGrid, and v.
Referenced by cycle().
void Ogmg::alternatingLineSmooth | ( | const int & | level, |
const int & | grid, | ||
bool | useZebra = true |
||
) |
References assert, axis1, axis2, axis3, multigridCompositeGrid, numberOfCycles, GridCollection::numberOfDimensions(), parameters, smoothLine(), smoothRedBlack(), and OgmgParameters::useSplitStepLineSolver.
Referenced by smooth(), and smoothLine().
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 | ( | ) |
References applyBoundaryConditions(), boundaryCondition, MappedGrid::boundaryCondition(), debug, debugFile, direction(), display(), End, OgmgParameters::extrapolate, fMG, getBoundaryIndex(), getCPU(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), MappedGrid::gridIndexRange(), MappedGrid::isPeriodic(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GridCollection::numberOfDimensions(), orderOfAccuracy, Start, timeForBC4Extrap, and uMG.
void Ogmg::applyOgesSmoother | ( | const int | level, |
const int | grid | ||
) |
References OgmgParameters::activeGrids, bcParams, cMG, debug, GenericCompositeGridOperators::finishBoundaryConditions(), fMG, Oges::get(), getCPU(), Oges::getMaximumResidual(), Oges::getNumberOfIterations(), interpolate(), mask, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, nullRange, numberOfGridPoints, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSubSmooths, ogesSmoother, OgmgParameters::ogesSmoothParameters, operatorsForExtraLevels, parameters, printF(), Oges::set(), Oges::setCoefficientArray(), Oges::setGridsToUse(), Oges::setOgesParameters(), Oges::solve(), OgesParameters::THEmaximumNumberOfIterations, OgesParameters::THEnumberOfIncompleteLULevels, timeForInitialize, timeForOgesSmootherInit, timeForSmooth, tm, uMG, Oges::updateToMatchGrid(), and workUnits.
Referenced by smooth().
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[] | ||
) |
References Overture::abort(), assert, averageOpt, debug, debugFile, fPrintF(), fullWeighting, FW0_1D_0, FW0_1D_1, FW0_1D_2, FW1_1D_0, FW1_1D_1, FW1_1D_2, FW2_1D_0, FW2_1D_1, FW2_1D_2, injection, INJECTION_1D_0, INJECTION_1D_1, INJECTION_1D_2, mask, max(), min(), multigridCompositeGrid, GridCollection::numberOfDimensions(), orderOfAccuracy, OV_ABORT, and restrictedFullWeighting.
Referenced by operatorAveraging().
int Ogmg::bcTest | ( | ) |
References applyBoundaryConditions(), axis1, boundaryCondition, MappedGrid::dimension(), doubleGridCollectionFunction::display(), End, OgmgParameters::equation, MappedGrid::extendedIndexRange(), fMG, getGhostIndex(), getIndex(), MappedGrid::mask(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), doubleGridCollectionFunction::numberOfGrids(), GenericGridCollection::numberOfMultigridLevels(), Start, and uMG.
Referenced by main().
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.
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 | ) |
build the predefined equations
References assert, buildCoefficientArrays(), buildPredefinedCoefficientMatrix(), cMG, doubleGridCollectionFunction::destroy(), getCPU(), initializeConstantCoefficients(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, doubleGridCollectionFunction::numberOfComponentGrids(), GridCollection::numberOfDimensions(), numberOfExtraLevels, orderOfAccuracy, parameters, pow(), doubleGridCollectionFunction::setDataAllocationOption(), doubleCompositeGridFunction::setIsACoefficientMatrix(), doubleCompositeGridFunction::setOperators(), GenericCompositeGridOperators::setOrderOfAccuracy(), GenericCompositeGridOperators::setStencilSize(), timeForBuildPredefinedEquations, timeForInitialize, tm, doubleCompositeGridFunction::updateToMatchGrid(), OgmgParameters::useDirectSolverForOneLevel, and OgmgParameters::useDirectSolverOnCoarseGrid.
int Ogmg::buildPredefinedVariableCoefficients | ( | RealCompositeGridFunction & | coeff, |
const int | level | ||
) |
References BCTypes::allBoundaries, assert, buff, debug, doubleGridCollectionFunction::display(), BCTypes::extrapolate, Interpolate::fullWeighting100, Interpolate::fullWeighting110, Interpolate::fullWeighting111, getIndex(), MappedGrid::gridIndexRange(), interp, doubleCompositeGridFunction::interpolate(), Interpolate::interpolateCoarseFromFine(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), sPrintF(), update(), and varCoeff.
Referenced by operatorAveraging().
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 | ( | ) |
Check the validity of parameters.
Not all parameter values are valid or implemented, depending on the equation being solved, order of accuracy, etc.
References OgmgParameters::dirichletFirstGhostLineBC, equationToSolve, OgmgParameters::fourthOrderBoundaryConditionOption, OgesParameters::laplaceEquation, OgmgParameters::lowerLevelDirichletSecondGhostLineBC, OgmgParameters::lowerLevelNeumannSecondGhostLineBC, OgmgParameters::neumannSecondGhostLineBC, orderOfAccuracy, parameters, printF(), OgmgParameters::useEquationForDirichletOnLowerLevels, OgmgParameters::useEquationToSecondOrder, OgmgParameters::useExtrapolation, and OgmgParameters::useSymmetryForNeumannOnLowerLevels.
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 | ) |
References applyBoundaryConditions(), buff, PlotIt::contour(), debug, debugFile, defect(), defectMG, doubleGridCollectionFunction::display(), GenericGraphicsInterface::erase(), fMG, fPrintF(), getCPU(), GI_TOP_LABEL, interpolate(), GenericGraphicsInterface::isGraphicsWindowOpen(), maxNorm(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, numberOfCycles, printF(), ps, psp, GraphicsParameters::set(), sPrintF(), timeForCoarseToFine, tm, and uMG.
Referenced by coarseToFineTest(), cycle(), and fullMultigrid().
void Ogmg::coarseToFine | ( | const int & | level, |
const int & | grid | ||
) |
References Overture::abort(), assert, axis1, axis2, axis3, cf, OgmgParameters::coarseToFineTransferWidth, getIndex(), getLocalArrayWithGhostBoundaries(), IndexBB(), MappedGrid::indexRange(), interp, Interpolate::interpolateFineFromCoarse(), mask, MappedGrid::mask(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, MappedGrid::numberOfDimensions(), orderOfAccuracy, parameters, Q2001, Q2010, Q2011, Q2100, Q2101, Q2110, Q2111, Q4001, Q4010, Q4011, Q4100, Q4101, Q4110, Q4111, uMG, and update().
int Ogmg::coarseToFineTest | ( | ) |
References aString, axis1, MappedGrid::boundaryCondition(), buff, coarseToFine(), debug, MappedGrid::dimension(), display(), doubleGridCollectionFunction::display(), End, extendedGridIndexRange(), fabs(), fMG, getBoundaryIndex(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMaxValue(), MappedGrid::gridIndexRange(), MappedGrid::mask(), max(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), printF(), sPrintF(), Start, MappedGrid::THEcenter, MappedGrid::THEvertex, uMG, CompositeGrid::update(), and useForcingAsBoundaryConditionOnAllLevels.
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 | ( | ) |
References c, debug, FOR_3D, getIndex(), ParallelUtility::getLocalArrayBounds(), ParallelUtility::getSum(), MappedGrid::gridIndexRange(), MappedGrid::I1(), i2, MappedGrid::I2(), MappedGrid::I3(), MASK, MappedGrid::mask(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, NULLVECTOR, GenericGridCollection::numberOfMultigridLevels(), OV_GET_SERIAL_ARRAY, OV_GET_SERIAL_ARRAY_CONST, printF(), rightNullVector, and doubleCompositeGridFunction::updateToMatchGrid().
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 | ) |
Referenced by applyBoundaryConditions(), coarseToFine(), computeDefect(), cycle(), defectNorm(), evaluateTheDefectFormula(), fullMultigrid(), getDefect(), main(), outputResults(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
void Ogmg::defect | ( | const int & | level, |
const int & | grid | ||
) |
real Ogmg::defectMaximumNorm | ( | const int & | level, |
int | approximationStride = 1 |
||
) |
References defectNorm(), max(), multigridCompositeGrid, and CompositeGrid::multigridLevel.
Referenced by cycle().
real Ogmg::defectNorm | ( | const int & | level, |
const int & | grid, | ||
int | option = 0 , |
||
int | approximationStride = 8 |
||
) |
References Overture::abort(), boundaryCondition, debug, defect(), defectMG, display(), MappedGrid::extendedIndexRange(), OgmgParameters::extrapolate, fMG, getCPU(), getDefect(), getIndex(), gid, ia, max(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, MappedGrid::numberOfDimensions(), orderOfAccuracy, OV_ABORT, printF(), sPrintF(), timeForDefectNorm, tm, uMG, and workUnits.
Referenced by cycle(), defectMaximumNorm(), getDefect(), and smooth().
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 | ||
) |
References Overture::abort(), assumeSparseStencilForRectangularGrids, boundaryCondition, buff, cMG, constantCoefficients, debug, debugFile, defect(), display(), OgmgParameters::extrapolate, fPrintF(), getBoundaryIndex(), doubleMappedGridFunction::getOperators(), MappedGrid::gridIndexRange(), isConstantCoefficients, M123, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, MappedGrid::numberOfDimensions(), numberOfExtraLevels, GenericGridCollection::numberOfMultigridLevels(), and sPrintF().
Referenced by applyBoundaryConditions(), and getDefect().
void Ogmg::fineToCoarse | ( | const int & | level, |
bool | transferForcing = false |
||
) |
References buff, PlotIt::contour(), debug, debugFile, defectMG, GenericGraphicsInterface::erase(), extendedGridIndexRange(), fMG, getCPU(), getIndex(), GI_TOP_LABEL, i2, interpolate(), OgmgParameters::interpolateTheDefect, GenericGraphicsInterface::isGraphicsWindowOpen(), mask, MappedGrid::mask(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, numberOfCycles, MappedGrid::numberOfDimensions(), parameters, printF(), ps, psp, GraphicsParameters::set(), sPrintF(), timeForFineToCoarse, timeForGhostBoundaryUpdate, tm, and TRUE.
Referenced by cycle(), fineToCoarseTest(), and fullMultigrid().
void Ogmg::fineToCoarse | ( | const int & | level, |
const int & | grid, | ||
bool | transferForcing = false |
||
) |
References assert, assign(), axis1, axis2, axis3, bc, bcSupplied, BOUNDARY_DEFECT_2D, BOUNDARY_DEFECT_3D, boundaryCondition, boundaryConditionData, cf, defectMG, End, OgmgParameters::equation, equationToSolve, OgesParameters::extrapolate, OgmgParameters::extrapolate, fabs(), fineToCoarseBoundaryConditions, OgmgParameters::fineToCoarseTransferWidth, fMG, ForBoundary, FULL_WEIGHTING_1D, FULL_WEIGHTING_2D, FULL_WEIGHTING_3D, Interpolate::fullWeighting100, Interpolate::fullWeighting110, Interpolate::fullWeighting111, getBoundaryIndex(), getCPU(), getGhostIndex(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), MappedGrid::gridIndexRange(), IndexBB(), MappedGrid::indexRange(), Interpolate::injection, interp, Interpolate::interpolateCoarseFromFine(), mask, MappedGrid::mask(), max(), min(), OgesParameters::mixed, CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, OgesParameters::neumann, MappedGrid::numberOfDimensions(), OV_ABORT, parameters, printF(), Start, timeForFineToCoarseBC, timeForGhostBoundaryUpdate, timeForInterpolateCoarseFromFine, tm, update(), OgmgParameters::useNewFineToCoarseBC, and OgesParameters::userDefined.
int Ogmg::fineToCoarseTest | ( | ) |
References debug, debugFile, defectMG, MappedGrid::dimension(), display(), doubleGridCollectionFunction::display(), extendedGridIndexRange(), fabs(), fineToCoarse(), fMG, fPrintF(), getCPU(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMaxValue(), i2, il, CompositeGrid::interpolationPoint, CompositeGrid::interpoleeLocation, ip, MappedGrid::mask(), max(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), CompositeGrid::numberOfInterpolationPoints, GenericGridCollection::numberOfMultigridLevels(), printF(), sPrintF(), MappedGrid::THEcenter, MappedGrid::THEvertex, timeForInterpolateCoarseFromFine, tm, uMG, CompositeGrid::update(), and CompositeGrid::variableInterpolationWidth.
Referenced by main().
int Ogmg::fullMultigrid | ( | ) |
References buff, coarseToFine(), OgmgParameters::coarseToFineTransferWidth, PlotIt::contour(), cycle(), debug, debugFile, defect(), defectMG, directSolver, GenericGraphicsInterface::erase(), fineToCoarse(), fMG, fullMultigridWorkUnits, getCPU(), GI_TOP_LABEL, GenericGraphicsInterface::isGraphicsWindowOpen(), Oges::isSolverIterative(), levelZero, maxNorm(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, GridCollection::numberOfDimensions(), OgmgParameters::numberOfMultigridLevels(), orderOfAccuracy, parameters, pow(), printF(), ps, psp, GraphicsParameters::set(), smooth(), sPrintF(), timeForFullMultigrid, tm, uMG, OgmgParameters::useDirectSolverOnCoarseGrid, and workUnits.
|
inline |
References multigridCompositeGrid.
Referenced by main().
|
inline |
References defectMG.
Referenced by defectNorm(), main(), smoothJacobi(), smoothLine(), and smoothRedBlack().
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 |
||
) |
References assert, assumeSparseStencilForRectangularGrids, c, cMG, constantCoeff, constantCoefficients, defect(), defectNorm(), defectOpt, MappedGrid::dimension(), OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, dx, equationToSolve, evaluateTheDefectFormula(), general, MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMaxValue(), doubleMappedGridFunction::getOperators(), ParallelUtility::getSum(), ia, MappedGrid::isRectangular(), mask, MappedGrid::mask(), max(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, nab, NULL, MappedGrid::numberOfDimensions(), numberOfExtraLevels, GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, parameters, sparse, sparseConstantCoefficients, sparseVariableCoefficients, OgmgParameters::useOptimizedVersion, OgesParameters::userDefined, varCoeff, variableCoefficients, and OgesParameters::variableHeatEquationOperator.
OgmgParameters::FourthOrderBoundaryConditionEnum Ogmg::getGhostLineBoundaryCondition | ( | int | bc, |
int | ghostLine, | ||
int | grid, | ||
int | level, | ||
int & | orderOfExtrapolation, | ||
aString * | bcName = NULL |
||
) | const |
References Overture::abort(), assert, OgmgParameters::equation, OgmgParameters::extrapolate, MappedGrid::isRectangular(), OgesParameters::laplaceEquation, CompositeGrid::multigridLevel, NULL, OV_ABORT, sPrintF(), OgmgParameters::useEquationToFourthOrder, OgmgParameters::useEquationToSecondOrder, OgmgParameters::useExtrapolation, OgmgParameters::useSymmetry, and OgmgParameters::useUnknown.
Referenced by applyBoundaryConditions().
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] | ||
) |
References OgmgParameters::allowExtrapolationOfInterpolationPoints, Mapping::approximateGlobalInverse, assert, axis3, Mapping::bogus, MappedGrid::boundaryCondition(), MappedGrid::center(), CENTER, center, CENTER0, CENTER00, CENTER01, CENTER02, CENTER10, CENTER11, CENTER12, debug, MappedGrid::dimension(), dr, dx, End, MappedGrid::extendedIndexRange(), fabs(), ApproximateGlobalInverse::findNearestGridPoint(), MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), MappingRC::getMapping(), MappedGrid::gridSpacing(), i2, ia, IA, IB, MappedGrid::indexRange(), CompositeGrid::interpolationCoordinates, INTERPOLATIONCOORDINATES0, CompositeGrid::interpolationPoint, INTERPOLATIONPOINT0, CompositeGrid::interpoleeGrid, INTERPOLEEGRID0, Mapping::inverseMap(), Mapping::inverseMapS(), MappedGrid::isRectangular(), MappedGrid::mapping(), max(), min(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), OV_ABORT, parameters, printF(), r, R, RB, Start, Mapping::useRobustInverse(), Mapping::usingRobustInverse(), X, x, and XR.
Referenced by buildExtraLevels().
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 | ||
) |
References OgmgParameters::allowExtrapolationOfInterpolationPoints, Mapping::approximateGlobalInverse, assert, axis3, MappedGrid::boundaryCondition(), MappedGrid::center(), CENTER, center, CENTER0, CENTER00, CENTER01, CENTER02, CENTER10, CENTER11, CENTER12, ci0, debug, MappedGrid::dimension(), dr, dx, End, MappedGrid::extendedIndexRange(), fabs(), ApproximateGlobalInverse::findNearestGridPoint(), MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), MappingRC::getMapping(), MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, IA, IB, ig0, MappedGrid::indexRange(), InterpolationData::interpolationCoordinates, CompositeGrid::interpolationCoordinates, InterpolationData::interpolationPoint, CompositeGrid::interpolationPoint, InterpolationData::interpoleeGrid, CompositeGrid::interpoleeGrid, Mapping::inverseMap(), Mapping::inverseMapS(), ip0, MappedGrid::isRectangular(), MappedGrid::mapping(), Mapping::mapS(), max(), min(), NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), OV_ABORT, parameters, printF(), r, R, RB, Start, Mapping::useRobustInverse(), Mapping::usingRobustInverse(), X, x, XC, and XR.
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] | ||
) |
References OgmgParameters::allowExtrapolationOfInterpolationPoints, assert, axis3, MappedGrid::center(), CENTER, center, CENTER00, CENTER01, CENTER02, CENTER10, CENTER11, CENTER12, debug, dr, dx, End, fabs(), i2, CompositeGrid::interpolationCoordinates, INTERPOLATIONCOORDINATES0, CompositeGrid::interpoleeGrid, max(), min(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), parameters, printF(), r, R, Start, X, x, and XR.
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 | ||
) |
References abs(), OgmgParameters::allowExtrapolationOfInterpolationPoints, assert, axis1, axis2, axis3, Mapping::bogus, MappedGrid::boundaryCondition(), canInterpolateQuality1, canInterpolateQualityBad, canInterpolateQualityVeryBad, canInterpolateWithExtrapolation, canNotInterpolate, MappedGrid::center(), center, CENTER0, CENTER00, CENTER01, CENTER02, CENTER10, CENTER11, CENTER12, cf, ci0, debug, dr, dx, End, MappedGrid::extendedIndexRange(), fabs(), MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), MappingRC::getMapping(), ParallelUtility::getMaxValue(), Mapping::getName(), MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, IA, IA0, IB, ig0, InterpolationData::interpolationCoordinates, CompositeGrid::interpolationCoordinates, InterpolationData::interpolationPoint, CompositeGrid::interpolationPoint, InterpolationData::interpoleeGrid, CompositeGrid::interpoleeGrid, Mapping::inverseMap(), Mapping::inverseMapS(), ip0, MappedGrid::isRectangular(), MappedGrid::mapping(), Mapping::mappingName, Mapping::mapS(), max(), min(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, myid, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), parameters, pDebugFile, r, R, RB, REAL_MAX, REAL_MIN, SQR, Start, Mapping::useRobustInverse(), X, x, XA, and XR.
Referenced by buildExtraLevelsNew().
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 | ||
) |
References abs(), OgmgParameters::allowExtrapolationOfInterpolationPoints, assert, axis1, axis2, axis3, Mapping::bogus, MappedGrid::boundaryCondition(), MappedGrid::center(), center, CENTER0, CENTER00, CENTER01, CENTER02, CENTER10, CENTER11, CENTER12, cf, ci0, debug, dr, dx, End, MappedGrid::extendedIndexRange(), fabs(), MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), MappingRC::getMapping(), Mapping::getName(), MappedGrid::gridIndexRange(), MappedGrid::gridSpacing(), i2, IA, IB, ig0, InterpolationData::interpolationCoordinates, CompositeGrid::interpolationCoordinates, InterpolationData::interpolationPoint, CompositeGrid::interpolationPoint, InterpolationData::interpoleeGrid, CompositeGrid::interpoleeGrid, Mapping::inverseMap(), Mapping::inverseMapS(), ip0, MappedGrid::isRectangular(), MappedGrid::mapping(), Mapping::mappingName, Mapping::mapS(), max(), min(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, myid, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), parameters, pDebugFile, r, R, RB, REAL_MIN, Start, Mapping::useRobustInverse(), X, x, XA, and XR.
Referenced by buildExtraLevelsNew().
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 | ||
) |
References Overture::abort(), assert, axis1, axis3, boundaryCondition, MappedGrid::boundaryCondition(), canInterpolateQuality1, canInterpolateQuality2, canInterpolateQuality3, canInterpolateQualityBad, canInterpolateWithExtrapolation, canNotInterpolate, debug, dr, End, extendedIndexRange, MappedGrid::extendedIndexRange(), FALSE, getLocalArrayWithGhostBoundaries(), gridSpacing, MappedGrid::gridSpacing(), i2, indexRange, MappedGrid::indexRange(), CompositeGrid::interpolationWidth, MappedGrid::isCellCentered(), MappedGrid::ISinterpolationPoint, MappedGrid::isPeriodic(), MappedGrid::mask(), MASK2, mask2, MASK2_W4B, MASK2_W4C, MASK2_W5B, MASK2_W5C, MASK2D, multigridCompositeGrid, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), pDebugFile, printF(), SQR, Start, and TRUE.
Referenced by buildExtraLevels(), and checkForBetterQualityInterpolation().
real Ogmg::getMaximumResidual | ( | ) | const |
Referenced by main(), and MultigridEquationSolver::solve().
real Ogmg::getMean | ( | realCompositeGridFunction & | u | ) |
Referenced by main().
int Ogmg::getNumberOfIterations | ( | ) | const |
Referenced by main(), and MultigridEquationSolver::solve().
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().
|
inline |
int Ogmg::getSingularParameter | ( | int | level | ) |
problems: alpha(level) = (leftNullVector,f)/(leftNullVector,rightNullVector)
References alpha, debug, dimension, F, fMG, FOR_3D, getIndex(), ParallelUtility::getLocalArrayBounds(), ParallelUtility::getSums(), i2, LEFTNULL, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfComponentGrids(), GenericGridCollection::numberOfMultigridLevels(), OV_GET_SERIAL_ARRAY, printF(), RIGHTNULL, and rightNullVector.
Referenced by addAdjustmentForSingularProblem().
void Ogmg::init | ( | ) |
References assumeSparseStencilForRectangularGrids, aString, bcDataSupplied, bcSupplied, buff, checkFile, debugFile, equationToSolve, gridCheckFile, gridName, infoFile, infoFileCaption, interpolant, ipn, iterationCount, leftNullVector, leftNullVectorIsComputed, levelZero, max(), myid, ndipn, nipn, NULL, numberOfExtraLevels, numberOfIBSArrays, numberOfInstances, numberOfThingsToTime, ogesSmoother, operatorsForExtraLevels, orderOfAccuracy, pDebugFile, ps, sPrintF(), subSmoothReferenceGrid, timerGranularity, tm, totalNumberOfCoarseGridIterations, useForcingAsBoundaryConditionOnAllLevels, OgesParameters::userDefined, v, and varCoeff.
int Ogmg::initializeBoundaryConditions | ( | realCompositeGridFunction & | coeff | ) |
References assert, axis1, boundaryCondition, MappedGrid::boundaryCondition(), c, SparseRepForMGF::classify, OgmgParameters::combination, debug, End, OgmgParameters::equation, equationToSolve, MappedGrid::extendedIndexRange(), OgmgParameters::extrapolate, SparseRepForMGF::extrapolation, getGhostIndex(), SparseRepForMGF::ghost1, multigridCompositeGrid, CompositeGrid::multigridLevel, MappedGrid::numberOfDimensions(), doubleMappedGridFunction::sparse, Start, and OgesParameters::userDefined.
int Ogmg::initializeConstantCoefficients | ( | ) |
References Overture::abort(), assert, OgmgParameters::averagingOption, c, CC, cMG, constantCoefficients, OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, OgmgParameters::doNotAverageCoarseGridEquations, dx, equationCoefficients, equationToSolve, MappedGrid::extendedIndexRange(), fabs(), FALSE, fPrintF(), MappedGrid::getDeltaX(), getIndex(), MappingRC::getName(), doubleMappedGridFunction::getOperators(), gridCheckFile, OgesParameters::heatEquationOperator, isConstantCoefficients, MappedGridOperators::isRectangular(), MappedGrid::isRectangular(), OgesParameters::laplaceEquation, MappedGrid::mapping(), Mapping::mappingName, mask, MappedGrid::mask(), max(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, myid, NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), MappedGrid::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, parameters, pow(), REAL_EPSILON, OgmgParameters::saveGridCheckFile, TRUE, OgesParameters::userDefined, and OgesParameters::variableHeatEquationOperator.
Referenced by buildCoefficientArrays(), and buildPredefinedEquations().
int Ogmg::interpolate | ( | realCompositeGridFunction & | u, |
const int & | grid = -1 , |
||
int | level = -1 |
||
) |
References OgmgParameters::decoupleCoarseGridEquations, doubleCompositeGridFunction::getCompositeGrid(), getCPU(), doubleCompositeGridFunction::getInterpolant(), Interpolant::interpolate(), doubleCompositeGridFunction::interpolate(), CompositeGrid::interpolationPoint, ip, OgmgParameters::maximumNumberOfInterpolationIterations, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), CompositeGrid::numberOfInterpolationPoints, parameters, R, Interpolant::setMaximumNumberOfIterations(), and timeForInterpolation.
Referenced by applyOgesSmoother(), coarseToFine(), fineToCoarse(), IntersectionMapping::reparameterize(), and smooth().
real Ogmg::l2Error | ( | const realCompositeGridFunction & | u, |
const realCompositeGridFunction & | v | ||
) |
References c, evaluate(), getIndex(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getSum(), gid, doubleGridCollectionFunction::gridCollection, MappedGrid::gridIndexRange(), l2ErrorOpt, mask, MappedGrid::mask(), max(), min(), GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), parameters, and OgmgParameters::useOptimizedVersion.
real Ogmg::l2Norm | ( | const realCompositeGridFunction & | e | ) |
References c, MappedGrid::dimension(), evaluate(), getIndex(), doubleGridCollectionFunction::gridCollection, MappedGrid::gridIndexRange(), l2normOpt, mask, MappedGrid::mask(), max(), GenericGridCollection::numberOfComponentGrids(), parameters, and OgmgParameters::useOptimizedVersion.
Referenced by computeDefectRatios(), outputResults(), and smooth().
real Ogmg::l2Norm | ( | const realMappedGridFunction & | e | ) |
References evaluate(), getIndex(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getMappedGrid(), ParallelUtility::getSum(), gid, MappedGrid::gridIndexRange(), l2normOpt, mask, MappedGrid::mask(), max(), min(), MappedGrid::numberOfDimensions(), parameters, and OgmgParameters::useOptimizedVersion.
int Ogmg::markGhostPoints | ( | CompositeGrid & | cg | ) |
Referenced by buildExtraLevels(), and buildExtraLevelsNew().
real Ogmg::maxNorm | ( | const realCompositeGridFunction & | e | ) |
References c, fabs(), getIndex(), getLocalArrayWithGhostBoundaries(), getMaxNormOpt, ParallelUtility::getMaxValue(), gid, doubleGridCollectionFunction::gridCollection, MappedGrid::gridIndexRange(), MappedGrid::mask(), max(), min(), GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), parameters, and OgmgParameters::useOptimizedVersion.
Referenced by coarseToFine(), cycle(), fullMultigrid(), maxNorm(), outputResults(), smooth(), smoothJacobi(), smoothRedBlack(), and smoothTest().
real Ogmg::maxNorm | ( | const realMappedGridFunction & | e | ) |
References fabs(), getIndex(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getMappedGrid(), getMaxNormOpt, ParallelUtility::getMaxValue(), gid, MappedGrid::gridIndexRange(), MappedGrid::mask(), max(), maxNorm(), min(), MappedGrid::numberOfDimensions(), parameters, and OgmgParameters::useOptimizedVersion.
int Ogmg::operatorAveraging | ( | RealCompositeGridFunction & | coeff, |
const int & | level | ||
) |
References buildPredefinedCoefficientMatrix(), buildPredefinedVariableCoefficients(), debug, OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, equationToSolve, doubleCompositeGridFunction::getCompositeGrid(), getCPU(), CompositeGrid::multigridCoarseningRatio, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericGridCollection::numberOfMultigridLevels(), parameters, printF(), timeForOperatorAveraging, tm, OgmgParameters::useDirectSolverOnCoarseGrid, OgesParameters::userDefined, and OgesParameters::variableHeatEquationOperator.
Referenced by buildCoefficientArrays().
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 | ( | ) |
Output results about the cycle convergence rates etc. in a form suitable for matlab.
References aString, OgmgParameters::autoSubSmoothDetermination, buff, cycleResults, OgmgParameters::cycleType, OgmgParameters::cycleTypeF, defectPerCycle, fPrintF(), grid0DefectPerCycle, infoFileCaption, max(), multigridCompositeGrid, myid, GenericGridCollection::numberOfComponentGrids(), OgmgParameters::numberOfCycles, numberOfCycles, numberOfGridPoints, numberOfIterations, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSmooths, OgmgParameters::outputMatlabFile, parameters, pow(), OgmgParameters::showSmoothingRates, sPrintF(), and workUnitsPerCycle.
int Ogmg::outputResults | ( | const int & | level, |
const int & | iteration, | ||
real & | maximumDefect, | ||
real & | defectNew, | ||
real & | defectOld | ||
) |
Output results for this multigrid cycle.
References checkFile, cycleResults, debug, defect(), defectMG, defectPerCycle, defectRatio, fPrintF(), getCPU(), grid0DefectPerCycle, gridName, infoFile, l2Norm(), max(), maxNorm(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, myid, GenericGridCollection::numberOfComponentGrids(), numberOfCycles, GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSubSmooths, OgmgParameters::outputMatlabFile, parameters, pow(), printF(), REAL_MIN, OgmgParameters::showSmoothingRates, timeForMiscellaneous, tm, totalResidualReduction, totalWorkUnits, workUnits, and workUnitsPerCycle.
Referenced by cycle().
void Ogmg::printStatistics | ( | FILE * | file = stdout | ) | const |
Referenced by main().
int Ogmg::readLeftNullVector | ( | ) |
References assert, debug, doubleGridCollectionFunction::display(), HDF_DataBase::get(), doubleGridCollectionFunction::get(), leftNullVector, leftNullVectorIsComputed, HDF_DataBase::mount(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, GenericDataBase::noStreamMode, NULL, OgmgParameters::nullVectorFileName, OgmgParameters::nullVectorOption, GenericGridCollection::numberOfMultigridLevels(), parameters, printF(), OgmgParameters::readOrComputeAndSaveNullVector, OgmgParameters::readOrComputeNullVector, HDF_DataBase::setMode(), sPrintF(), HDF_DataBase::unmount(), and OgmgParameters::useDirectSolverOnCoarseGrid.
Referenced by buildCoefficientArrays(), and computeLeftNullVector().
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 | ||
) |
References multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, and rightNullVector.
Referenced by addAdjustmentForSingularProblem().
int Ogmg::saveLeftNullVector | ( | ) |
References assert, debug, leftNullVector, HDF_DataBase::mount(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, GenericDataBase::normalMode, GenericDataBase::noStreamMode, NULL, OgmgParameters::nullVectorFileName, GenericGridCollection::numberOfMultigridLevels(), parameters, printF(), HDF_DataBase::put(), doubleGridCollectionFunction::put(), HDF_DataBase::setMode(), sPrintF(), HDF_DataBase::unmount(), and OgmgParameters::useDirectSolverOnCoarseGrid.
Referenced by computeLeftNullVector().
void Ogmg::set | ( | GenericGraphicsInterface * | ps | ) |
Referenced by main(), and MultigridEquationSolver::set().
void Ogmg::set | ( | MultigridCompositeGrid & | mgcg | ) |
Supply a MultigridCompositeGrid to use.
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() |
||
) |
References Overture::abort(), axis1, bc, bcDataSupplied, bcSupplied, boundaryCondition, MappedGrid::boundaryCondition(), boundaryConditionData, debug, OgmgParameters::dirichlet, End, OgmgParameters::equation, OgmgParameters::extrapolate, OgmgParameters::mixed, multigridCompositeGrid, OgmgParameters::neumann, GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), OV_ABORT, printF(), and Start.
int Ogmg::setCoefficientArray | ( | realCompositeGridFunction & | coeff, |
const IntegerArray & | boundaryConditions = Overture::nullIntArray() , |
||
const RealArray & | bcData = Overture::nullRealArray() |
||
) |
int Ogmg::setCornerBoundaryConditions | ( | BoundaryConditionParameters & | bcParams, |
const int | level | ||
) |
Set the boundary condition parameters for edges and corners.
References BoundaryConditionParameters::numberOfCornerGhostLinesToAssign, orderOfAccuracy, BoundaryConditionParameters::orderOfExtrapolation, parameters, BoundaryConditionParameters::setCornerBoundaryCondition(), BoundaryConditionParameters::taylor2ndOrderEvenCorner, BoundaryConditionParameters::taylor4thOrderEvenCorner, and OgmgParameters::useSymmetryCornerBoundaryCondition.
Referenced by buildCoefficientArrays().
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 **.
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 | ||
) |
Set the "mean" of a grid function The mean is just the sum of all points with mask!=0.
References OgmgParameters::assignMeanValueForSingularProblem, debug, dimension, extendedIndexRange, FOR_3D, getIndex(), ParallelUtility::getLocalArrayBounds(), ParallelUtility::getSums(), doubleGridCollectionFunction::gridCollection, i2, mask, MASK, max(), GenericGridCollection::numberOfComponentGrids(), OV_GET_SERIAL_ARRAY, parameters, doubleGridCollectionFunction::periodicUpdate(), printF(), and U.
Referenced by cycle().
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 | ) |
References assert, averageEffectiveConvergenceRate, debug, OgesParameters::get(), halfWidth1, halfWidth2, halfWidth3, initialized, interpolant, interpolantWasCreated, lineSmoothIsInitialized, CompositeGrid::multigridLevel, NULL, numberOfCycles, GridCollection::numberOfDimensions(), numberOfIterations, GenericGridCollection::numberOfMultigridLevels(), numberOfSolves, OgmgParameters::ogesParameters, orderOfAccuracy, parameters, printF(), OgesParameters::set(), sumTotalWorkUnits, OgesParameters::THEbestIterativeSolver, OgesParameters::THErelativeTolerance, timeForAddition, timeForDivision, timeForMultiplication, totalNumberOfCycles, totalWorkUnits, tridiagonalSolver, width1, width2, width3, workUnit, and workUnits.
Referenced by main(), and MultigridEquationSolver::sizeOf().
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 |
||
) |
References applyBoundaryConditions(), assumeSparseStencilForRectangularGrids, bc, boundaryCondition, MappedGrid::boundaryCondition(), c, cMG, constantCoeff, constantCoefficients, debug, defect(), defectMG, MappedGrid::dimension(), OgesParameters::divScalarGradHeatEquationOperator, OgesParameters::divScalarGradOperator, dx, equationToSolve, OgmgParameters::extrapolate, fMG, general, getCPU(), MappedGrid::getDeltaX(), getLocalArrayWithGhostBoundaries(), doubleMappedGridFunction::getOperators(), MappedGrid::indexRange(), ip, MappedGrid::isRectangular(), mask, MappedGrid::mask(), max(), min(), multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, nab, NULL, MappedGrid::numberOfDimensions(), numberOfExtraLevels, numberOfIterations, OgmgParameters::numberOfLevelsForBoundarySmoothing, GenericGridCollection::numberOfMultigridLevels(), orderOfAccuracy, parameters, printF(), smoothJacobiOpt, sparse, sparseConstantCoefficients, sparseVariableCoefficients, timeForBoundarySmooth, tm, uMG, OgesParameters::userDefined, varCoeff, variableCoefficients, and OgesParameters::variableHeatEquationOperator.
Referenced by smoothLine(), and smoothRedBlack().
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 | ||
) |
References aString, axis1, MappedGrid::boundaryCondition(), PlotIt::contour(), debug, debugFile, defect(), defectMG, MappedGrid::dimension(), OgmgParameters::dirichlet, display(), doubleGridCollectionFunction::display(), End, MappedGrid::extendedIndexRange(), OgmgParameters::extrapolate, fMG, getBoundaryIndex(), getGhostIndex(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), GenericGraphicsInterface::getMenuItem(), GI_TOP_LABEL, MappedGrid::mask(), max(), maxNorm(), OgmgParameters::mixed, multigridCompositeGrid, doubleCompositeGridFunction::multigridLevel, CompositeGrid::multigridLevel, OgmgParameters::neumann, GenericGridCollection::numberOfComponentGrids(), numberOfCycles, GridCollection::numberOfDimensions(), GenericGridCollection::numberOfMultigridLevels(), OgmgParameters::numberOfSmooths, OgmgParameters::numberOfSubSmooths, OV_ABORT, parameters, PlotIt::plot(), printF(), psp, GraphicsParameters::set(), smooth(), sPrintF(), Start, and uMG.
Referenced by main().
int Ogmg::solve | ( | realCompositeGridFunction & | u, |
realCompositeGridFunction & | f | ||
) |
Referenced by main(), and MultigridEquationSolver::solve().
int Ogmg::update | ( | GenericGraphicsInterface & | gi | ) |
Referenced by buildPredefinedVariableCoefficients(), coarseToFine(), fineToCoarse(), and main().
int Ogmg::update | ( | GenericGraphicsInterface & | gi, |
CompositeGrid & | cg | ||
) |
void Ogmg::updateToMatchGrid | ( | CompositeGrid & | mg | ) |
Referenced by main(), MultigridEquationSolver::setGrid(), and MultigridEquationSolver::solve().
bool Ogmg::useEquationOnGhostLineForDirichletBC | ( | MappedGrid & | mg, |
int | level | ||
) |
References equationToSolve, OgmgParameters::fourthOrderBoundaryConditionOption, MappedGrid::isRectangular(), orderOfAccuracy, parameters, OgmgParameters::useEquationForDirichletOnLowerLevels, and OgesParameters::userDefined.
Referenced by applyBoundaryConditions(), assignBoundaryConditionCoefficients(), operatorAveraging(), and smoothLine().
bool Ogmg::useEquationOnGhostLineForNeumannBC | ( | MappedGrid & | mg, |
int | level | ||
) |
References equationToSolve, OgmgParameters::fourthOrderBoundaryConditionOption, MappedGrid::isRectangular(), orderOfAccuracy, parameters, OgmgParameters::useEquationForNeumannOnLowerLevels, and OgesParameters::userDefined.
Referenced by assignBoundaryConditionCoefficients(), operatorAveraging(), and smoothLine().
IntegerArray Ogmg::active |
Referenced by smooth().
RealArray Ogmg::alpha |
Referenced by addAdjustmentForSingularProblem(), getSingularParameter(), main(), and removeAdjustmentForSingularProblem().
bool Ogmg::assumeSparseStencilForRectangularGrids |
IntegerArray Ogmg::bc |
bool Ogmg::bcDataSupplied |
Referenced by init(), and setBoundaryConditions().
BoundaryConditionParameters Ogmg::bcParams |
bool Ogmg::bcSupplied |
Referenced by applyBoundaryConditions(), fineToCoarse(), init(), setBoundaryConditions(), and smoothLine().
|
static |
|
static |
IntegerArray Ogmg::boundaryCondition |
Referenced by applyBoundaryConditions(), applyFinalConditions(), applyInitialConditions(), assignBoundaryConditionCoefficients(), bcTest(), buildExtraLevels(), buildExtraLevelsNew(), defectNorm(), evaluateTheDefectFormula(), fineToCoarse(), getInterpolationStencil(), initializeBoundaryConditions(), main(), operatorAveraging(), setBoundaryConditions(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), and smoothRedBlack().
RealArray Ogmg::boundaryConditionData |
char Ogmg::buff[100] |
Referenced by applyBoundaryConditions(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedCoefficientMatrix(), buildPredefinedVariableCoefficients(), coarseToFine(), coarseToFineTest(), cycle(), evaluateTheDefectFormula(), fineToCoarse(), fullMultigrid(), init(), main(), operatorAveraging(), outputCycleInfo(), pauseForInput(), smooth(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), and smoothRedBlack().
FILE* Ogmg::checkFile |
Referenced by getCheckFile(), init(), and outputResults().
realCompositeGridFunction Ogmg::cMG |
Referenced by applyBoundaryConditions(), applyOgesSmoother(), buildCoefficientArrays(), buildPredefinedCoefficientMatrix(), buildPredefinedEquations(), computeLeftNullVector(), evaluateTheDefectFormula(), getDefect(), initializeConstantCoefficients(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), and smoothRedBlack().
RealArray Ogmg::constantCoefficients |
RealArray Ogmg::cycleResults |
Referenced by outputCycleInfo(), and outputResults().
|
static |
Referenced by applyBoundaryConditions(), applyInitialConditions(), applyOgesSmoother(), assignBoundaryConditionCoefficients(), averageCoefficients(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedCoefficientMatrix(), buildPredefinedVariableCoefficients(), checkForBetterQualityInterpolation(), coarseToFine(), coarseToFineTest(), computeLeftNullVector(), createNullVector(), cycle(), defectNorm(), evaluateTheDefectFormula(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), getInterpolationCoordinates(), getInterpolationCoordinatesNew(), getInterpolationCoordinatesNewOld(), getInterpolationStencil(), getSingularParameter(), initializeBoundaryConditions(), OgmgParameters::initializeGridDependentParameters(), main(), operatorAveraging(), outputResults(), readLeftNullVector(), saveLeftNullVector(), setBoundaryConditions(), setMean(), setup(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), smoothTest(), OgmgParameters::update(), and OgmgParameters::updateToMatchGrid().
FILE* Ogmg::debugFile |
Referenced by applyBoundaryConditions(), applyInitialConditions(), assignBoundaryConditionCoefficients(), averageCoefficients(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedCoefficientMatrix(), coarseToFine(), cycle(), evaluateTheDefectFormula(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), init(), operatorAveraging(), smooth(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
realCompositeGridFunction Ogmg::defectMG |
Referenced by applyBoundaryConditions(), coarseToFine(), computeDefectRatios(), cycle(), defectNorm(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), getDefect(), outputResults(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
RealArray Ogmg::defectRatio |
Referenced by computeDefectRatios(), cycle(), outputResults(), and smooth().
Oges Ogmg::directSolver |
Referenced by buildCoefficientArrays(), coarseGridSolverTest(), cycle(), and fullMultigrid().
RealArray Ogmg::equationCoefficients |
Referenced by buildPredefinedCoefficientMatrix(), coarseGridSolverTest(), initializeConstantCoefficients(), and main().
OgesParameters::EquationEnum Ogmg::equationToSolve |
Referenced by applyBoundaryConditions(), assignBoundaryConditionCoefficients(), buildCoefficientArrays(), buildPredefinedCoefficientMatrix(), checkParameters(), coarseGridSolverTest(), fineToCoarse(), getDefect(), init(), initializeBoundaryConditions(), initializeConstantCoefficients(), main(), operatorAveraging(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), useEquationOnGhostLineForDirichletBC(), and useEquationOnGhostLineForNeumannBC().
realCompositeGridFunction Ogmg::fMG |
Referenced by addAdjustmentForSingularProblem(), applyInitialConditions(), applyOgesSmoother(), bcTest(), coarseGridSolverTest(), coarseToFine(), coarseToFineTest(), cycle(), defectNorm(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), getRhs(), getSingularParameter(), removeAdjustmentForSingularProblem(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
real Ogmg::fullMultigridWorkUnits |
Referenced by cycle(), and fullMultigrid().
FILE* Ogmg::gridCheckFile |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), init(), initializeConstantCoefficients(), and operatorAveraging().
aString Ogmg::gridName |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), init(), main(), and outputResults().
int Ogmg::halfWidth1 |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), and setup().
int Ogmg::halfWidth2 |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), and setup().
int Ogmg::halfWidth3 |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), and setup().
FILE* Ogmg::infoFile |
Referenced by buildExtraLevelsNew(), getInfoFile(), init(), and outputResults().
|
static |
Referenced by init(), main(), and outputCycleInfo().
bool Ogmg::initialized |
Referenced by setup().
Interpolate Ogmg::interp |
Referenced by buildPredefinedVariableCoefficients(), coarseToFine(), and fineToCoarse().
Interpolant** Ogmg::interpolant |
IntegerArray Ogmg::interpolantWasCreated |
Referenced by setup().
int ** Ogmg::ipn |
Referenced by init(), and smoothInterpolationNeighbours().
IntegerArray Ogmg::isConstantCoefficients |
Referenced by evaluateTheDefectFormula(), and initializeConstantCoefficients().
realCompositeGridFunction* Ogmg::leftNullVector |
Referenced by computeLeftNullVector(), init(), main(), readLeftNullVector(), and saveLeftNullVector().
bool Ogmg::leftNullVectorIsComputed |
Referenced by addAdjustmentForSingularProblem(), computeLeftNullVector(), init(), and readLeftNullVector().
int Ogmg::levelZero |
Referenced by applyBoundaryConditions(), fullMultigrid(), getOrderOfExtrapolation(), and init().
IntegerArray Ogmg::lineSmoothIsInitialized |
Referenced by buildCoefficientArrays(), setup(), and smoothLine().
real Ogmg::maximumResidual |
MultigridCompositeGrid Ogmg::multigridCompositeGrid |
Referenced by addAdjustmentForSingularProblem(), alternatingLineSmooth(), applyBoundaryConditions(), applyFinalConditions(), applyInitialConditions(), applyOgesSmoother(), assignBoundaryConditionCoefficients(), averageCoefficients(), bcTest(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedCoefficientMatrix(), buildPredefinedEquations(), buildPredefinedVariableCoefficients(), coarseGridSolverTest(), coarseToFine(), coarseToFineTest(), computeDefectRatios(), computeLeftNullVector(), createNullVector(), cycle(), defectMaximumNorm(), defectNorm(), displaySmoothers(), evaluateTheDefectFormula(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), getCompositeGrid(), getDefect(), getInterpolationCoordinatesNew(), getInterpolationCoordinatesNewOld(), getInterpolationStencil(), getSingularParameter(), initializeBoundaryConditions(), initializeConstantCoefficients(), operatorAveraging(), outputCycleInfo(), outputResults(), readLeftNullVector(), removeAdjustmentForSingularProblem(), rightNullVectorDotU(), saveLeftNullVector(), setBoundaryConditions(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
int Ogmg::myid |
int * Ogmg::ndipn |
Referenced by init(), and smoothInterpolationNeighbours().
int* Ogmg::nipn |
Referenced by init(), and smoothInterpolationNeighbours().
int Ogmg::numberOfCycles |
Referenced by alternatingLineSmooth(), coarseToFine(), cycle(), fineToCoarse(), outputCycleInfo(), outputResults(), setup(), smooth(), smoothRedBlack(), and smoothTest().
int Ogmg::numberOfExtraLevels |
int Ogmg::numberOfGridPoints |
Referenced by applyOgesSmoother(), computeLeftNullVector(), cycle(), outputCycleInfo(), smoothJacobi(), smoothLine(), and smoothRedBlack().
int Ogmg::numberOfIBSArrays |
Referenced by init(), and smoothInterpolationNeighbours().
|
static |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), and init().
int Ogmg::numberOfIterations |
Referenced by outputCycleInfo(), setup(), smoothBoundary(), and smoothInterpolationNeighbours().
int Ogmg::numberOfSolves |
Referenced by setup().
Oges* Ogmg::ogesSmoother |
Referenced by applyOgesSmoother(), and init().
CompositeGridOperators* Ogmg::operatorsForExtraLevels |
Referenced by applyOgesSmoother(), buildCoefficientArrays(), and init().
int Ogmg::orderOfAccuracy |
Referenced by applyBoundaryConditions(), applyFinalConditions(), applyInitialConditions(), assignBoundaryConditionCoefficients(), averageCoefficients(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedCoefficientMatrix(), buildPredefinedEquations(), checkParameters(), coarseGridSolverTest(), coarseToFine(), computeLeftNullVector(), cycle(), defectNorm(), fullMultigrid(), getDefect(), getOrderOfExtrapolation(), init(), initializeConstantCoefficients(), main(), operatorAveraging(), setCornerBoundaryConditions(), setup(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), useEquationOnGhostLineForDirichletBC(), and useEquationOnGhostLineForNeumannBC().
OgmgParameters Ogmg::parameters |
Referenced by addAdjustmentForSingularProblem(), alternatingLineSmooth(), applyBoundaryConditions(), applyOgesSmoother(), assignBoundaryConditionCoefficients(), buildCoefficientArrays(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedEquations(), checkForBetterQualityInterpolation(), checkParameters(), coarseToFine(), computeDefectRatios(), computeLeftNullVector(), cycle(), displaySmoothers(), fineToCoarse(), fullMultigrid(), getDefect(), getInterpolationCoordinates(), getInterpolationCoordinatesNew(), getInterpolationCoordinatesNewOld(), initializeConstantCoefficients(), interpolate(), l2Error(), l2Norm(), main(), maxNorm(), operatorAveraging(), outputCycleInfo(), outputResults(), readLeftNullVector(), removeAdjustmentForSingularProblem(), saveLeftNullVector(), MultigridEquationSolver::setCoefficientsAndBoundaryConditions(), setCornerBoundaryConditions(), MultigridEquationSolver::setEquationAndBoundaryConditions(), MultigridEquationSolver::setGrid(), setMean(), setup(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), smoothTest(), MultigridEquationSolver::solve(), useEquationOnGhostLineForDirichletBC(), and useEquationOnGhostLineForNeumannBC().
FILE* Ogmg::pDebugFile |
Referenced by applyBoundaryConditions(), buildExtraLevels(), buildExtraLevelsNew(), checkForBetterQualityInterpolation(), getInterpolationCoordinatesNew(), getInterpolationCoordinatesNewOld(), getInterpolationStencil(), init(), operatorAveraging(), smoothInterpolationNeighbours(), smoothLine(), and smoothRedBlack().
|
static |
Referenced by applyBoundaryConditions(), gdExact(), and main().
GenericGraphicsInterface* Ogmg::ps |
Referenced by buildExtraLevels(), buildExtraLevelsNew(), coarseGridSolverTest(), coarseToFine(), cycle(), fineToCoarse(), fullMultigrid(), init(), and main().
GraphicsParameters Ogmg::psp |
Referenced by coarseGridSolverTest(), coarseToFine(), cycle(), fineToCoarse(), fullMultigrid(), main(), and smoothTest().
realCompositeGridFunction Ogmg::rightNullVector |
aString Ogmg::solverName |
int Ogmg::timerGranularity |
Referenced by init().
real Ogmg::tm[numberOfThingsToTime] |
Referenced by applyBoundaryConditions(), applyOgesSmoother(), buildExtraLevels(), buildExtraLevelsNew(), buildPredefinedEquations(), coarseToFine(), cycle(), defectNorm(), fineToCoarse(), fineToCoarseTest(), fullMultigrid(), init(), main(), operatorAveraging(), outputResults(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), and smoothRedBlack().
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().
realCompositeGridFunction Ogmg::uMG |
Referenced by addAdjustmentForSingularProblem(), applyFinalConditions(), applyInitialConditions(), applyOgesSmoother(), bcTest(), coarseGridSolverTest(), coarseToFine(), coarseToFineTest(), cycle(), defectNorm(), fineToCoarseTest(), fullMultigrid(), smooth(), smoothBoundary(), smoothInterpolationNeighbours(), smoothJacobi(), smoothLine(), smoothRedBlack(), and smoothTest().
realCompositeGridFunction Ogmg::uOld |
bool Ogmg::useForcingAsBoundaryConditionOnAllLevels |
Referenced by applyBoundaryConditions(), coarseToFineTest(), and init().
realCompositeGridFunction* Ogmg::v |
Referenced by addAdjustmentForSingularProblem(), init(), main(), and smoothRedBlack().
realCompositeGridFunction* Ogmg::varCoeff |
int Ogmg::width1 |
Referenced by setup().
int Ogmg::width2 |
Referenced by setup().
int Ogmg::width3 |
Referenced by setup().
RealArray Ogmg::workUnits |
Referenced by applyOgesSmoother(), cycle(), defectNorm(), fullMultigrid(), outputResults(), setup(), smoothJacobi(), smoothLine(), and smoothRedBlack().