Overture
Version 25
|
#include <ParallelOverlappingGridInterpolator.h>
Public Types | |
enum | ExplicitInterpolationStorageOptionEnum { precomputeAllCoefficients, precomputeSomeCoefficients, precomputeNoCoefficients } |
Public Member Functions | |
ParallelOverlappingGridInterpolator () | |
~ParallelOverlappingGridInterpolator () | |
void | turnOnResidualComputation (const bool trueOrFalse=true) |
int | getMaximumRefinementLevelToInterpolate () const |
return the maximum refinement level to interpolate | |
real | getMaximumResidual () const |
int | interpolate (realCompositeGridFunction &u, const Range &C0=nullRange, const Range &C1=nullRange, const Range &C2=nullRange) |
Interpolate a function. | |
int | interpolate (int gridToInterpolate, realCompositeGridFunction &u, const Range &C0=nullRange, const Range &C1=nullRange, const Range &C2=nullRange) |
int | interpolate (realCompositeGridFunction &u, const IntegerArray &gridsToInterpolate, const Range &C0=nullRange, const Range &C1=nullRange, const Range &C2=nullRange) |
int | interpolate (realCompositeGridFunction &u, const IntegerArray &gridsToInterpolate, const IntegerArray &gridsToInterpolateFrom, const Range &C0=nullRange, const Range &C1=nullRange, const Range &C2=nullRange) |
int | interpolate (realArray &ui, int gridToInterpolate, int interpoleeGrid, realCompositeGridFunction &u, const Range &C0=nullRange, const Range &C1=nullRange, const Range &C2=nullRange) |
int | setExplicitInterpolationStorageOption (ExplicitInterpolationStorageOptionEnum option) |
int | setMaximumRefinementLevelToInterpolate (int maxLevelToInterpolate) |
Only interpolate grids on refinement levels that are less than or equal to a given level. | |
int | setup (realCompositeGridFunction &u) |
int | setup () |
Setup routine for the parallel interpolator. | |
real | sizeOf (FILE *file=NULL) const |
int | updateToMatchGrid (CompositeGrid &cg, int refinementLevel=0) |
int | updateToMatchGrid (realCompositeGridFunction &u, int refinementLevel=0) |
int | bruteForceInterpolate (realCompositeGridFunction &u) |
real | computeError () |
int | resetSolution () |
Public Attributes | |
FILE * | debugFile |
Static Public Attributes | |
static int | debug =0 |
Protected Member Functions | |
int | initializeExplicitInterpolation () |
int | internalInterpolate (realCompositeGridFunction &u, const Range &C0, const Range &C1, const Range &C2, const IntegerArray *gridsToInterpolate=NULL, const IntegerArray *gridsToInterpolateFrom=NULL) |
Interpolate a function. | |
int | destroy () |
ParallelOverlappingGridInterpolator::ParallelOverlappingGridInterpolator | ( | ) |
References allGridsHaveLocalData, coeffWidthDimension, computeResidual, debugFile, dimension, explicitInterpolationStorageOption, gridSpacing, indexRange, interpolationCoordinates, interpolationPoint, interpoleeGrid, interpoleeLocation, isCellCentered, maximumRefinementLevelToInterpolate, maximumResidual, maxInterpolationWidth, noGridsHaveLocalData, NULL, numberOfBaseGrids, numberOfComponentGrids, numberOfDimensions, onlyAmrGridsHaveLocalData, Overture::OV_COMM, POGI_COMM, precomputeNoCoefficients, ucg, variableInterpolationWidth, and vcg.
ParallelOverlappingGridInterpolator::~ParallelOverlappingGridInterpolator | ( | ) |
int ParallelOverlappingGridInterpolator::bruteForceInterpolate | ( | realCompositeGridFunction & | u | ) |
real ParallelOverlappingGridInterpolator::computeError | ( | ) |
References fabs(), getLocalArrayWithGhostBoundaries(), max(), numberOfComponentGrids, R0, ucg, and vcg.
|
protected |
References cia, coeffa, coeffWidthDimension, SparseArray< T >::destroy(), dimension, gridSpacing, ila, indexRange, interpolationCoordinates, interpolationPoint, interpolationStartEndIndex, interpoleeGrid, interpoleeLocation, ipa, isCellCentered, maxInterpolationWidth, nila, nipa, NULL, numberOfBaseGrids, numberOfComponentGrids, numberOfDimensions, numberOfInterpolationPoints, numberOfInterpolationPointsPerDonor, SparseArray< T >::size(), ucg, variableInterpolationWidth, and vcg.
Referenced by updateToMatchGrid(), and ~ParallelOverlappingGridInterpolator().
int ParallelOverlappingGridInterpolator::getMaximumRefinementLevelToInterpolate | ( | ) | const |
return the maximum refinement level to interpolate
References maximumRefinementLevelToInterpolate.
real ParallelOverlappingGridInterpolator::getMaximumResidual | ( | ) | const |
References maximumResidual.
|
protected |
References assert, axis1, axis2, axis3, cia, ciLocal, coeffa, coeffg, coeffWidthDimension, dr, explicitInterpolationStorageOption, SparseArray< T >::get(), gridSpacing, ila, ilLocal, indexRange, ir, isCC, isCellCentered, maxInterpolationWidth, nila, NULL, numberOfComponentGrids, numberOfDimensions, numberOfInterpolationPointsPerDonor, precomputeNoCoefficients, px, q, Q11, Q12, Q21, Q22, Q32, SparseArray< T >::redim(), and Start.
Referenced by setup().
|
protected |
Interpolate a function.
This routine does the actual interpolation assuming the setup has already been done.
/u (input) : grid function to interpolate /C0,C1,C2 (input) : components to interpolate are u[grid](all,all,all,C0,C1,C2) /gridsToInterpolate_(input) : only interpolate points on grids with *gridsToInterpolate_(grid)!=0 (if non-NULL) /gridsToInterpolateFrom_(input) : only interpolate points FROM donor grids with *gridsToInterpolateFrom_(grid)!=0 (if non-NULL)
References Overture::abort(), assert, axis1, axis2, axis3, c, cf, cfs, cia, ciLocal, coeffa, computeResidual, debug, debugFile, explicitInterpolationStorageOption, fabs(), doubleGridCollectionFunction::getComponentBase(), doubleGridCollectionFunction::getComponentBound(), doubleCompositeGridFunction::getCompositeGrid(), getLocalArrayWithGhostBoundaries(), ParallelUtility::getMaxValue(), i2, il1, ila, ilLocal, INTERPOLATE_FROM_THIS_GRID, INTERPOLATE_THIS_GRID, ip0, ip1, ipa, IW5, max(), maximumResidual, maxInterpolationWidth, MPI_Real, MPI_Wtime, nila, nipa, NULL, GenericGridCollectionData::numberOfBaseGrids, numberOfComponentGrids, numberOfDimensions, numberOfInterpolationPoints, numberOfInterpolationPointsPerDonor, POGI_COMM, precomputeAllCoefficients, printF(), q20, q21, q30, q31, q32, q40, q41, q42, q43, q50, q51, q52, q53, q54, ucg, US2, and VS.
Referenced by interpolate().
int ParallelOverlappingGridInterpolator::interpolate | ( | realCompositeGridFunction & | u, |
const Range & | C0 = nullRange , |
||
const Range & | C1 = nullRange , |
||
const Range & | C2 = nullRange |
||
) |
Interpolate a function.
References doubleCompositeGridFunction::getCompositeGrid(), internalInterpolate(), NULL, and GenericGridCollectionData::numberOfBaseGrids.
Referenced by main().
int ParallelOverlappingGridInterpolator::interpolate | ( | int | gridToInterpolate, |
realCompositeGridFunction & | u, | ||
const Range & | C0 = nullRange , |
||
const Range & | C1 = nullRange , |
||
const Range & | C2 = nullRange |
||
) |
int ParallelOverlappingGridInterpolator::interpolate | ( | realCompositeGridFunction & | u, |
const IntegerArray & | gridsToInterpolate, | ||
const Range & | C0 = nullRange , |
||
const Range & | C1 = nullRange , |
||
const Range & | C2 = nullRange |
||
) |
References internalInterpolate().
int ParallelOverlappingGridInterpolator::interpolate | ( | realCompositeGridFunction & | u, |
const IntegerArray & | gridsToInterpolate, | ||
const IntegerArray & | gridsToInterpolateFrom, | ||
const Range & | C0 = nullRange , |
||
const Range & | C1 = nullRange , |
||
const Range & | C2 = nullRange |
||
) |
References internalInterpolate().
int ParallelOverlappingGridInterpolator::interpolate | ( | realArray & | ui, |
int | gridToInterpolate, | ||
int | interpoleeGrid, | ||
realCompositeGridFunction & | u, | ||
const Range & | C0 = nullRange , |
||
const Range & | C1 = nullRange , |
||
const Range & | C2 = nullRange |
||
) |
References Overture::abort(), and printF().
int ParallelOverlappingGridInterpolator::resetSolution | ( | ) |
References numberOfComponentGrids, ucg, and vcg.
int ParallelOverlappingGridInterpolator::setExplicitInterpolationStorageOption | ( | ExplicitInterpolationStorageOptionEnum | option | ) |
References explicitInterpolationStorageOption.
int ParallelOverlappingGridInterpolator::setMaximumRefinementLevelToInterpolate | ( | int | maxLevelToInterpolate | ) |
Only interpolate grids on refinement levels that are less than or equal to a given level.
This option is used by the error estimator.
References maximumRefinementLevelToInterpolate.
int ParallelOverlappingGridInterpolator::setup | ( | realCompositeGridFunction & | u | ) |
References Overture::abort(), allGridsHaveLocalData, assert, debug, dimension, display(), doubleCompositeGridFunction::getCompositeGrid(), ParallelUtility::getSum(), gridSpacing, indexRange, interpolationCoordinates, CompositeGrid::interpolationCoordinates, CompositeGridData::interpolationCoordinatesLocal, CompositeGrid::interpolationIsImplicit, interpolationPoint, CompositeGrid::interpolationPoint, CompositeGridData::interpolationPointLocal, interpolationStartEndIndex, CompositeGrid::interpolationStartEndIndex, interpoleeGrid, CompositeGrid::interpoleeGrid, CompositeGridData::interpoleeGridLocal, interpoleeLocation, CompositeGrid::interpoleeLocation, CompositeGridData::interpoleeLocationLocal, isCellCentered, CompositeGridData::localInterpolationDataForAll, CompositeGridData::localInterpolationDataForAMR, CompositeGridData::localInterpolationDataState, noGridsHaveLocalData, CompositeGridData::noLocalInterpolationData, NULL, numberOfBaseGrids, GenericGridCollection::numberOfBaseGrids(), numberOfComponentGrids, GenericGridCollection::numberOfComponentGrids(), numberOfDimensions, GridCollection::numberOfDimensions(), numberOfInterpolationPoints, CompositeGrid::numberOfInterpolationPoints, CompositeGridData::numberOfInterpolationPointsLocal, onlyAmrGridsHaveLocalData, OV_ABORT, printF(), setup(), ucg, variableInterpolationWidth, CompositeGrid::variableInterpolationWidth, CompositeGridData::variableInterpolationWidthLocal, and vcg.
Referenced by main().
int ParallelOverlappingGridInterpolator::setup | ( | ) |
Setup routine for the parallel interpolator.
References Overture::abort(), allGridsHaveLocalData, assert, Overture::checkMemoryUsage(), cia, SparseArray< T >::clear(), debug, debugFile, dimension, SparseArray< T >::get(), ParallelUtility::getSums(), i2, ila, initializeExplicitInterpolation(), interpolationCoordinates, interpolationPoint, interpolationStartEndIndex, interpoleeGrid, interpoleeLocation, ipa, max(), maxInterpolationWidth, min(), MPI_Real, MPI_Wtime, nila, nipa, noGridsHaveLocalData, nr, numberOfBaseGrids, numberOfComponentGrids, numberOfDimensions, numberOfInterpolationPoints, numberOfInterpolationPointsPerDonor, onlyAmrGridsHaveLocalData, OV_ABORT, POGI_COMM, printF(), SparseArray< T >::redim(), sPrintF(), ucg, and variableInterpolationWidth.
Referenced by setup(), and updateToMatchGrid().
void ParallelOverlappingGridInterpolator::turnOnResidualComputation | ( | const bool | trueOrFalse = true | ) |
References computeResidual.
int ParallelOverlappingGridInterpolator::updateToMatchGrid | ( | CompositeGrid & | cg, |
int | refinementLevel = 0 |
||
) |
int ParallelOverlappingGridInterpolator::updateToMatchGrid | ( | realCompositeGridFunction & | u, |
int | refinementLevel = 0 |
||
) |
|
protected |
Referenced by ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), internalInterpolate(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), and internalInterpolate().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), and ParallelOverlappingGridInterpolator().
|
protected |
Referenced by internalInterpolate(), ParallelOverlappingGridInterpolator(), and turnOnResidualComputation().
|
static |
Referenced by internalInterpolate(), main(), and setup().
FILE* ParallelOverlappingGridInterpolator::debugFile |
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), internalInterpolate(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), internalInterpolate(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
|
protected |
Referenced by getMaximumResidual(), internalInterpolate(), and ParallelOverlappingGridInterpolator().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), internalInterpolate(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), internalInterpolate(), and setup().
|
protected |
Referenced by destroy(), internalInterpolate(), and setup().
|
protected |
Referenced by ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
|
protected |
|
protected |
Referenced by destroy(), internalInterpolate(), and setup().
|
protected |
Referenced by destroy(), initializeExplicitInterpolation(), internalInterpolate(), and setup().
|
protected |
Referenced by ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by internalInterpolate(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by computeError(), destroy(), internalInterpolate(), ParallelOverlappingGridInterpolator(), resetSolution(), and setup().
|
protected |
Referenced by destroy(), ParallelOverlappingGridInterpolator(), and setup().
|
protected |
Referenced by bruteForceInterpolate(), computeError(), destroy(), ParallelOverlappingGridInterpolator(), resetSolution(), and setup().