|
Overture
Version 25
|
#include <Regrid.h>

Public Types | |
| enum | GridAdditionOption { addGridsAsRefinementGrids, addGridsAsBaseGrids } |
| enum | GridAlgorithmOption { aligned, rotated } |
Public Member Functions | |
| Regrid () | |
| ~Regrid () | |
| int | getDefaultNumberOfRefinementLevels () const |
| int | getRefinementRatio () const |
| int | displayParameters (FILE *file=stdout) const |
| bool | loadBalancingIsOn () const |
| int | regrid (GridCollection &gc, GridCollection &gcNew, intGridCollectionFunction &errorMask, int refinementLevel=1, int baseLevel=-1) |
| int | regrid (GridCollection &gc, GridCollection &gcNew, realGridCollectionFunction &error, real errorThreshhold, int refinementLevel=1, int baseLevel=-1) |
| int | printStatistics (GridCollection &gc, FILE *file=NULL, int *numberOfGridPoints=NULL) |
| void | setEfficiency (real efficiency) |
| void | setIndexCoarseningFactor (int factor) |
| void | setNumberOfBufferZones (int numberOfBufferZones) |
| void | setMinimumBoxSize (int numberOfGridPoints) |
| Specify the minimum number of grid points on a refinement grid. | |
| void | setMinimumBoxWidth (int numberOfGridPoints) |
| Specify the minimum width of a box (in coarse grid cells). The actual minimum width will be width*ratio. | |
| void | setWidthOfProperNesting (int widthOfProperNesting) |
| void | setRefinementRatio (int refinementRatio) |
| void | setUseSmartBisection (bool trueOrFalse=true) |
| void | setGridAdditionOption (GridAdditionOption gridAdditionOption) |
| GridAdditionOption | getGridAdditionOption () const |
| void | setGridAlgorithmOption (GridAlgorithmOption gridAlgorithmOption) |
| void | setMaximumNumberOfSplits (int num) |
| void | setMergeBoxes (bool trueOrFalse=true) |
| void | turnOnLoadBalacing (bool trueOrFalse=true) |
| LoadBalancer & | getLoadBalancer () |
| int | update (GenericGraphicsInterface &gi) |
| int | get (const GenericDataBase &dir, const aString &name) |
| int | put (GenericDataBase &dir, const aString &name) const |
Static Public Member Functions | |
| static int | outputRefinementInfo (GridCollection &gc, const aString &gridFileName, const aString &fileName) |
Public Attributes | |
| int | debug |
Protected Types | |
| enum | CutStatus { invalidCut, holeCut, steepCut, bisectCut } |
Protected Member Functions | |
| int | buildProperNestingDomains (GridCollection &gc, int baseGrid, int refinementLevel, int baseLevel, int numberOfRefinementLevels) |
| int | buildTaggedCells (MappedGrid &mg, intMappedGridFunction &tag, const realArray &error, real errorThreshhold, bool useErrorMask, bool cellCentred=true) |
| Box | cellCenteredBox (MappedGrid &mg, int ratio=1) |
| Box | cellCenteredBaseBox (MappedGrid &mg) |
| int | findCut (int *hist, int lo, int hi, CutStatus &status) |
| int | findCutPoint (BOX &box, const intSerialArray &ia, int &cutDirection, int &cutPoint) |
| BOX | getBox (const intArray &ia) |
| BOX | buildBox (Index Iv[3]) |
| BOX | getBoundedBox (const intSerialArray &ia, const Box &boundingBox) |
| real | getEfficiency (const intSerialArray &ia, const BOX &box) |
| int | buildGrids (GridCollection &gc, GridCollection &gcNew, int baseGrid, int baseLevel, int refinementLevel, BoxList *refinementBoxList, IntegerArray **gridInfo) |
| int | regridAligned (GridCollection &gc, GridCollection &gcNew, bool useErrorFunction, realGridCollectionFunction *pError, real errorThreshhold, intGridCollectionFunction &tagCollection, int refinementLevel=1, int baseLevel=-1) |
| int | regridRotated (GridCollection &gc, GridCollection &gcNew, bool useErrorFunction, realGridCollectionFunction *pError, real errorThreshhold, intGridCollectionFunction &tagCollection, int refinementLevel=1, int baseLevel=-1) |
| int | splitBox (BOX &box, const intSerialArray &ia, BoxList &boxList, int refinementLevel) |
| int | splitBoxRotated (RotatedBox &box, ListOfRotatedBox &boxList, realArray &xa, int refinementLevel) |
| int | merge (ListOfRotatedBox &boxList) |
| int | coarsenIndexLower (int i, int dir) const |
| int | coarsenIndexUpper (int i, int dir) const |
| int | refineIndex (int i, int dir) const |
| void | setupCoarseIndexSpace (GridCollection &gc, int baseGrid, int level) |
Protected Attributes | |
| int | defaultNumberOfRefinementLevels |
| real | efficiency |
| int | refinementRatio |
| int | numberOfBufferZones |
| int | widthOfProperNesting |
| bool | useCoarsenedIndexSpace |
| int | indexCoarseningFactor |
| int | piab [6] |
| int | maximumNumberOfSplits |
| int | splitNumber |
| int | numberOfDimensions |
| int | minimumBoxSize |
| int | minimumBoxWidth |
| bool | useSmartBisection |
| bool | mergeBoxes |
| int | myid |
| bool | loadBalance |
| LoadBalancer | loadBalancer |
| GridAdditionOption | gridAdditionOption |
| GridAlgorithmOption | gridAlgorithmOption |
| BoxList * | properNestingDomain |
| BoxList * | complementOfProperNestingDomain |
| real | timeForRegrid |
| real | timeForBuildGrids |
| real | timeForBuildTaggedCells |
| real | timeForSomethingElse1 |
| real | timeForSomethingElse2 |
| real | timeForSomethingElse3 |
|
protected |
| Regrid::Regrid | ( | ) |
References addGridsAsRefinementGrids, aligned, complementOfProperNestingDomain, debug, defaultNumberOfRefinementLevels, efficiency, gridAdditionOption, gridAlgorithmOption, iab, indexCoarseningFactor, loadBalance, max(), maximumNumberOfSplits, mergeBoxes, minimumBoxSize, minimumBoxWidth, myid, NULL, numberOfBufferZones, numberOfDimensions, properNestingDomain, refinementRatio, timeForBuildGrids, timeForBuildTaggedCells, timeForRegrid, useCoarsenedIndexSpace, useSmartBisection, and widthOfProperNesting.
| Regrid::~Regrid | ( | ) |
|
protected |
References coarsenIndexLower(), and coarsenIndexUpper().
|
protected |
References GridCollection::add(), addGridsAsRefinementGrids, GridCollection::addRefinement(), assert, axis3, GenericGridCollection::baseGridNumber, MappedGrid::boundaryCondition(), debug, ReferenceCounting::decrementReferenceCount(), GridCollection::deleteRefinement(), End, extendedGridIndexRange(), getCPU(), gid, gridAdditionOption, MappedGrid::gridIndexRange(), GenericGridCollection::gridNumber, ReferenceCounting::incrementReferenceCount(), isPeriodic, MappedGrid::mapping(), Mapping::mappingName, max(), min(), myid, Mapping::notPeriodic, GenericGridCollection::numberOfComponentGrids(), numberOfDimensions, GridCollection::numberOfDimensions(), MappedGrid::numberOfGhostPoints(), GenericGridCollection::numberOfRefinementLevels(), pow(), printF(), ra, refineIndex(), GridCollection::refinementLevel, refinementRatio, ReparameterizationTransform::restriction, Mapping::setBoundaryCondition(), ReparameterizationTransform::setBounds(), Mapping::setGridDimensions(), Mapping::setName(), Mapping::setNumberOfGhostPoints(), GridCollection::setNumberOfGrids(), setupCoarseIndexSpace(), sPrintF(), Start, GenericGridCollection::THErefinementLevel, timeForBuildGrids, and GridCollection::update().
Referenced by regridAligned().
|
protected |
References GenericGridCollection::baseGridNumber, cellCenteredBaseBox(), cellCenteredBox(), complementOfProperNestingDomain, debug, GenericGridCollection::gridNumber, myid, GenericGridCollection::numberOfComponentGrids(), pow(), printF(), properNestingDomain, GridCollection::refinementLevel, refinementRatio, setupCoarseIndexSpace(), and widthOfProperNesting.
Referenced by regridAligned().
|
protected |
References assert, extendedGridIndexRange(), getCPU(), getIndex(), getLocalArrayWithGhostBoundaries(), MappedGrid::mask(), max(), min(), numberOfBufferZones, intMappedGridFunction::periodicUpdate(), and timeForBuildTaggedCells.
Referenced by regridAligned(), and regridRotated().
|
protected |
|
protected |
References MappedGrid::box(), coarsenIndexLower(), coarsenIndexUpper(), MappedGrid::numberOfDimensions(), and useCoarsenedIndexSpace.
Referenced by buildProperNestingDomains(), and regridAligned().
|
inlineprotected |
Referenced by buildBox(), cellCenteredBaseBox(), cellCenteredBox(), and regridAligned().
|
inlineprotected |
Referenced by buildBox(), cellCenteredBaseBox(), and cellCenteredBox().
| int Regrid::displayParameters | ( | FILE * | file = stdout | ) | const |
Referenced by update().
|
protected |
References abs(), bisectCut, holeCut, invalidCut, minimumBoxWidth, and steepCut.
Referenced by findCutPoint(), and splitBoxRotated().
|
protected |
References assert, debug, display(), findCut(), ParallelUtility::getSum(), printF(), and useSmartBisection.
Referenced by splitBox().
| int Regrid::get | ( | const GenericDataBase & | dir, |
| const aString & | name | ||
| ) |
References aString, defaultNumberOfRefinementLevels, efficiency, GenericDataBase::find(), GenericDataBase::get(), gridAdditionOption, gridAlgorithmOption, maximumNumberOfSplits, mergeBoxes, minimumBoxSize, numberOfBufferZones, refinementRatio, useSmartBisection, GenericDataBase::virtualConstructor(), and widthOfProperNesting.
|
protected |
References assert, bb, debug, getBox(), max(), min(), minimumBoxWidth, numberOfDimensions, and printF().
Referenced by regridAligned(), and splitBox().
|
protected |
References assert, max(), min(), numberOfDimensions, and R.
Referenced by getBoundedBox(), regridAligned(), and splitBox().
| int Regrid::getDefaultNumberOfRefinementLevels | ( | ) | const |
References defaultNumberOfRefinementLevels.
|
protected |
References ParallelUtility::getSum(), and max().
Referenced by splitBox().
| Regrid::GridAdditionOption Regrid::getGridAdditionOption | ( | ) | const |
References gridAdditionOption.
| LoadBalancer & Regrid::getLoadBalancer | ( | ) |
References loadBalancer.
Referenced by main().
| int Regrid::getRefinementRatio | ( | ) | const |
References refinementRatio.
| bool Regrid::loadBalancingIsOn | ( | ) | const |
References loadBalance.
Referenced by main().
|
protected |
References RotatedBox::centre, ListOfRotatedBox::deleteElement(), efficiency, RotatedBox::getEfficiency(), ListOfRotatedBox::getLength(), RotatedBox::intersects(), RotatedBox::numberOfDimensions, printF(), R0, ListOfRotatedBox::setElementPtr(), RotatedBox::setPoints(), and RotatedBox::xa.
Referenced by regridRotated().
|
static |
References GenericGridCollection::baseGridNumber, MappedGrid::getPartition(), MappedGrid::gridIndexRange(), max(), GenericGridCollection::numberOfComponentGrids(), GenericGridCollection::numberOfRefinementLevels(), printF(), GridCollection::refinementLevel, GenericGridCollection::refinementLevelNumber, and refinementRatio.
Referenced by InterpolateRefinements::interpolateRefinements(), main(), and PlotIt::plotGrid().
| int Regrid::printStatistics | ( | GridCollection & | gc, |
| FILE * | file = NULL, |
||
| int * | numberOfGridPoints = NULL |
||
| ) |
References GenericGridCollection::gridNumber, max(), myid, NULL, GenericGridCollection::numberOfComponentGrids(), GenericGridCollection::numberOfGrids(), GenericGridCollection::numberOfRefinementLevels(), REAL_MIN, GridCollection::refinementLevel, timeForBuildGrids, timeForBuildTaggedCells, and timeForRegrid.
Referenced by main().
| int Regrid::put | ( | GenericDataBase & | dir, |
| const aString & | name | ||
| ) | const |
|
inlineprotected |
References iab.
Referenced by buildGrids(), and regridAligned().
| int Regrid::regrid | ( | GridCollection & | gc, |
| GridCollection & | gcNew, | ||
| intGridCollectionFunction & | errorMask, | ||
| int | refinementLevel = 1, |
||
| int | baseLevel = -1 |
||
| ) |
References NULL, GridCollection::numberOfDimensions(), and regridAligned().
Referenced by main().
| int Regrid::regrid | ( | GridCollection & | gc, |
| GridCollection & | gcNew, | ||
| realGridCollectionFunction & | error, | ||
| real | errorThreshhold, | ||
| int | refinementLevel = 1, |
||
| int | baseLevel = -1 |
||
| ) |
|
protected |
References addGridsAsRefinementGrids, assert, axis2, GenericGridCollection::baseGridNumber, MappedGrid::boundaryCondition(), boundingBox, buildGrids(), buildProperNestingDomains(), buildTaggedCells(), cellCenteredBaseBox(), cellCenteredBox(), Overture::checkMemoryUsage(), coarsenIndexLower(), complementOfProperNestingDomain, debug, LoadBalancer::determineLoadBalance(), MappedGrid::dimension(), display(), End, MappedGrid::extendedIndexRange(), FOR_3D, getBoundedBox(), getBox(), getCPU(), getIndex(), getLocalArrayWithGhostBoundaries(), MappedGrid::getPartition(), ParallelUtility::getSum(), gridAdditionOption, GenericGridCollectionData::gridDistributionList, GenericGridCollection::gridNumber, i2, MappedGrid::indexRange(), loadBalance, loadBalancer, max(), min(), myid, NULL, Overture::nullRealDistributedArray(), GenericGridCollection::numberOfBaseGrids(), GenericGridCollection::numberOfComponentGrids(), numberOfDimensions, GridCollection::numberOfDimensions(), GenericGridCollection::numberOfGrids(), GenericGridCollection::numberOfRefinementLevels(), intMappedGridFunction::periodicUpdate(), printF(), properNestingDomain, R0, refineIndex(), GridCollection::refinementLevel, GenericGridCollection::refinementLevelNumber, refinementRatio, GridCollection::replaceRefinementLevels(), LoadBalancer::sequentialAssignment, GridDistribution::setGridAndRefinementLevel(), LoadBalancer::setLoadBalancer(), GridDistribution::setProcessors(), setupCoarseIndexSpace(), GridDistribution::setWorkLoadAndGridPoints(), splitBox(), splitNumber, sPrintF(), Start, GenericGridCollection::THErefinementLevel, timeForBuildGrids, timeForBuildTaggedCells, timeForRegrid, GridCollection::update(), useCoarsenedIndexSpace, and widthOfProperNesting.
Referenced by regrid().
|
protected |
References Overture::abort(), abs(), GridCollection::add(), addGridsAsRefinementGrids, assert, atan2(), axis1, axis2, axis3, RotatedBox::axisVector, GenericGridCollection::baseGridNumber, buildTaggedCells(), RotatedBox::centre, debug, ReferenceCounting::decrementReferenceCount(), GridCollection::deleteRefinement(), display(), dx, End, MappedGrid::extendedIndexRange(), getIndex(), ListOfRotatedBox::getLength(), gid, gridAdditionOption, MappedGrid::gridIndexRange(), GenericGridCollection::gridNumber, RotatedBox::halfAxesLength, ReferenceCounting::incrementReferenceCount(), max(), merge(), mergeBoxes, min(), Overture::nullRealDistributedArray(), GenericGridCollection::numberOfBaseGrids(), GenericGridCollection::numberOfComponentGrids(), numberOfDimensions, GridCollection::numberOfDimensions(), GenericGridCollection::numberOfRefinementLevels(), Pi, printF(), R0, GridCollection::refinementLevel, MatrixTransform::rotate(), Mapping::setBoundaryCondition(), Mapping::setGridDimensions(), MatrixTransform::shift(), splitBoxRotated(), SQRT, Start, GenericGridCollection::THErefinementLevel, GridCollection::update(), and MappedGrid::vertex().
Referenced by regrid().
| void Regrid::setEfficiency | ( | real | efficiency | ) |
References efficiency.
Referenced by main().
| void Regrid::setGridAdditionOption | ( | GridAdditionOption | gridAdditionOption | ) |
References gridAdditionOption.
Referenced by main().
| void Regrid::setGridAlgorithmOption | ( | GridAlgorithmOption | gridAlgorithmOption | ) |
References gridAlgorithmOption.
Referenced by main().
| void Regrid::setIndexCoarseningFactor | ( | int | factor | ) |
References indexCoarseningFactor, and useCoarsenedIndexSpace.
Referenced by update().
| void Regrid::setMaximumNumberOfSplits | ( | int | num | ) |
References maximumNumberOfSplits.
| void Regrid::setMergeBoxes | ( | bool | trueOrFalse = true | ) |
References mergeBoxes.
Referenced by main().
| void Regrid::setMinimumBoxSize | ( | int | numberOfGridPoints | ) |
Specify the minimum number of grid points on a refinement grid.
/param numberOfGridPoints: the minimum (total) number of grid points on a refinement grid
References minimumBoxSize.
Referenced by main().
| void Regrid::setMinimumBoxWidth | ( | int | width | ) |
Specify the minimum width of a box (in coarse grid cells). The actual minimum width will be width*ratio.
/param width:
References minimumBoxWidth.
| void Regrid::setNumberOfBufferZones | ( | int | numberOfBufferZones | ) |
References numberOfBufferZones, and printF().
| void Regrid::setRefinementRatio | ( | int | refinementRatio | ) |
References refinementRatio.
Referenced by main().
|
protected |
References debug, MappedGrid::extendedIndexRange(), gid, MappedGrid::gridIndexRange(), iab, indexCoarseningFactor, MappedGrid::isPeriodic(), numberOfDimensions, pow(), printF(), refinementRatio, and useCoarsenedIndexSpace.
Referenced by buildGrids(), buildProperNestingDomains(), and regridAligned().
| void Regrid::setUseSmartBisection | ( | bool | trueOrFalse = true | ) |
References useSmartBisection.
Referenced by main().
| void Regrid::setWidthOfProperNesting | ( | int | widthOfProperNesting | ) |
References printF(), and widthOfProperNesting.
|
protected |
References assert, boundingBox, debug, display(), efficiency, findCutPoint(), getBoundedBox(), getBox(), getEfficiency(), ParallelUtility::getMaxValue(), ParallelUtility::getSum(), indexCoarseningFactor, max(), maximumNumberOfSplits, minimumBoxSize, minimumBoxWidth, myid, numberOfDimensions, printF(), properNestingDomain, and splitNumber.
Referenced by regridAligned().
|
protected |
References ListOfRotatedBox::addElement(), assert, RotatedBox::axisVector, RotatedBox::centre, debug, display(), RotatedBox::display(), efficiency, equals(), evaluate(), findCut(), RotatedBox::getEfficiency(), RotatedBox::halfAxesLength, mask, max(), min(), minimumBoxSize, numberOfDimensions, RotatedBox::numberOfPoints(), printF(), RotatedBox::setPoints(), and useSmartBisection.
Referenced by regridRotated().
| void Regrid::turnOnLoadBalacing | ( | bool | trueOrFalse = true | ) |
References loadBalance.
Referenced by main().
| int Regrid::update | ( | GenericGraphicsInterface & | gi | ) |
References GenericGraphicsInterface::appendToTheDefaultPrompt(), aString, defaultNumberOfRefinementLevels, displayParameters(), efficiency, GenericGraphicsInterface::getMenuItem(), indexCoarseningFactor, GenericGraphicsInterface::inputString(), loadBalance, loadBalancer, minimumBoxSize, minimumBoxWidth, numberOfBufferZones, printF(), refinementRatio, setIndexCoarseningFactor(), setNumberOfBufferZones(), setWidthOfProperNesting(), sPrintF(), sScanF(), GenericGraphicsInterface::stopReadingCommandFile(), GenericGraphicsInterface::unAppendTheDefaultPrompt(), LoadBalancer::update(), and widthOfProperNesting.
|
protected |
Referenced by buildProperNestingDomains(), Regrid(), and regridAligned().
| int Regrid::debug |
|
protected |
Referenced by get(), getDefaultNumberOfRefinementLevels(), Regrid(), and update().
|
protected |
Referenced by get(), merge(), Regrid(), setEfficiency(), splitBox(), splitBoxRotated(), and update().
|
protected |
Referenced by buildGrids(), get(), getGridAdditionOption(), Regrid(), regridAligned(), regridRotated(), and setGridAdditionOption().
|
protected |
Referenced by get(), Regrid(), regrid(), and setGridAlgorithmOption().
|
protected |
Referenced by Regrid(), setIndexCoarseningFactor(), setupCoarseIndexSpace(), splitBox(), and update().
|
protected |
Referenced by loadBalancingIsOn(), Regrid(), regridAligned(), turnOnLoadBalacing(), and update().
|
protected |
Referenced by getLoadBalancer(), regridAligned(), and update().
|
protected |
Referenced by get(), Regrid(), setMaximumNumberOfSplits(), and splitBox().
|
protected |
Referenced by get(), Regrid(), regridRotated(), and setMergeBoxes().
|
protected |
Referenced by get(), Regrid(), setMinimumBoxSize(), splitBox(), splitBoxRotated(), and update().
|
protected |
Referenced by findCut(), getBoundedBox(), Regrid(), setMinimumBoxWidth(), splitBox(), and update().
|
protected |
Referenced by buildGrids(), buildProperNestingDomains(), printStatistics(), Regrid(), regridAligned(), and splitBox().
|
protected |
Referenced by buildTaggedCells(), get(), Regrid(), setNumberOfBufferZones(), and update().
|
protected |
Referenced by buildGrids(), getBoundedBox(), getBox(), Regrid(), regridAligned(), regridRotated(), setupCoarseIndexSpace(), splitBox(), and splitBoxRotated().
|
protected |
|
protected |
Referenced by buildProperNestingDomains(), Regrid(), regridAligned(), and splitBox().
|
protected |
|
protected |
Referenced by regridAligned(), and splitBox().
|
protected |
Referenced by buildGrids(), printStatistics(), Regrid(), and regridAligned().
|
protected |
Referenced by buildTaggedCells(), printStatistics(), Regrid(), and regridAligned().
|
protected |
Referenced by printStatistics(), Regrid(), and regridAligned().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by cellCenteredBaseBox(), cellCenteredBox(), Regrid(), regridAligned(), setIndexCoarseningFactor(), and setupCoarseIndexSpace().
|
protected |
Referenced by findCutPoint(), get(), Regrid(), setUseSmartBisection(), and splitBoxRotated().
|
protected |
Referenced by buildProperNestingDomains(), get(), Regrid(), regridAligned(), setWidthOfProperNesting(), and update().
1.8.3