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

#include <StretchMapping.h>

Inheritance diagram for StretchMapping:
Inheritance graph
[legend]
Collaboration diagram for StretchMapping:
Collaboration graph
[legend]

Public Types

enum  StretchingType {
  inverseHyperbolicTangent =0, hyperbolicTangent, exponential, exponentialBlend,
  exponentialToLinear, noStretching, linearSpacing, numberOfStretchingTypes
}
 
- Public Types inherited from Mapping
enum  mappingSpace { parameterSpace, cartesianSpace }
 
enum  coordinateSystem {
  cartesian, spherical, cylindrical, polar,
  toroidal, numberOfCoordinateSystems
}
 
enum  coordinateSingularity { noCoordinateSingularity, polarSingularity }
 
enum  mappingCoordinateSystem { rectangular, conformal, orthogonal, general }
 
enum  periodicType { notPeriodic, derivativePeriodic, functionPeriodic }
 
enum  topologyEnum { topologyIsNotPeriodic =0, topologyIsPeriodic, topologyIsPartiallyPeriodic }
 
enum  mappingItemName {
  mappingName, domainName, rangeName, domainAxis1Name,
  domainAxis2Name, domainAxis3Name, rangeAxis1Name, rangeAxis2Name,
  rangeAxis3Name, numberOfMappingItemNames
}
 
enum  basicInverseOptions { canDoNothing, canDetermineOutside, canInvert, canInvertWithGoodGuess }
 
typedef ArraySimpleFixed< int, 2, 3, 1, 1 > IndexRangeType
 

Public Member Functions

 StretchMapping (const StretchingType &stretchingType=noStretching)
 
 StretchMapping (const int numberOfLayers, const int numberOfIntervals=0)
 
 StretchMapping (const StretchMapping &, const CopyType copyType=DEEP)
 
 ~StretchMapping ()
 
StretchMappingoperator= (const StretchMapping &X)
 
int setStretchingType (const StretchingType &stretchingType)
 
int setNumberOfLayers (const int numberOfLayers)
 
int setNumberOfIntervals (const int numberOfIntervals)
 
int setLayerParameters (const int index, const real a, const real b, const real c)
 
int setIntervalParameters (const int index, const real d, const real e, const real f)
 
int setIsNormalized (const bool &trueOrFalse=TRUE)
 
int setEndPoints (const real rmin, const real rmax)
 
int setScaleParameters (const real origin, const real scale)
 
int setNumberOfSplinePoints (const int numberOfSplinePoints)
 
int setIsPeriodic (const int trueOrFalse)
 
virtual void setIsPeriodic (const int axis, const periodicType isPeriodic)
 
int setHyperbolicTangentParameters (const real &a0, const real &ar, const real &a1, const real &b1, const real &c1)
 
int setExponentialParameters (const real &a0, const real &ar, const real &a1, const real &b1, const real &c1)
 
int setExponentialToLinearParameters (const real &a, const real &b, const real &c)
 
int setLinearSpacingParameters (const real &a0, const real &a1)
 
int initialize ()
 
virtual int get (const GenericDataBase &dir, const aString &name)
 
virtual int put (GenericDataBase &dir, const aString &name) const
 
Mappingmake (const aString &mappingClassName)
 
aString getClassName () const
 
void display (const aString &label=blankString) const
 
void map (const realArray &r, realArray &x, realArray &xr=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
void inverseMap (const realArray &x, realArray &r, realArray &rx=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
void basicInverse (const realArray &x, realArray &r, realArray &rx=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
void mapS (const RealArray &r, RealArray &x, RealArray &xr=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
void inverseMapS (const RealArray &x, RealArray &r, RealArray &rx=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
void basicInverseS (const RealArray &x, RealArray &r, RealArray &rx=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
int update (MappingInformation &mapInfo)
 
- Public Member Functions inherited from Mapping
 Mapping (int domainDimension=3, int rangeDimension=3, mappingSpace domainSpace=parameterSpace, mappingSpace rangeSpace=cartesianSpace, coordinateSystem domainCoordinateSystem=cartesian, coordinateSystem rangeCoordinateSystem=cartesian)
 
 Mapping (const Mapping &, const CopyType copyType=DEEP)
 
Mappingoperator= (const Mapping &X)
 
virtual ~Mapping ()
 
void reference (const Mapping &map)
 
void breakReference ()
 
virtual void mapC (const realArray &r, const realArray &x, const realArray &xr=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void inverseMapC (const realArray &x, const realArray &r, const realArray &rx=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void mapGrid (const realArray &r, realArray &x, realArray &xr=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual int intersects (Mapping &map2, const int &side1=-1, const int &axis1=-1, const int &side2=-1, const int &axis2=-1, const real &tol=0.) const
 
virtual void inverseMapGrid (const realArray &x, realArray &r, realArray &rx=Overture::nullRealDistributedArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void mapCS (const RealArray &r, const RealArray &x, const RealArray &xr=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void inverseMapCS (const RealArray &x, const RealArray &r, const RealArray &rx=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void mapGridS (const RealArray &r, RealArray &x, RealArray &xr=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual void inverseMapGridS (const RealArray &x, RealArray &r, RealArray &rx=Overture::nullRealArray(), MappingParameters &params=Overture::nullMappingParameters())
 
virtual int projectS (RealArray &x, MappingProjectionParameters &mpParams)
 
virtual real sizeOf (FILE *file=NULL) const
 
virtual bool updateWithCommand (MappingInformation &mapInfo, const aString &command)
 
virtual int interactiveUpdate (GenericGraphicsInterface &gi)
 
virtual int project (realArray &x, MappingProjectionParameters &mpParams)
 
int checkMapping ()
 
void reinitialize ()
 
int determineResolution (int numberOfGridPoints[], bool collapsedEdge[2][3], real averageArclength[], real elementDensityTolerance=.05)
 
void secondOrderDerivative (const Index &I, const realArray &r, realArray &xrr, const int axis, const int &rAxis)
 
int findNearestGridPoint (RealArray &x, RealArray &r, RealArray &dista, RealArray &xa)
 Find the nearest grid point to each of a given set of points x(i,.)
 
real getArcLength ()
 
basicInverseOptions getBasicInverseOption () const
 
int getBoundaryCondition (const int side, const int axis) const
 
virtual RealArray getBoundingBox (const int &side=-1, const int &axis=-1) const
 
virtual int getBoundingBox (const IntegerArray &indexRange, const IntegerArray &gridIndexRange, RealArray &xBounds, bool local=false) const
 
virtual int getBoundingBox (const RealArray &rBounds, RealArray &xBounds) const
 
const BoundingBoxgetBoundingBoxTree (const int &side, const int &axis) const
 
int getCoordinateEvaluationType (const coordinateSystem type) const
 
Bound getDomainBound (const int side, const int axis) const
 
int getDomainDimension () const
 
coordinateSystem getDomainCoordinateSystem () const
 
Bound getDomainCoordinateSystemBound (const int side, const int axis) const
 
mappingSpace getDomainSpace () const
 
int getGridDimensions (const int axis) const
 
virtual const realArraygetGrid (MappingParameters &params=Overture::nullMappingParameters(), bool includeGhost=false)
 
virtual const RealArraygetGridSerial (MappingParameters &params=Overture::nullMappingParameters(), bool includeGhost=false)
 
int getID () const
 
int getInvertible () const
 
periodicType getIsPeriodic (const int axis) const
 
mappingCoordinateSystem getMappingCoordinateSystem () const
 
aString getName (const mappingItemName item) const
 
int getGridIndexRange (int side, int axis)
 
int getNumberOfGhostPoints (int side, int axis)
 
real getParameter (const MappingParameters::realParameter &param) const
 
int getParameter (const MappingParameters::intParameter &param) const
 
real getPeriodVector (const int axis, const int direction) const
 
Bound getRangeBound (const int side, const int axis) const
 
coordinateSystem getRangeCoordinateSystem () const
 
Bound getRangeCoordinateSystemBound (const int side, const int axis) const
 
int getRangeDimension () const
 
mappingSpace getRangeSpace () const
 
int getShare (const int side, const int axis) const
 
real getSignForJacobian () const
 
topologyEnum getTopology (const int side, const int axis) const
 
coordinateSingularity getTypeOfCoordinateSingularity (const int side, const int axis) const
 
bool gridIsValid () const
 
int hasACoordinateSingularity () const
 
intArray & topologyMask ()
 
void setArcLength (real length)
 
virtual void setBasicInverseOption (const basicInverseOptions option)
 
virtual void setBoundaryCondition (const int side, const int axis, const int bc)
 
virtual void setCoordinateEvaluationType (const coordinateSystem type, const int trueOrFalse)
 
virtual void setDomainBound (const int side, const int axis, const Bound domainBound)
 
virtual void setDomainCoordinateSystem (const coordinateSystem domainCoordinateSystem)
 
virtual void setDomainCoordinateSystemBound (const int side, const int axis, const Bound domainCoordinateSystemBound)
 
virtual void setDomainDimension (const int domainDimension)
 
virtual void setDomainSpace (const mappingSpace domainSpace)
 
virtual void setGrid (realArray &grid, IntegerArray &gridIndexRange)
 
virtual void setGridDimensions (const int axis, const int dim)
 
virtual void setInvertible (const int invertible)
 
void setID ()
 
virtual void setMappingCoordinateSystem (const mappingCoordinateSystem mappingCoordinateSystem0)
 
virtual void setName (const mappingItemName item, const aString &name)
 
void setGridIndexRange (int side, int axis, int num)
 
void setNumberOfGhostPoints (int side, int axis, int numGhost)
 
virtual void setParameter (const MappingParameters::realParameter &param, const real &value)
 
virtual void setParameter (const MappingParameters::intParameter &param, const int &value)
 
void setPartition (Partitioning_Type &partition)
 
virtual void setPeriodVector (const int axis, const int direction, const real periodVectorComponent)
 
virtual void setRangeBound (const int side, const int axis, const Bound rangeBound)
 
virtual void setRangeCoordinateSystem (const coordinateSystem rangeCoordinateSystem)
 
virtual void setRangeCoordinateSystemBound (const int side, const int axis, const Bound rangeCoordinateSystemBound)
 
virtual void setRangeDimension (const int rangeDimension)
 
virtual void setRangeSpace (const mappingSpace rangeSpace)
 
virtual void setShare (const int side, const int axis, const int share)
 
void setSignForJacobian (const real signForJac)
 
virtual void setTopology (const int side, const int axis, const topologyEnum topo)
 
virtual void setTypeOfCoordinateSingularity (const int side, const int axis, const coordinateSingularity)
 
bool usesDistributedInverse () const
 
bool usesDistributedMap () const
 
virtual void useRobustInverse (const bool trueOrFalse=TRUE)
 
bool usingRobustInverse () const
 Return true if the robust inverse is used.
 
virtual int outside (const realArray &x)
 
virtual int setNumberOfGhostLines (IndexRangeType &numberOfGhostLinesNew)
 
void setNumberOfDistributedGhostLines (int numGhost)
 
void periodicShift (realArray &r, const Index &I)
 
Index getIndex (const realArray &r, realArray &x, const realArray &xr, int &base, int &bound, int &computeMap, int &computeMapDerivative)
 
- Public Member Functions inherited from ReferenceCounting
 ReferenceCounting ()
 
 ReferenceCounting (const ReferenceCounting &x, const CopyType ct=DEEP)
 
virtual ~ReferenceCounting ()
 
Integer incrementReferenceCount ()
 
Integer decrementReferenceCount ()
 
Integer getReferenceCount () const
 
Logical uncountedReferencesMayExist ()
 
Integer getGlobalID () const
 
void setGlobalID (int id)
 
virtual void consistencyCheck () const
 

Protected Member Functions

void setup ()
 
- Protected Member Functions inherited from Mapping
int buildMappingParametersDialog (DialogData &dialog)
 
int getMappingParametersOption (const aString &answer, DialogData &dialog, GenericGraphicsInterface &gi)
 : Look for a change to one of the mapping parameters.
 
int updateMappingParametersDialog (DialogData &dialog)
 
void initializePartition ()
 
int mappingHasChanged ()
 
void setGridIsValid ()
 
void setDefaultMappingBounds (const mappingSpace ms, Bound mappingBound[3][2])
 
void setDefaultCoordinateSystemBounds (const coordinateSystem cs, Bound csBound[3][2])
 
int validSide (const int side) const
 
int validAxis (const int axis) const
 
void mappingError (const aString &subName, const int side, const int axis) const
 

Protected Attributes

aString className
 
IntegerArray iw
 
int numberOfLayers
 
int numberOfIntervals
 
int numberOfSplinePoints
 
int unInitialized
 
RealArray rw
 
int iopt
 
int ierr
 
real ra
 
real rb
 
real r0
 
real r1
 
RealArray abc
 
RealArray def
 
StretchingType stretchingType
 
bool normalized
 
real origin
 
real scale
 
real a0
 
real ar
 
real a1
 
real b1
 
real c1
 
real a0Normalized
 
real arNormalized
 
real a1Normalized
 
- Protected Attributes inherited from Mapping
int dataBaseID
 
aString className
 
int domainDimension
 
int rangeDimension
 
int bc [2][3]
 
int share [2][3]
 
periodicType isPeriodic [3]
 
real periodVector [3][3]
 
int invertible
 
basicInverseOptions basicInverseOption
 
int periodicityOfSpace
 
coordinateSingularity typeOfCoordinateSingularity [2][3]
 
int coordinateEvaluationType [numberOfCoordinateSystems]
 
IndexRangeType gridIndexRange
 
IndexRangeType numberOfGhostPoints
 
realArray grid
 
bool inverseIsDistributed
 
bool mapIsDistributed
 
int numberOfDistributedGhostLines
 
bool partitionInitialized
 
Partitioning_Type partition
 
mappingSpace domainSpace
 
mappingSpace rangeSpace
 
coordinateSystem domainCoordinateSystem
 
coordinateSystem rangeCoordinateSystem
 
mappingCoordinateSystem mappingCoordinateSystem0
 
Bound domainBound [3][2]
 
Bound rangeBound [3][2]
 
Bound domainCoordinateSystemBound [3][2]
 
Bound rangeCoordinateSystemBound [3][2]
 
topologyEnum topology [3][2]
 
intArray * topologyMaskPointer
 
real arcLength
 
bool remakeGrid
 
bool remakeGridSerial
 

Additional Inherited Members

- Static Public Member Functions inherited from Mapping
static void openDebugFiles ()
 
static void closeDebugFiles ()
 
static real epsilon ()
 
static void setMinimumNumberOfDistributedGhostLines (int numGhost)
 
static int getGridMinAndMax (const realArray &u, const Range &R1, const Range &R2, const Range &R3, real uMin[3], real uMax[3], bool local=false)
 
static MappingmakeMapping (const aString &mappingClassName)
 
static MappingLinkedListstaticMapList ()
 
- Public Attributes inherited from Mapping
int computeMap
 
int computeMapDerivative
 
int base
 
int bound
 
real signForJacobian
 
ApproximateGlobalInverseapproximateGlobalInverse
 
ExactLocalInverseexactLocalInverse
 
DistributedInversedistributedInverse
 
- Static Public Attributes inherited from Mapping
static int useInitialGuessForInverse =TRUE
 
static int debug =0
 
static FILE * debugFile =NULL
 
static FILE * pDebugFile =NULL
 
static const real bogus =10.
 
- Static Protected Attributes inherited from Mapping
static int defaultNumberOfGhostPoints =0
 
static int minimumNumberOfDistributedGhostLines =1
 

Member Enumeration Documentation

Enumerator
inverseHyperbolicTangent 
hyperbolicTangent 
exponential 
exponentialBlend 
exponentialToLinear 
noStretching 
linearSpacing 
numberOfStretchingTypes 

Constructor & Destructor Documentation

StretchMapping::StretchMapping ( const StretchingType stretchingType = noStretching)
StretchMapping::StretchMapping ( const int  numberOfLayers,
const int  numberOfIntervals = 0 
)
StretchMapping::StretchMapping ( const StretchMapping map,
const CopyType  copyType = DEEP 
)

References className, DEEP, and map().

StretchMapping::~StretchMapping ( )

References Mapping::debug.

Member Function Documentation

void StretchMapping::basicInverse ( const realArray x,
realArray r,
realArray rx = Overture::nullRealDistributedArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual

Reimplemented from Mapping.

References inverseMap().

void StretchMapping::basicInverseS ( const RealArray x,
RealArray r,
RealArray rx = Overture::nullRealArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual

Reimplemented from Mapping.

References inverseMapS().

void StretchMapping::display ( const aString label = blankString) const
virtual
int StretchMapping::get ( const GenericDataBase dir,
const aString name 
)
virtual
aString StretchMapping::getClassName ( void  ) const
inlinevirtual

Reimplemented from Mapping.

References className.

Referenced by operator=().

int StretchMapping::initialize ( )
void StretchMapping::inverseMap ( const realArray x,
realArray r,
realArray rx = Overture::nullRealDistributedArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual

Reimplemented from Mapping.

References getLocalArrayWithGhostBoundaries(), and inverseMapS().

Referenced by basicInverse().

void StretchMapping::inverseMapS ( const RealArray x,
RealArray r,
RealArray rx = Overture::nullRealArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual
Mapping * StretchMapping::make ( const aString mappingClassName)
virtual

Reimplemented from Mapping.

References className, NULL, and StretchMapping().

void StretchMapping::map ( const realArray r,
realArray x,
realArray xr = Overture::nullRealDistributedArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual
void StretchMapping::mapS ( const RealArray r,
RealArray x,
RealArray xr = Overture::nullRealArray(),
MappingParameters params = Overture::nullMappingParameters() 
)
virtual
StretchMapping & StretchMapping::operator= ( const StretchMapping X)
int StretchMapping::put ( GenericDataBase dir,
const aString name 
) const
virtual
int StretchMapping::setEndPoints ( const real  rmin,
const real  rmax 
)
int StretchMapping::setExponentialParameters ( const real a0,
const real ar,
const real a1,
const real b1,
const real c1 
)
int StretchMapping::setExponentialToLinearParameters ( const real a,
const real b,
const real c 
)
int StretchMapping::setHyperbolicTangentParameters ( const real a0,
const real ar,
const real a1,
const real b1,
const real c1 
)
int StretchMapping::setIntervalParameters ( const int  index,
const real  d,
const real  e,
const real  f 
)
int StretchMapping::setIsNormalized ( const bool &  trueOrFalse = TRUE)

References normalized.

Referenced by UserDefinedMapping1::update().

int StretchMapping::setIsPeriodic ( const int  trueOrFalse)
void StretchMapping::setIsPeriodic ( const int  axis,
const periodicType  isPeriodic 
)
virtual
int StretchMapping::setLayerParameters ( const int  index,
const real  a,
const real  b,
const real  c 
)
int StretchMapping::setLinearSpacingParameters ( const real a0,
const real a1 
)
int StretchMapping::setNumberOfIntervals ( const int  numberOfIntervals)
int StretchMapping::setNumberOfLayers ( const int  numberOfLayers)
int StretchMapping::setNumberOfSplinePoints ( const int  numberOfSplinePoints)
int StretchMapping::setScaleParameters ( const real  origin,
const real  scale 
)
int StretchMapping::setStretchingType ( const StretchingType stretchingType)
void StretchMapping::setup ( )
protected
int StretchMapping::update ( MappingInformation mapInfo)
virtual

Reimplemented from Mapping.

References a0, a1, abc, GenericGraphicsInterface::appendToTheDefaultPrompt(), ar, assert, aString, axis1, b1, c1, MappingInformation::command, MappingInformation::commandOption, def, display(), dr, GenericGraphicsInterface::erase(), exponential, exponentialBlend, exponentialToLinear, fabs(), FALSE, Mapping::getGridDimensions(), Mapping::getIsPeriodic(), GenericGraphicsInterface::getMenuItem(), Mapping::getName(), GI_MAPPING_COLOUR, GI_PLOT_THE_OBJECT_AND_EXIT, GI_TOP_LABEL, MappingInformation::graphXInterface, hyperbolicTangent, GenericGraphicsInterface::inputString(), MappingInformation::interactive, inverseHyperbolicTangent, linearSpacing, map(), Mapping::mappingHasChanged(), Mapping::mappingName, max(), normalized, noStretching, NULL, numberOfIntervals, numberOfLayers, numberOfSplinePoints, GenericGraphicsInterface::outputString(), PlotIt::plot(), printF(), R, r, r0, r1, ra, Mapping::rangeDimension, rb, MappingInformation::readOneCommand, REAL_MIN, Mapping::secondOrderDerivative(), GraphicsParameters::set(), DataPointMapping::setDataPoints(), setEndPoints(), Mapping::setGridDimensions(), setIsPeriodic(), Mapping::setIsPeriodic(), setNumberOfIntervals(), setNumberOfLayers(), setNumberOfSplinePoints(), setScaleParameters(), setStretchingType(), sPrintF(), sScanF(), GenericGraphicsInterface::stopReadingCommandFile(), stretchingType, TRUE, GenericGraphicsInterface::unAppendTheDefaultPrompt(), unInitialized, Mapping::update(), x, and xr.

Referenced by OffsetShell::buildOffsetMappings(), StretchedSquare::update(), HyperbolicMapping::updateMarchingSpacingOptions(), and HyperbolicMapping::updateOld().

Member Data Documentation

real StretchMapping::a0
protected
real StretchMapping::a0Normalized
protected

Referenced by get(), initialize(), mapS(), operator=(), and put().

real StretchMapping::a1
protected
real StretchMapping::a1Normalized
protected

Referenced by get(), initialize(), mapS(), operator=(), and put().

RealArray StretchMapping::abc
protected
real StretchMapping::ar
protected
real StretchMapping::arNormalized
protected

Referenced by get(), initialize(), mapS(), operator=(), and put().

real StretchMapping::b1
protected
real StretchMapping::c1
protected
aString StretchMapping::className
protected
RealArray StretchMapping::def
protected
int StretchMapping::ierr
protected

Referenced by initialize(), inverseMapS(), and mapS().

int StretchMapping::iopt
protected
IntegerArray StretchMapping::iw
protected
bool StretchMapping::normalized
protected
int StretchMapping::numberOfIntervals
protected
int StretchMapping::numberOfLayers
protected
int StretchMapping::numberOfSplinePoints
protected
real StretchMapping::origin
protected
real StretchMapping::r0
protected
real StretchMapping::r1
protected
real StretchMapping::ra
protected
real StretchMapping::rb
protected
RealArray StretchMapping::rw
protected
real StretchMapping::scale
protected
StretchingType StretchMapping::stretchingType
protected
int StretchMapping::unInitialized
protected

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