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

#include <ParallelOverlappingGridInterpolator.h>

Collaboration diagram for ParallelOverlappingGridInterpolator:
Collaboration graph
[legend]

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 ()
 

Protected Attributes

ExplicitInterpolationStorageOptionEnum explicitInterpolationStorageOption
 
int numberOfDimensions
 
int numberOfComponentGrids
 
int numberOfBaseGrids
 
intSerialArray numberOfInterpolationPoints
 
intSerialArray * interpolationPoint
 
intSerialArray * interpoleeLocation
 
intSerialArray * interpoleeGrid
 
intSerialArray * variableInterpolationWidth
 
realSerialArrayinterpolationCoordinates
 
intSerialArray numberOfInterpolationPointsPerDonor
 
intSerialArray interpolationStartEndIndex
 
intSerialArray * dimension
 
intSerialArray * indexRange
 
intSerialArray * isCellCentered
 
realSerialArraygridSpacing
 
realArrayucg
 
realArrayvcg
 
int maxInterpolationWidth
 
int coeffWidthDimension
 
int maximumRefinementLevelToInterpolate
 
SparseArray< int > nila
 
SparseArray< int > nipa
 
SparseArray< int * > ila
 
SparseArray< int * > ipa
 
SparseArray< real * > cia
 
SparseArray< real * > coeffa
 
bool computeResidual
 
real maximumResidual
 
bool allGridsHaveLocalData
 
bool onlyAmrGridsHaveLocalData
 
bool noGridsHaveLocalData
 
int POGI_COMM
 

Member Enumeration Documentation

Enumerator
precomputeAllCoefficients 
precomputeSomeCoefficients 
precomputeNoCoefficients 

Constructor & Destructor Documentation

ParallelOverlappingGridInterpolator::ParallelOverlappingGridInterpolator ( )
ParallelOverlappingGridInterpolator::~ParallelOverlappingGridInterpolator ( )

References debugFile, destroy(), and NULL.

Member Function Documentation

int ParallelOverlappingGridInterpolator::bruteForceInterpolate ( realCompositeGridFunction u)
real ParallelOverlappingGridInterpolator::computeError ( )
int ParallelOverlappingGridInterpolator::destroy ( )
protected
int ParallelOverlappingGridInterpolator::getMaximumRefinementLevelToInterpolate ( ) const

return the maximum refinement level to interpolate

References maximumRefinementLevelToInterpolate.

real ParallelOverlappingGridInterpolator::getMaximumResidual ( ) const

References maximumResidual.

int ParallelOverlappingGridInterpolator::initializeExplicitInterpolation ( )
protected
int ParallelOverlappingGridInterpolator::internalInterpolate ( realCompositeGridFunction u,
const Range &  C0,
const Range &  C1,
const Range &  C2,
const IntegerArray gridsToInterpolate_ = NULL,
const IntegerArray gridsToInterpolateFrom_ = NULL 
)
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 
)
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)
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)
int ParallelOverlappingGridInterpolator::setup ( )
real ParallelOverlappingGridInterpolator::sizeOf ( FILE *  file = NULL) const

References NULL.

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 
)

References destroy(), and setup().

Member Data Documentation

bool ParallelOverlappingGridInterpolator::allGridsHaveLocalData
protected
SparseArray<real*> ParallelOverlappingGridInterpolator::cia
protected
SparseArray<real*> ParallelOverlappingGridInterpolator::coeffa
protected
int ParallelOverlappingGridInterpolator::coeffWidthDimension
protected
bool ParallelOverlappingGridInterpolator::computeResidual
protected
int ParallelOverlappingGridInterpolator::debug =0
static

Referenced by internalInterpolate(), main(), and setup().

FILE* ParallelOverlappingGridInterpolator::debugFile
intSerialArray* ParallelOverlappingGridInterpolator::dimension
protected
ExplicitInterpolationStorageOptionEnum ParallelOverlappingGridInterpolator::explicitInterpolationStorageOption
protected
realSerialArray* ParallelOverlappingGridInterpolator::gridSpacing
protected
SparseArray<int*> ParallelOverlappingGridInterpolator::ila
protected
intSerialArray * ParallelOverlappingGridInterpolator::indexRange
protected
realSerialArray* ParallelOverlappingGridInterpolator::interpolationCoordinates
protected
intSerialArray* ParallelOverlappingGridInterpolator::interpolationPoint
protected
intSerialArray ParallelOverlappingGridInterpolator::interpolationStartEndIndex
protected

Referenced by destroy(), and setup().

intSerialArray * ParallelOverlappingGridInterpolator::interpoleeGrid
protected
intSerialArray * ParallelOverlappingGridInterpolator::interpoleeLocation
protected
SparseArray<int*> ParallelOverlappingGridInterpolator::ipa
protected

Referenced by destroy(), internalInterpolate(), and setup().

intSerialArray * ParallelOverlappingGridInterpolator::isCellCentered
protected
int ParallelOverlappingGridInterpolator::maximumRefinementLevelToInterpolate
protected
real ParallelOverlappingGridInterpolator::maximumResidual
protected
int ParallelOverlappingGridInterpolator::maxInterpolationWidth
protected
SparseArray<int> ParallelOverlappingGridInterpolator::nila
protected
SparseArray<int> ParallelOverlappingGridInterpolator::nipa
protected

Referenced by destroy(), internalInterpolate(), and setup().

bool ParallelOverlappingGridInterpolator::noGridsHaveLocalData
protected
int ParallelOverlappingGridInterpolator::numberOfBaseGrids
protected
int ParallelOverlappingGridInterpolator::numberOfComponentGrids
protected
int ParallelOverlappingGridInterpolator::numberOfDimensions
protected
intSerialArray ParallelOverlappingGridInterpolator::numberOfInterpolationPoints
protected

Referenced by destroy(), internalInterpolate(), and setup().

intSerialArray ParallelOverlappingGridInterpolator::numberOfInterpolationPointsPerDonor
protected
bool ParallelOverlappingGridInterpolator::onlyAmrGridsHaveLocalData
protected
int ParallelOverlappingGridInterpolator::POGI_COMM
protected
realArray* ParallelOverlappingGridInterpolator::ucg
protected
intSerialArray * ParallelOverlappingGridInterpolator::variableInterpolationWidth
protected
realArray* ParallelOverlappingGridInterpolator::vcg
protected

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