speckley::RipleyCoupler Class Reference

`#include <CrossDomainCoupler.h>`

## Classes

struct | Ripley

## Public Member Functions

| RipleyCoupler (const SpeckleyDomain *speck, const double s_dx[2], int rank)
void | interpolate (escript::Data &target, const escript::Data &source) const

## Private Member Functions

void | calculateOrder2 (int dim, double loc, double *results) const
void | calculateOrder3 (int dim, double loc, double *results) const
void | calculateOrder4 (int dim, double loc, double *results) const
void | calculateOrder5 (int dim, double loc, double *results) const
void | calculateOrder6 (int dim, double loc, double *results) const
void | calculateOrder7 (int dim, double loc, double *results) const
void | calculateOrder8 (int dim, double loc, double *results) const
void | calculateOrder9 (int dim, double loc, double *results) const
void | calculateOrder10 (int dim, double loc, double *results) const
void | generateLocations (struct Ripley &r, double **positions) const
bool | validInterpolation (escript::Data &target, const escript::Data &source, const SpeckleyDomain *speck, const double *s_dx, const ripley::RipleyDomain *other) const
void | calculate (struct Ripley &r, dim_t ex, dim_t ey, dim_t ez, int oqx, int oqy, int oqz, double *out, const double *factor_x, const double *factor_y, const double *factor_z, const escript::Data &source) const
void | shareWithNeighbours (bool lowerFirst, int hasLower, int hasUpper, double *bottom, double *top, double *brecv, double *trecv, int bSize, int tSize, int distance) const
void | getEdgeSpacing (struct Ripley r, int *lower, int *upper) const
void | shareBrickXFaces (struct Ripley &r, int hasLower, int hasUpper, int lower, int upper, escript::Data &target) const
void | shareBrickYFaces (struct Ripley &r, int hasLower, int hasUpper, int lower, int upper, escript::Data &target) const
void | shareBrickZFaces (struct Ripley &r, int hasLower, int hasUpper, int lower, int upper, escript::Data &target) const
void | shareRectangleXEdges (struct Ripley &r, int hasLower, int hasUpper, int lower, int upper, escript::Data &target) const
void | shareRectangleYEdges (struct Ripley &r, int hasLower, int hasUpper, int lower, int upper, escript::Data &target) const

## Private Attributes

const SpeckleyDomain * | speck
dim_t | s_NE [3]
double | s_dx [3]
int | s_NX [3]
double | speckley_origin [3]
int | order
int | numQuads
bool | hasLower [3]
bool | hasUpper [3]
int | numComp

## Constructor & Destructor Documentation

## RipleyCoupler()

speckley::RipleyCoupler::RipleyCoupler | ( | const SpeckleyDomain * | speck,
|  | const double | s_dx[2],
|  | int | rank
| ) |  |

References speckley::SpeckleyDomain::getDim(), speckley::SpeckleyDomain::getLocalCoordinate(), speckley::SpeckleyDomain::getMPIComm(), speckley::SpeckleyDomain::getNumElementsPerDim(), speckley::SpeckleyDomain::getNumFacesPerBoundary(), speckley::SpeckleyDomain::getNumSubdivisionsPerDim(), speckley::SpeckleyDomain::getOrder(), hasLower, hasUpper, numQuads, order, s_dx, s_NE, s_NX, speck, and speckley_origin.

## Member Function Documentation

## calculate()

void speckley::RipleyCoupler::calculate | ( | struct Ripley & | r,
|  | dim_t | ex,
|  | dim_t | ey,
|  | dim_t | ez,
|  | int | oqx,
|  | int | oqy,
|  | int | oqz,
|  | double * | out,
|  | const double * | factor_x,
|  | const double * | factor_y,
|  | const double * | factor_z,
|  | const escript::Data & | source
| ) |  | const

inline private

References speckley::RipleyCoupler::Ripley::domain, speckley::RipleyCoupler::Ripley::dx, speckley::SpeckleyDomain::getDim(), ripley::RipleyDomain::getLocalCoordinate(), escript::Data::getSampleDataRO(), INDEX2, INDEX3, INDEX4, numComp, numQuads, speckley::ripleyLocations, s_dx, s_NE, speck, and speckley_origin.

Referenced by interpolate().

## calculateOrder10()

void speckley::RipleyCoupler::calculateOrder10 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree10_0(), speckley::lagrange_degree10_1(), speckley::lagrange_degree10_10(), speckley::lagrange_degree10_2(), speckley::lagrange_degree10_3(), speckley::lagrange_degree10_4(), speckley::lagrange_degree10_5(), speckley::lagrange_degree10_6(), speckley::lagrange_degree10_7(), speckley::lagrange_degree10_8(), speckley::lagrange_degree10_9(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder2()

void speckley::RipleyCoupler::calculateOrder2 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree2_0(), speckley::lagrange_degree2_1(), speckley::lagrange_degree2_2(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder3()

void speckley::RipleyCoupler::calculateOrder3 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree3_0(), speckley::lagrange_degree3_1(), speckley::lagrange_degree3_2(), speckley::lagrange_degree3_3(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder4()

void speckley::RipleyCoupler::calculateOrder4 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree4_0(), speckley::lagrange_degree4_1(), speckley::lagrange_degree4_2(), speckley::lagrange_degree4_3(), speckley::lagrange_degree4_4(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder5()

void speckley::RipleyCoupler::calculateOrder5 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree5_0(), speckley::lagrange_degree5_1(), speckley::lagrange_degree5_2(), speckley::lagrange_degree5_3(), speckley::lagrange_degree5_4(), speckley::lagrange_degree5_5(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder6()

void speckley::RipleyCoupler::calculateOrder6 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree6_0(), speckley::lagrange_degree6_1(), speckley::lagrange_degree6_2(), speckley::lagrange_degree6_3(), speckley::lagrange_degree6_4(), speckley::lagrange_degree6_5(), speckley::lagrange_degree6_6(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder7()

void speckley::RipleyCoupler::calculateOrder7 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree7_0(), speckley::lagrange_degree7_1(), speckley::lagrange_degree7_2(), speckley::lagrange_degree7_3(), speckley::lagrange_degree7_4(), speckley::lagrange_degree7_5(), speckley::lagrange_degree7_6(), speckley::lagrange_degree7_7(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder8()

void speckley::RipleyCoupler::calculateOrder8 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree8_0(), speckley::lagrange_degree8_1(), speckley::lagrange_degree8_2(), speckley::lagrange_degree8_3(), speckley::lagrange_degree8_4(), speckley::lagrange_degree8_5(), speckley::lagrange_degree8_6(), speckley::lagrange_degree8_7(), speckley::lagrange_degree8_8(), s_dx, and speckley_origin.

Referenced by generateLocations().

## calculateOrder9()

void speckley::RipleyCoupler::calculateOrder9 | ( | int | dim,
|  | double | loc,
|  | double * | results
| ) |  | const

private

References speckley::lagrange_degree9_0(), speckley::lagrange_degree9_1(), speckley::lagrange_degree9_2(), speckley::lagrange_degree9_3(), speckley::lagrange_degree9_4(), speckley::lagrange_degree9_5(), speckley::lagrange_degree9_6(), speckley::lagrange_degree9_7(), speckley::lagrange_degree9_8(), speckley::lagrange_degree9_9(), s_dx, and speckley_origin.

Referenced by generateLocations().

## generateLocations()

void speckley::RipleyCoupler::generateLocations | ( | struct Ripley & | r,
|  | double ** | positions
| ) |  | const

private

References calculateOrder10(), calculateOrder2(), calculateOrder3(), calculateOrder4(), calculateOrder5(), calculateOrder6(), calculateOrder7(), calculateOrder8(), calculateOrder9(), speckley::RipleyCoupler::Ripley::domain, speckley::RipleyCoupler::Ripley::dx, speckley::SpeckleyDomain::getDim(), ripley::RipleyDomain::getLocalCoordinate(), speckley::RipleyCoupler::Ripley::NE, numQuads, order, speckley::ripleyLocations, and speck.

Referenced by interpolate().

## getEdgeSpacing()

void speckley::RipleyCoupler::getEdgeSpacing | ( | struct Ripley | r,
|  | int * | lower,
|  | int * | upper
| ) |  | const

private

References speckley::RipleyCoupler::Ripley::domain, speckley::RipleyCoupler::Ripley::dx, speckley::SpeckleyDomain::getDim(), ripley::RipleyDomain::getLocalCoordinate(), MINE, speckley::RipleyCoupler::Ripley::NE, speckley::ripleyLocations, s_dx, s_NE, SHARED, speck, speckley_origin, and THEIRS.

Referenced by interpolate().

## interpolate()

void speckley::RipleyCoupler::interpolate | ( | escript::Data & | target,
|  | const escript::Data & | source
| ) |  | const

References calculate(), speckley::RipleyCoupler::Ripley::dx, generateLocations(), escript::Data::getDataPointSize(), speckley::SpeckleyDomain::getDim(), escript::Data::getDomain(), getEdgeSpacing(), ripley::RipleyDomain::getElementLength(), ripley::RipleyDomain::getNumElementsPerDim(), ripley::RipleyDomain::getNumFacesPerBoundary(), escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX3, speckley::RipleyCoupler::Ripley::maxs, MINE, speckley::RipleyCoupler::Ripley::mins, speckley::RipleyCoupler::Ripley::NE, numComp, numQuads, escript::Data::requireWrite(), s_dx, s_NX, shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), SHARED, shareRectangleXEdges(), shareRectangleYEdges(), speck, and validInterpolation().

## shareBrickXFaces()

void speckley::RipleyCoupler::shareBrickXFaces | ( | struct Ripley & | r,
|  | int | hasLower,
|  | int | hasUpper,
|  | int | lower,
|  | int | upper,
|  | escript::Data & | target
| ) |  | const

private

References escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX3, MINE, speckley::RipleyCoupler::Ripley::NE, numComp, s_NX, SHARED, shareWithNeighbours(), and THEIRS.

Referenced by interpolate().

## shareBrickYFaces()

void speckley::RipleyCoupler::shareBrickYFaces | ( | struct Ripley & | r,
|  | int | hasLower,
|  | int | hasUpper,
|  | int | lower,
|  | int | upper,
|  | escript::Data & | target
| ) |  | const

private

References escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX3, INDEX4, MINE, speckley::RipleyCoupler::Ripley::NE, numComp, s_NX, SHARED, shareWithNeighbours(), and THEIRS.

Referenced by interpolate().

## shareBrickZFaces()

void speckley::RipleyCoupler::shareBrickZFaces | ( | struct Ripley & | r,
|  | int | hasLower,
|  | int | hasUpper,
|  | int | lower,
|  | int | upper,
|  | escript::Data & | target
| ) |  | const

private

References escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX3, INDEX4, MINE, speckley::RipleyCoupler::Ripley::NE, numComp, s_NX, SHARED, shareWithNeighbours(), and THEIRS.

Referenced by interpolate().

## shareRectangleXEdges()

void speckley::RipleyCoupler::shareRectangleXEdges | ( | struct Ripley & | r,
|  | int | hasLower,
|  | int | hasUpper,
|  | int | lower,
|  | int | upper,
|  | escript::Data & | target
| ) |  | const

private

References escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX2, MINE, speckley::RipleyCoupler::Ripley::NE, numComp, s_NX, SHARED, shareWithNeighbours(), and THEIRS.

Referenced by interpolate().

## shareRectangleYEdges()

void speckley::RipleyCoupler::shareRectangleYEdges | ( | struct Ripley & | r,
|  | int | hasLower,
|  | int | hasUpper,
|  | int | lower,
|  | int | upper,
|  | escript::Data & | target
| ) |  | const

private

References escript::Data::getSampleDataRW(), hasLower, hasUpper, INDEX2, MINE, speckley::RipleyCoupler::Ripley::NE, numComp, s_NX, SHARED, shareWithNeighbours(), and THEIRS.

Referenced by interpolate().

## shareWithNeighbours()

void speckley::RipleyCoupler::shareWithNeighbours | ( | bool | lowerFirst,
|  | int | hasLower,
|  | int | hasUpper,
|  | double * | bottom,
|  | double * | top,
|  | double * | brecv,
|  | double * | trecv,
|  | int | bSize,
|  | int | tSize,
|  | int | distance
| ) |  | const

private

References hasLower, hasUpper, and MPI_DOUBLE.

Referenced by shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), shareRectangleXEdges(), and shareRectangleYEdges().

## validInterpolation()

bool speckley::RipleyCoupler::validInterpolation | ( | escript::Data & | target,
|  | const escript::Data & | source,
|  | const SpeckleyDomain * | speck,
|  | const double * | s_dx,
|  | const ripley::RipleyDomain * | other
| ) |  | const

private

References ripley::Elements, speckley::Elements, escript::Data::getDataPointSize(), speckley::SpeckleyDomain::getDim(), ripley::RipleyDomain::getDim(), escript::Data::getDomain(), escript::Data::getFunctionSpace(), ripley::RipleyDomain::getLength(), speckley::SpeckleyDomain::getLength(), speckley::SpeckleyDomain::getMPIComm(), ripley::RipleyDomain::getMPIComm(), ripley::RipleyDomain::getNumSubdivisionsPerDim(), escript::FunctionSpace::getTypeCode(), s_NX, and speck.

Referenced by interpolate().

## Member Data Documentation

## hasLower

bool speckley::RipleyCoupler::hasLower[3]

private

Referenced by interpolate(), RipleyCoupler(), shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), shareRectangleXEdges(), shareRectangleYEdges(), and shareWithNeighbours().

## hasUpper

bool speckley::RipleyCoupler::hasUpper[3]

private

Referenced by interpolate(), RipleyCoupler(), shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), shareRectangleXEdges(), shareRectangleYEdges(), and shareWithNeighbours().

## numComp

int speckley::RipleyCoupler::numComp

mutable private

Referenced by calculate(), interpolate(), shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), shareRectangleXEdges(), and shareRectangleYEdges().

## numQuads

int speckley::RipleyCoupler::numQuads

private

Referenced by calculate(), generateLocations(), interpolate(), and RipleyCoupler().

## order

int speckley::RipleyCoupler::order

private

Referenced by generateLocations(), and RipleyCoupler().

## s_dx

double speckley::RipleyCoupler::s_dx[3]

private

Referenced by calculate(), calculateOrder10(), calculateOrder2(), calculateOrder3(), calculateOrder4(), calculateOrder5(), calculateOrder6(), calculateOrder7(), calculateOrder8(), calculateOrder9(), getEdgeSpacing(), interpolate(), and RipleyCoupler().

## s_NE

dim_t speckley::RipleyCoupler::s_NE[3]

private

Referenced by calculate(), getEdgeSpacing(), and RipleyCoupler().

## s_NX

int speckley::RipleyCoupler::s_NX[3]

private

Referenced by interpolate(), RipleyCoupler(), shareBrickXFaces(), shareBrickYFaces(), shareBrickZFaces(), shareRectangleXEdges(), shareRectangleYEdges(), and validInterpolation().

## speck

const SpeckleyDomain* speckley::RipleyCoupler::speck

private

Referenced by calculate(), generateLocations(), getEdgeSpacing(), interpolate(), RipleyCoupler(), and validInterpolation().

## speckley_origin

double speckley::RipleyCoupler::speckley_origin[3]

private

Referenced by calculate(), calculateOrder10(), calculateOrder2(), calculateOrder3(), calculateOrder4(), calculateOrder5(), calculateOrder6(), calculateOrder7(), calculateOrder8(), calculateOrder9(), getEdgeSpacing(), and RipleyCoupler().

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

- CrossDomainCoupler.h
- CrossDomainCoupler.cpp