Overture
Version 25
|
#include <ErrorEstimator.h>
Public Types | |
enum | { defaultNumberOfSmooths =-99999 } |
enum | ErrorFunctionEnum { twoSolidCircles, diagonal, cross, plus, hollowCircle } |
enum | FunctionEnum { topHat } |
Public Attributes | |
int | debug |
Protected Member Functions | |
int | interpolateAndApplyBoundaryConditions (realCompositeGridFunction &error, CompositeGridOperators &op) |
int | smooth (realGridCollectionFunction &error) |
void | openDebugFile () |
Protected Attributes | |
real | weightFirstDifference |
real | weightSecondDifference |
real | topHatCentre [3] |
real | topHatVelocity [3] |
real | topHatRadius |
real | topHatRadiusX |
real | topHatRadiusY |
real | topHatRadiusZ |
RealArray | scaleFactor |
InterpolateRefinements * | interpolateRefinements |
int | defaultNumberOfSmoothingSteps |
int | maximumNumberOfRefinementLevels |
int | myid |
FILE * | debugFile |
ErrorEstimator::ErrorEstimator | ( | InterpolateRefinements & | interpolateRefinements | ) |
ErrorEstimator::~ErrorEstimator | ( | ) |
int ErrorEstimator::computeAndSmoothErrorFunction | ( | realCompositeGridFunction & | u, |
realCompositeGridFunction & | error, | ||
int | numberOfSmooths = defaultNumberOfSmooths |
||
) |
int ErrorEstimator::computeErrorFunction | ( | realGridCollectionFunction & | error, |
ErrorFunctionEnum | type | ||
) |
References cross, diagonal, dimension, fabs(), doubleGridCollectionFunction::getGridCollection(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), hollowCircle, maximumNumberOfRefinementLevels, min(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), plus, GenericGridCollection::refinementLevelNumber, SQR, MappedGrid::THEvertex, topHatRadiusX, topHatRadiusY, twoSolidCircles, MappedGrid::update(), and x.
Referenced by computeAndSmoothErrorFunction(), and computeErrorFunction().
int ErrorEstimator::computeErrorFunction | ( | realCompositeGridFunction & | u, |
realCompositeGridFunction & | error | ||
) |
References computeErrorFunction().
int ErrorEstimator::computeErrorFunction | ( | realGridCollectionFunction & | u, |
realGridCollectionFunction & | error | ||
) |
References assign(), C, c, debug, MappedGrid::dimension(), E, fabs(), FOR_3D, doubleGridCollectionFunction::getComponentBase(), doubleGridCollectionFunction::getComponentBound(), doubleGridCollectionFunction::getGridCollection(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMaxValue(), ParallelUtility::getSum(), MappedGrid::gridIndexRange(), i2, mask, MASK, MappedGrid::mask(), max(), maximumNumberOfRefinementLevels, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), printF(), REAL_MAX, REAL_MIN, GenericGridCollection::refinementLevelNumber, scaleFactor, V, weightFirstDifference, and weightSecondDifference.
int ErrorEstimator::computeFunction | ( | realGridCollectionFunction & | u, |
FunctionEnum | type, | ||
real | t = 0. |
||
) |
References c, dimension, doubleGridCollectionFunction::getGridCollection(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), SQR, MappedGrid::THEvertex, topHat, topHatCentre, topHatRadiusX, topHatRadiusY, topHatRadiusZ, topHatVelocity, GridCollection::update(), and x.
int ErrorEstimator::displayParameters | ( | FILE * | file = stdout | ) | const |
int ErrorEstimator::get | ( | const GenericDataBase & | dir, |
const aString & | name | ||
) |
|
protected |
References BCTypes::allBoundaries, InterpolateRefinements::allLevels, GenericCompositeGridOperators::applyBoundaryCondition(), assert, debug, debugFile, Overture::defaultBoundaryConditionParameters(), doubleGridCollectionFunction::display(), BCTypes::extrapolate, BCTypes::extrapolateInterpolationNeighbours, GenericCompositeGridOperators::finishBoundaryConditions(), doubleCompositeGridFunction::getCompositeGrid(), doubleGridCollectionFunction::getGridCollection(), doubleCompositeGridFunction::getInterpolant(), Interpolant::getInterpolationOption(), GenericCompositeGridOperators::getOrderOfAccuracy(), doubleCompositeGridFunction::interpolate(), InterpolateRefinements::interpolateCoarseFromFine(), Interpolant::interpolateHiddenRefinementPoints, InterpolateRefinements::interpolateRefinementBoundaries(), interpolateRefinements, maximumNumberOfRefinementLevels, NULL, GenericGridCollection::numberOfComponentGrids(), BoundaryConditionParameters::orderOfExtrapolation, GenericGridCollection::refinementLevelNumber, and doubleCompositeGridFunction::setOperators().
Referenced by smoothErrorFunction().
|
protected |
References assert, Overture::debugFile, debugFile, NULL, and Overture::openDebugFile().
Referenced by smoothErrorFunction().
int ErrorEstimator::plotErrorPoints | ( | realGridCollectionFunction & | error, |
real | errorThreshhold, | ||
GL_GraphicsInterface & | ps, | ||
PlotStuffParameters & | psp | ||
) |
References assert, axis2, debugFile, MappedGrid::dimension(), extendedGridIndexRange(), doubleGridCollectionFunction::getGridCollection(), getIndex(), ParallelUtility::getMaxValue(), MappedGrid::getPartition(), ParallelUtility::getSum(), GI_POINT_SIZE, ia, mask, MappedGrid::mask(), max(), maximumNumberOfRefinementLevels, MPI_COMM_WORLD, MPI_Real, myid, NULL, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), GL_GraphicsInterface::plotPoints(), R, GenericGridCollection::refinementLevelNumber, GraphicsParameters::set(), MappedGrid::THEmask, MappedGrid::update(), MappedGrid::vertex(), and x.
int ErrorEstimator::put | ( | GenericDataBase & | dir, |
const aString & | name | ||
) | const |
int ErrorEstimator::setDefaultNumberOfSmooths | ( | int | numberOfSmooths | ) |
References defaultNumberOfSmoothingSteps.
int ErrorEstimator::setMaximumNumberOfRefinementLevels | ( | int | maxLevels | ) |
Set the maximum number of refinement levels.
The error is not computed on the finest level.
References maximumNumberOfRefinementLevels.
int ErrorEstimator::setScaleFactor | ( | RealArray & | scaleFactor | ) |
References scaleFactor.
int ErrorEstimator::setTopHatParameters | ( | real | topHatCentre[3], |
real | topHatVelocity[3], | ||
real | topHatRadius, | ||
real | topHatRadiusX_ = 0. , |
||
real | topHatRadiusY_ = 0. , |
||
real | topHatRadiusZ_ = 0. |
||
) |
References topHatCentre, topHatRadius, topHatRadiusX, topHatRadiusY, topHatRadiusZ, and topHatVelocity.
References weightFirstDifference, and weightSecondDifference.
|
protected |
References MappedGrid::dimension(), E, E2, FOR_3D, doubleGridCollectionFunction::getGridCollection(), getIndex(), ParallelUtility::getLocalArrayBounds(), getLocalArrayWithGhostBoundaries(), i2, mask, MASK, MappedGrid::mask(), maximumNumberOfRefinementLevels, GenericGridCollection::numberOfComponentGrids(), GridCollection::numberOfDimensions(), and GenericGridCollection::refinementLevelNumber.
Referenced by smoothErrorFunction().
int ErrorEstimator::smoothErrorFunction | ( | realCompositeGridFunction & | error, |
int | numberOfSmooths = defaultNumberOfSmooths , |
||
CompositeGridOperators * | op = NULL |
||
) |
References Overture::abort(), debug, debugFile, defaultNumberOfSmoothingSteps, defaultNumberOfSmooths, doubleGridCollectionFunction::display(), doubleCompositeGridFunction::getOperators(), interpolateAndApplyBoundaryConditions(), NULL, openDebugFile(), printF(), smooth(), and sPrintF().
Referenced by computeAndSmoothErrorFunction().
int ErrorEstimator::update | ( | GenericGraphicsInterface & | gi | ) |
References GenericGraphicsInterface::appendToTheDefaultPrompt(), aString, c, defaultNumberOfSmoothingSteps, displayParameters(), GenericGraphicsInterface::getMenuItem(), GenericGraphicsInterface::getValues(), GenericGraphicsInterface::inputString(), maximumNumberOfRefinementLevels, printF(), scaleFactor, sPrintF(), sScanF(), GenericGraphicsInterface::stopReadingCommandFile(), GenericGraphicsInterface::unAppendTheDefaultPrompt(), weightFirstDifference, and weightSecondDifference.
int ErrorEstimator::debug |
Referenced by computeErrorFunction(), ErrorEstimator(), interpolateAndApplyBoundaryConditions(), and smoothErrorFunction().
|
protected |
Referenced by ErrorEstimator(), interpolateAndApplyBoundaryConditions(), openDebugFile(), plotErrorPoints(), and smoothErrorFunction().
|
protected |
Referenced by ErrorEstimator(), get(), setDefaultNumberOfSmooths(), smoothErrorFunction(), and update().
|
protected |
Referenced by ErrorEstimator(), and interpolateAndApplyBoundaryConditions().
|
protected |
|
protected |
Referenced by ErrorEstimator(), and plotErrorPoints().
|
protected |
Referenced by computeErrorFunction(), get(), setScaleFactor(), and update().
|
protected |
Referenced by computeFunction(), ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by computeErrorFunction(), computeFunction(), ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by computeErrorFunction(), computeFunction(), ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by computeFunction(), ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by computeFunction(), ErrorEstimator(), get(), and setTopHatParameters().
|
protected |
Referenced by computeErrorFunction(), ErrorEstimator(), get(), setWeights(), and update().
|
protected |
Referenced by computeErrorFunction(), ErrorEstimator(), get(), setWeights(), and update().