Overture
Version 25
|
#include <Inverse.h>
Public Member Functions | |
void | intersectLine (const RealArray &x, int &nI, RealArray &xI, const RealArray &vector, const RealArray &xOrigin, const RealArray &xTangent) |
void | intersectPlane (const RealArray &x, int &nI, RealArray &xI, const RealArray &vector, const RealArray &xOrigin, const RealArray &xTangent) |
void | intersectCube (const RealArray &x, int &nI, RealArray &xI, const RealArray &vector, const RealArray &xOrigin, const RealArray &xTangent) |
void | initializeBoundingBoxTrees () |
void | binarySearchOverBoundary (real x[3], real &minimumDistance, int iv[3], int side=-1, int axis=-1) |
int | insideGrid (int side, int axis, real x[], int iv[], real &dot) |
int | distanceToCell (real x[], int iv[], real &signedDistance, const real minimumDistance) |
void | findNearestGridPoint (const int base, const int bound, RealArray &x, RealArray &r) |
int | findNearestCell (real x[3], int iv[3], real &minimumDistance) |
void | initializeStencilWalk () |
void | countCrossingsWithPolygon (const RealArray &x, IntegerArray &crossings, const int &side=Start, const int &axis=axis1, RealArray &xCross=Overture::nullRealArray(), const IntegerArray &mask=Overture::nullIntArray(), const unsigned int &maskBit=UINT_MAX, const int &maskRatio1=1, const int &maskRatio2=1, const int &maskRatio3=1) |
ApproximateGlobalInverse (Mapping &map) | |
virtual | ~ApproximateGlobalInverse () |
virtual void | inverse (const RealArray &x, RealArray &r, RealArray &rx, MappingWorkSpace &workSpace, MappingParameters ¶ms) |
void | initialize () |
void | reinitialize () |
const RealArray & | getGrid () const |
const RealArray & | getBoundingBox () const |
const BoundingBox & | getBoundingBoxTree (int side, int axis) const |
real | getParameter (const MappingParameters::realParameter ¶m) const |
int | getParameter (const MappingParameters::intParameter ¶m) const |
virtual void | setParameter (const MappingParameters::realParameter ¶m, const real &value) |
virtual void | setParameter (const MappingParameters::intParameter ¶m, const int &value) |
virtual void | useRobustInverse (const bool trueOrFalse=TRUE) |
virtual bool | usingRobustInverse () const |
virtual real | sizeOf (FILE *file=NULL) const |
virtual int | get (const GenericDataBase &dir, const aString &name) |
virtual int | put (GenericDataBase &dir, const aString &name) const |
Static Public Member Functions | |
static void | printStatistics () |
Static Public Attributes | |
static const real | bogus =10. |
static real | timeForApproximateInverse =0. |
static real | timeForFindNearestGridPoint =0. |
static real | timeForBinarySearchOverBoundary =0. |
static real | timeForBinarySearchOnLeaves =0. |
static int | numberOfStencilWalks =0 |
static int | numberOfStencilSearches =0 |
static int | numberOfBinarySearches =0 |
static int | numberOfBoxesChecked =0 |
static int | numberOfBoundingBoxes =0 |
static int | numberOfStencilDir2D [9] |
static int | stencilDir2D1 [8 *3 *3] |
static int | stencilDir2D2 [8 *3 *3] |
static int | stencilDir2D3 [8 *3 *3] |
static int | numberOfStencilDir3D [27] |
static int | stencilDir3D1 [27 *3 *3 *3] |
static int | stencilDir3D2 [27 *3 *3 *3] |
static int | stencilDir3D3 [27 *3 *3 *3] |
Protected Member Functions | |
void | constructGrid () |
void | getPeriodicImages (const RealArray &x, RealArray &xI, int &nI, const int &periodicityOfSpace, const RealArray &periodicityVector) |
Protected Attributes | |
Mapping * | map |
int | domainDimension |
int | rangeDimension |
int | uninitialized |
bool | useRobustApproximateInverse |
int | gridDefined |
RealArray & | grid |
IntegerArray | dimension |
IntegerArray | indexRange |
int | base |
int | bound |
int | base0 |
int | bound0 |
RealArray | boundingBox |
BoundingBox | boundingBoxTree [2][3] |
BoundingBox * | serialBoundingBox |
real | boundingBoxExtensionFactor |
real | stencilWalkBoundingBoxExtensionFactor |
bool | findBestGuess |
RealArray | xOrigin |
RealArray | xTangent |
Index | Axes |
Index | xAxes |
Friends | |
class | Mapping |
class | IntersectionMapping |
ApproximateGlobalInverse::ApproximateGlobalInverse | ( | Mapping & | map | ) |
References Mapping::getDomainDimension(), and NULL.
|
virtual |
References serialBoundingBox.
void ApproximateGlobalInverse::binarySearchOverBoundary | ( | real | x[3], |
real & | minimumDistance, | ||
int | iv[3], | ||
int | side = -1 , |
||
int | axis = -1 |
||
) |
References assert, axis1, axis2, axis3, boundingBoxTree, BoundingBox::child1, BoundingBox::child2, Mapping::debug, distanceToCell(), BoundingBox::domainBound(), End, Mapping::functionPeriodic, getCPU(), Mapping::getIsPeriodic(), grid, GRID1, GRID2, GRID3, Mapping::gridIndexRange, i2, indexRange, map, max(), min(), NULL, numberOfBinarySearches, numberOfBoxesChecked, OV_ABORT, printF(), BoundingBox::rangeBound(), rangeDimension, SQR, Start, STENCIL_DEBUG, timeForBinarySearchOnLeaves, timeForBinarySearchOverBoundary, and useRobustApproximateInverse.
Referenced by Ogen::cutHoles(), Ogen::cutHolesNew(), Ogen::cutHolesNewer(), TrimmedMapping::editNurbsTrimCurve(), TrimmedMapping::findClosestCurve(), TrimmedMapping::findDistanceToACurve(), and findNearestGridPoint().
|
protected |
References axis1, Mapping::debug, dimension, domainDimension, Mapping::getGrid(), Mapping::getGridDimensions(), Mapping::getGridSerial(), Mapping::getName(), Mapping::getTypeOfCoordinateSingularity(), grid, gridDefined, Mapping::gridIndexRange, indexRange, map, Mapping::mappingName, max(), min(), Mapping::polarSingularity, and Mapping::usesDistributedInverse().
Referenced by initialize().
void ApproximateGlobalInverse::countCrossingsWithPolygon | ( | const RealArray & | x, |
IntegerArray & | crossings, | ||
const int & | side = Start , |
||
const int & | axis = axis1 , |
||
RealArray & | xCross = Overture::nullRealArray() , |
||
const IntegerArray & | mask = Overture::nullIntArray() , |
||
const unsigned int & | maskBit = UINT_MAX , |
||
const int & | maskRatio1 = 1 , |
||
const int & | maskRatio2 = 1 , |
||
const int & | maskRatio3 = 1 |
||
) |
References assert, axis1, axis2, axis3, boundingBox, boundingBoxTree, BoundingBox::child1, BoundingBox::child2, Mapping::debug, Triangle::display(), BoundingBox::domainBound(), End, fabs(), FALSE, Triangle::getRelativeCoordinates(), grid, i2, indexRange, initialize(), Triangle::intersects(), BoundingBoxStack::isEmpty(), max(), min(), NULL, numberOfBoxesChecked, BoundingBoxStack::pop(), BoundingBoxStack::push(), BoundingBox::rangeBound(), rangeDimension, REAL_EPSILON, Triangle::setVertices(), Start, TRUE, uninitialized, Triangle::x1, Triangle::x2, and Triangle::x3.
Referenced by TrimmedMapping::insideOrOutside().
int ApproximateGlobalInverse::distanceToCell | ( | real | x[], |
int | iv[], | ||
real & | signedDistance, | ||
const real | minimumDistance | ||
) |
References assert, Mapping::debug, GET_NDIST, GET_TRIANGLE_COORDS, Mapping::getSignForJacobian(), grid, GRID, ia, l1, l2, l3, map, max(), min(), OV_ABORT, printF(), r, rangeDimension, REAL_MAX, REAL_MIN, s, and SQR.
Referenced by binarySearchOverBoundary().
References abs(), assert, axis1, axis2, axis3, Mapping::debug, domainDimension, End, FALSE, Mapping::getSignForJacobian(), grid, i2, ia, indexRange, l1, l2, l3, map, max(), rangeDimension, Start, and TRUE.
Referenced by findNearestGridPoint().
void ApproximateGlobalInverse::findNearestGridPoint | ( | const int | base, |
const int | bound, | ||
RealArray & | x, | ||
RealArray & | r | ||
) |
References abs(), assert, Axes, axis1, axis2, axis3, binarySearchOverBoundary(), bogus, boundingBox, Mapping::debug, direction(), DISTANCE_L2_2, DISTANCE_L2_3, distancel2(), domainDimension, dr, End, fabs(), FALSE, findBestGuess, findNearestCell(), GET_DISTANCE1, getCPU(), Mapping::getDomainDimension(), Mapping::getIsPeriodic(), Mapping::getRangeDimension(), gid, grid, GRID1, GRID2, GRID3, Mapping::gridIndexRange, i2, indexRange, initialize(), isPeriodic, map, max(), min(), NULL, numberOfStencilDirections2D, numberOfStencilDirections3D, numberOfStencilSearches, numberOfStencilWalks, Mapping::openDebugFiles(), Mapping::pDebugFile, printF(), r, rangeDimension, Start, STENCIL_DEBUG2, stencilDirection2D1, stencilDirection2D2, stencilDirection3D1, stencilDirection3D2, stencilDirection3D3, stencilWalkBoundingBoxExtensionFactor, timeForFindNearestGridPoint, TRUE, uninitialized, and useRobustApproximateInverse.
Referenced by Mapping::findNearestGridPoint(), findNearestValidGridPoint(), Ogmg::getInterpolationCoordinates(), inverse(), and Ogen::queryAPoint().
|
virtual |
References boundingBoxExtensionFactor, GenericDataBase::find(), GenericDataBase::get(), and GenericDataBase::virtualConstructor().
Referenced by Mapping::get().
const RealArray & ApproximateGlobalInverse::getBoundingBox | ( | ) | const |
const BoundingBox & ApproximateGlobalInverse::getBoundingBoxTree | ( | int | side, |
int | axis | ||
) | const |
Referenced by DistributedInverse::computeBoundingBoxes().
const RealArray & ApproximateGlobalInverse::getGrid | ( | ) | const |
References grid.
Referenced by Ogmg::buildExtraLevels(), TrimmedMapping::findClosestCurve(), and TrimmedMapping::findDistanceToACurve().
real ApproximateGlobalInverse::getParameter | ( | const MappingParameters::realParameter & | param | ) | const |
int ApproximateGlobalInverse::getParameter | ( | const MappingParameters::intParameter & | param | ) | const |
References MappingParameters::THEfindBestGuess.
|
protected |
References axis1, axis2, Mapping::debug, intersectCube(), intersectLine(), intersectPlane(), max(), pow(), rangeDimension, xOrigin, and xTangent.
Referenced by inverse().
void ApproximateGlobalInverse::initialize | ( | ) |
References Axes, axis1, bb, boundingBox, constructGrid(), Mapping::debug, domainDimension, End, Mapping::getDomainDimension(), Mapping::getName(), Mapping::getRangeDimension(), gridDefined, initializeBoundingBoxTrees(), initializeStencilWalk(), map, Mapping::mappingName, max(), MPI_Real, Overture::OV_COMM, printF(), BoundingBox::rangeBound(), rangeDimension, serialBoundingBox, Start, uninitialized, Mapping::usesDistributedInverse(), xAxes, xOrigin, and xTangent.
Referenced by SurfaceStitcher::buildSurfaceCompositeGrid(), DistributedInverse::computeBoundingBoxes(), countCrossingsWithPolygon(), IntersectionMapping::determineIntersection(), findNearestGridPoint(), Mapping::findNearestGridPoint(), TrimmedMapping::initializeQuadTree(), IntersectionMapping::intersectCurves(), inverse(), and Mapping::inverseMapS().
void ApproximateGlobalInverse::initializeBoundingBoxTrees | ( | ) |
References BoundingBox::addChildren(), assert, Axes, axis1, axis2, axis3, boundingBox, boundingBoxExtensionFactor, boundingBoxTree, BoundingBox::child1, BoundingBox::child2, Mapping::debug, delta, display(), BoundingBox::display(), BoundingBox::domainBound(), BoundingBox::domainBoundEquals(), domainDimension, End, fabs(), Mapping::functionPeriodic, Mapping::getIsPeriodic(), Mapping::getName(), grid, Mapping::gridIndexRange, indexRange, BoundingBox::isDefined(), BoundingBoxStack::isEmpty(), map, Mapping::mappingName, max(), min(), NULL, numberOfBoundingBoxes, Mapping::openDebugFiles(), Mapping::pDebugFile, BoundingBoxStack::pop(), pow(), printF(), BoundingBoxStack::push(), BoundingBox::rangeBound(), rangeDimension, REAL_MAX, BoundingBox::setDimensions(), BoundingBox::setDomainBound(), BoundingBox::setIsDefined(), Start, and xAxes.
Referenced by initialize().
void ApproximateGlobalInverse::initializeStencilWalk | ( | ) |
References FALSE, i2, numberOfStencilDirections2D, numberOfStencilDirections3D, stencilDirection2D1, stencilDirection2D2, stencilDirection3D1, stencilDirection3D2, and stencilDirection3D3.
Referenced by initialize().
void ApproximateGlobalInverse::intersectCube | ( | const RealArray & | x, |
int & | nI, | ||
RealArray & | xI, | ||
const RealArray & | vector, | ||
const RealArray & | xOrigin, | ||
const RealArray & | xTangent | ||
) |
References axis1, axis2, axis3, domainDimension, End, i2, intersectLine(), max(), min(), rangeDimension, REAL_MAX, and Start.
Referenced by getPeriodicImages().
void ApproximateGlobalInverse::intersectLine | ( | const RealArray & | x, |
int & | nI, | ||
RealArray & | xI, | ||
const RealArray & | vector, | ||
const RealArray & | xOrigin, | ||
const RealArray & | xTangent | ||
) |
References axis1, axis2, axis3, Mapping::debug, domainDimension, End, max(), min(), rangeDimension, s, Start, and xAxes.
Referenced by getPeriodicImages(), intersectCube(), and intersectPlane().
void ApproximateGlobalInverse::intersectPlane | ( | const RealArray & | x, |
int & | nI, | ||
RealArray & | xI, | ||
const RealArray & | vector, | ||
const RealArray & | xOrigin, | ||
const RealArray & | xTangent | ||
) |
References axis1, axis2, domainDimension, End, i2, intersectLine(), max(), min(), rangeDimension, and Start.
Referenced by getPeriodicImages().
|
virtual |
References Axes, axis1, axis2, axis3, base, base0, bogus, bound, bound0, Mapping::canInvert, Mapping::debug, domainDimension, evaluate(), findNearestGridPoint(), Mapping::getBasicInverseOption(), getCPU(), Mapping::getDomainDimension(), Mapping::getIndex(), getPeriodicImages(), Mapping::getRangeDimension(), MappingWorkSpace::I0, MappingWorkSpace::index0, MappingWorkSpace::index0IsSequential, initialize(), map, MappingParameters::periodicityOfSpace, MappingParameters::periodicityVector, r, MappingWorkSpace::r0, rangeDimension, timeForApproximateInverse, uninitialized, Mapping::useInitialGuessForInverse, MappingWorkSpace::x0, and xAxes.
Referenced by NurbsMapping::basicInverseS(), ComposeMapping::inverseMap(), Mapping::inverseMap(), ComposeMapping::inverseMapS(), and Mapping::inverseMapS().
|
static |
References ParallelUtility::getMaxValue(), ParallelUtility::getMinValue(), max(), numberOfBinarySearches, numberOfBoundingBoxes, numberOfBoxesChecked, ExactLocalInverse::numberOfNewtonInversions, ExactLocalInverse::numberOfNewtonSteps, numberOfStencilSearches, numberOfStencilWalks, printF(), timeForApproximateInverse, timeForBinarySearchOnLeaves, timeForBinarySearchOverBoundary, ExactLocalInverse::timeForExactInverse, and timeForFindNearestGridPoint.
Referenced by main().
|
virtual |
void ApproximateGlobalInverse::reinitialize | ( | ) |
References Mapping::debug, gridDefined, and uninitialized.
Referenced by Ogmg::buildExtraLevels(), Mapping::mappingHasChanged(), Mapping::reinitialize(), and Mapping::setGrid().
|
virtual |
|
virtual |
References findBestGuess, and MappingParameters::THEfindBestGuess.
|
virtual |
|
virtual |
References useRobustApproximateInverse.
Referenced by DataPointMapping::basicInverseS(), Mapping::buildMappingParametersDialog(), Mapping::update(), and Mapping::usingRobustInverse().
|
friend |
|
friend |
|
protected |
Referenced by findNearestGridPoint(), initialize(), initializeBoundingBoxTrees(), and inverse().
|
protected |
Referenced by inverse().
|
protected |
Referenced by inverse().
|
static |
|
protected |
Referenced by inverse().
|
protected |
Referenced by inverse().
|
protected |
|
protected |
Referenced by get(), initializeBoundingBoxTrees(), and setParameter().
|
protected |
|
protected |
Referenced by constructGrid().
|
protected |
|
protected |
Referenced by findNearestGridPoint(), and setParameter().
|
protected |
Referenced by MappingBuilder::assignBoundaryConditions(), binarySearchOverBoundary(), MappingBuilder::build(), MappingBuilder::buildBoxGrid(), constructGrid(), countCrossingsWithPolygon(), distanceToCell(), findNearestCell(), findNearestGridPoint(), Mapping::findNearestGridPoint(), getGrid(), initializeBoundingBoxTrees(), and insideGrid().
|
protected |
Referenced by constructGrid(), initialize(), and reinitialize().
|
protected |
|
protected |
|
static |
Referenced by binarySearchOverBoundary(), and printStatistics().
|
static |
Referenced by initializeBoundingBoxTrees(), and printStatistics().
|
static |
Referenced by binarySearchOverBoundary(), countCrossingsWithPolygon(), and printStatistics().
|
static |
|
static |
|
static |
Referenced by findNearestGridPoint(), and printStatistics().
|
static |
Referenced by findNearestGridPoint(), and printStatistics().
|
protected |
Referenced by binarySearchOverBoundary(), MappingBuilder::buildSurfacePatch(), countCrossingsWithPolygon(), distanceToCell(), findNearestCell(), findNearestGridPoint(), getPeriodicImages(), initialize(), initializeBoundingBoxTrees(), intersectCube(), intersectLine(), intersectPlane(), and inverse().
|
protected |
Referenced by Mapping::findNearestGridPoint(), initialize(), Mapping::inverseMapS(), and ~ApproximateGlobalInverse().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
Referenced by findNearestGridPoint(), Mapping::inverseMapS(), and setParameter().
|
static |
Referenced by inverse(), and printStatistics().
|
static |
Referenced by binarySearchOverBoundary(), and printStatistics().
|
static |
Referenced by binarySearchOverBoundary(), and printStatistics().
|
static |
Referenced by findNearestGridPoint(), and printStatistics().
|
protected |
Referenced by countCrossingsWithPolygon(), findNearestGridPoint(), initialize(), inverse(), and reinitialize().
|
protected |
Referenced by binarySearchOverBoundary(), findNearestGridPoint(), useRobustInverse(), and usingRobustInverse().
|
protected |
Referenced by initialize(), initializeBoundingBoxTrees(), intersectLine(), and inverse().
|
protected |
Referenced by getPeriodicImages(), and initialize().
|
protected |
Referenced by getPeriodicImages(), and initialize().