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

#include <EllipticGridGenerator.h>

Collaboration diagram for EllipticGridGenerator:
Collaboration graph
[legend]

Public Types

enum  BoundaryConditionTypes {
  dirichlet =1, slipOrthogonal =2, noSlipOrthogonalAndSpecifiedSpacing =3, noSlipOrthogonal,
  freeFloating
}
 
enum  SmoothingTypes {
  jacobiSmooth, redBlackSmooth, lineSmooth, line1Smooth,
  line2Smooth, line3Smooth, zebraSmooth, numberOfSmoothingTypes
}
 

Public Member Functions

 EllipticGridGenerator ()
 
 EllipticGridGenerator (const EllipticGridGenerator &oldEllipticGridGenerator)
 
 ~EllipticGridGenerator ()
 
int generateGrid ()
 
void setup (Mapping &map, Mapping *projectionMapping=NULL)
 
const RealMappedGridFunction & solution () const
 
int weightFunction (RealMappedGridFunction &weight)
 
int startingGrid (const realArray &u0, const realArray &r0=Overture::nullRealDistributedArray(), const IntegerArray &indexBounds=Overture::nullIntArray())
 
int update (DataPointMapping &dpm, GenericGraphicsInterface *gi=NULL, GraphicsParameters &parameters=Overture::defaultGraphicsParameters())
 

Public Attributes

int domainDimension
 
int rangeDimension
 

Protected Member Functions

int applyBoundaryConditions (const int &level, RealMappedGridFunction &uu)
 
int coarseToFine (const int &level, const RealMappedGridFunction &uCoarse, RealMappedGridFunction &uFine, const bool &isAGridFunction=FALSE)
 
int defineBoundaryControlFunction ()
 
int defineSurfaceControlFunction ()
 
int determineBoundarySpacing (const int &side, const int &axis, real &averageSpacing, real &minimumSpacing, real &maximumSpacing)
 
realArray dot (const realArray &a, const realArray &b, const Index &I1=nullIndex, const Index &I2=nullIndex, const Index &I3=nullIndex)
 
int estimateUnderRelaxationCoefficients ()
 
int fineToCoarse (const int &level, const RealMappedGridFunction &uFine, RealMappedGridFunction &uCoarse, const bool &isAGridFunction=FALSE)
 
int getCoefficients (realArray &coeff, const Index &J1, const Index &J2, const Index &J3, const realArray &ur, const realArray &us, const realArray &ut=Overture::nullRealDistributedArray())
 
int getControlFunctions (const int &level)
 
int jacobi (const int &level, RealMappedGridFunction &uu)
 
int restrictMovement (const int &level, const RealMappedGridFunction &u0, RealMappedGridFunction &u1, const Index &I1=nullIndex, const Index &I2=nullIndex, const Index &I3=nullIndex)
 
int smoothJacobi (RealMappedGridFunction &w, const int &numberOfSmooths=4)
 
int lineSmoother (const int &direction, const int &level, RealMappedGridFunction &u)
 
int multigridVcycle (const int &level)
 
int redBlack (const int &level, RealMappedGridFunction &uu)
 
void getResidual (realArray &resid1, const int &level)
 
void getResidual (realArray &resid1, const int &level, Index Jv[3], realArray &coeff, const bool &computeCoefficients=TRUE, const bool &includeRightHandSide=TRUE, const bool &computeControlFunctions=TRUE, const SmoothingTypes &lineSmoothType=jacobiSmooth)
 
int projectBoundaryPoints (const int &level, RealMappedGridFunction &uu, const int &side, const int &axis, const Index &I1, const Index &I2, const Index &I3)
 
int periodicUpdate (RealMappedGridFunction &x, const Range &C=nullRange, const bool &isAGridFunction=TRUE)
 
int plot (const RealMappedGridFunction &v, const aString &label)
 
realArray signOf (const realArray &uarray)
 
int smooth (const int &level, const SmoothingTypes &smoothingType, const int &numberOfSubIterations=1)
 
int stretchTheGrid (Mapping &mapToStretch)
 
int updateForNewBoundaryConditions ()
 
void updateRightHandSideWithFASCorrection (int level)
 
int initializeParameters ()
 

Protected Attributes

Mapping * userMap
 
Mapping * projectionMap
 
Mapping * boundaryProjectionMap [2][3]
 
IntegerArray subSurfaceIndex
 
realArray subSurfaceNormal
 
int numberOfLevels
 
int maximumNumberOfLevels
 
int maximumNumberOfIterations
 
SmoothingTypes smoothingMethod
 
Mapping * map
 
MappedGrid * mg
 
MappedGridOperators * operators
 
realMappedGridFunction * u
 
Range Rx
 
Range Rr
 
RealMappedGridFunction * source
 
RealMappedGridFunction * rhs
 
RealMappedGridFunction * w
 
bool userWeightFunctionDefined
 
RealMappedGridFunction * pWeight
 
RealArray dx
 
real residualTolerance
 
real omega
 
RealArray omegaMax
 
int numberOfPeriods
 
int useBlockTridiag
 
intArray boundaryCondition
 
realArray boundarySpacing
 
RealMappedGridFunction * rBoundary
 
RealMappedGridFunction * xBoundary
 
IntegerArray gridIndex
 
int numberOfLinesOfAttraction
 
IntegerArray lineAttractionDirection
 
RealArray lineAttractionParameters
 
int numberOfPointsOfAttraction
 
RealArray pointAttractionParameters
 
real normalCurvatureWeight
 
real residualNormalizationFactor
 
bool useNewStuff
 
int debug
 
TridiagonalSolver * tridiagonalSolver
 
bool controlFunctions
 
bool controlFunctionComputed
 
bool applyBoundarySourceControlFunction
 
GenericGraphicsInterface * ps
 
GraphicsParameters psp
 
real maximumResidual
 
real previousMaximumResidual
 
int numberOfCoefficients
 
char buff [80]
 
FILE * debugFile
 
aString smootherNames [numberOfSmoothingTypes]
 
real work
 

Member Enumeration Documentation

Enumerator
dirichlet 
slipOrthogonal 
noSlipOrthogonalAndSpecifiedSpacing 
noSlipOrthogonal 
freeFloating 
Enumerator
jacobiSmooth 
redBlackSmooth 
lineSmooth 
line1Smooth 
line2Smooth 
line3Smooth 
zebraSmooth 
numberOfSmoothingTypes 

Constructor & Destructor Documentation

EllipticGridGenerator::EllipticGridGenerator ( )
EllipticGridGenerator::EllipticGridGenerator ( const EllipticGridGenerator &  oldEllipticGridGenerator)
EllipticGridGenerator::~EllipticGridGenerator ( )

Member Function Documentation

int EllipticGridGenerator::applyBoundaryConditions ( const int &  level,
RealMappedGridFunction &  uu 
)
protected
int EllipticGridGenerator::coarseToFine ( const int &  level,
const RealMappedGridFunction &  uCoarse,
RealMappedGridFunction &  uFine,
const bool &  isAGridFunction = FALSE 
)
protected
int EllipticGridGenerator::defineBoundaryControlFunction ( )
protected
int EllipticGridGenerator::defineSurfaceControlFunction ( )
protected
int EllipticGridGenerator::determineBoundarySpacing ( const int &  side,
const int &  axis,
real &  averageSpacing,
real &  minimumSpacing,
real &  maximumSpacing 
)
protected
realArray EllipticGridGenerator::dot ( const realArray &  a,
const realArray &  b,
const Index &  I1 = nullIndex,
const Index &  I2 = nullIndex,
const Index &  I3 = nullIndex 
)
protected

References evaluate(), and rangeDimension.

Referenced by restrictMovement().

int EllipticGridGenerator::estimateUnderRelaxationCoefficients ( )
protected
int EllipticGridGenerator::fineToCoarse ( const int &  level,
const RealMappedGridFunction &  uFine,
RealMappedGridFunction &  uCoarse,
const bool &  isAGridFunction = FALSE 
)
protected
int EllipticGridGenerator::generateGrid ( )
int EllipticGridGenerator::getCoefficients ( realArray &  coeff,
const Index &  J1,
const Index &  J2,
const Index &  J3,
const realArray &  ur,
const realArray &  us,
const realArray &  ut = Overture::nullRealDistributedArray() 
)
protected

References domainDimension, evaluate(), rangeDimension, and xr.

Referenced by getResidual(), and redBlack().

int EllipticGridGenerator::getControlFunctions ( const int &  level)
protected
void EllipticGridGenerator::getResidual ( realArray &  resid1,
const int &  level 
)
protected
void EllipticGridGenerator::getResidual ( realArray &  resid1,
const int &  level,
Index  Jv[3],
realArray &  coeff,
const bool &  computeCoefficients = TRUE,
const bool &  includeRightHandSide = TRUE,
const bool &  computeControlFunctions = TRUE,
const SmoothingTypes &  lineSmoothType = jacobiSmooth 
)
protected
int EllipticGridGenerator::initializeParameters ( )
protected
int EllipticGridGenerator::jacobi ( const int &  level,
RealMappedGridFunction &  uu 
)
protected
int EllipticGridGenerator::lineSmoother ( const int &  direction,
const int &  level,
RealMappedGridFunction &  u 
)
protected
int EllipticGridGenerator::multigridVcycle ( const int &  level)
protected
int EllipticGridGenerator::periodicUpdate ( RealMappedGridFunction &  x,
const Range &  C = nullRange,
const bool &  isAGridFunction = TRUE 
)
protected
int EllipticGridGenerator::plot ( const RealMappedGridFunction &  v,
const aString &  label 
)
protected
int EllipticGridGenerator::projectBoundaryPoints ( const int &  level,
RealMappedGridFunction &  uu,
const int &  side,
const int &  axis,
const Index &  I1,
const Index &  I2,
const Index &  I3 
)
protected
int EllipticGridGenerator::redBlack ( const int &  level,
RealMappedGridFunction &  uu 
)
protected
int EllipticGridGenerator::restrictMovement ( const int &  level,
const RealMappedGridFunction &  u0,
RealMappedGridFunction &  u1,
const Index &  I1 = nullIndex,
const Index &  I2 = nullIndex,
const Index &  I3 = nullIndex 
)
protected
void EllipticGridGenerator::setup ( Mapping &  map,
Mapping *  projectionMapping = NULL 
)
realArray EllipticGridGenerator::signOf ( const realArray &  uarray)
protected

Referenced by getControlFunctions().

int EllipticGridGenerator::smooth ( const int &  level,
const SmoothingTypes &  smoothingType,
const int &  numberOfSubIterations = 1 
)
protected
int EllipticGridGenerator::smoothJacobi ( RealMappedGridFunction &  w,
const int &  numberOfSmooths = 4 
)
protected
const RealMappedGridFunction & EllipticGridGenerator::solution ( ) const
int EllipticGridGenerator::startingGrid ( const realArray &  u0,
const realArray &  r0 = Overture::nullRealDistributedArray(),
const IntegerArray &  indexBounds = Overture::nullIntArray() 
)
int EllipticGridGenerator::stretchTheGrid ( Mapping &  mapToStretch)
protected
int EllipticGridGenerator::update ( DataPointMapping &  dpm,
GenericGraphicsInterface *  gi = NULL,
GraphicsParameters &  parameters = Overture::defaultGraphicsParameters() 
)

References A, GenericGraphicsInterface::appendToTheDefaultPrompt(), applyBoundaryConditions(), applyBoundarySourceControlFunction, aString, boundaryCondition, boundarySpacing, buff, PlotIt::contour(), controlFunctionComputed, debug, determineBoundarySpacing(), dirichlet, domainDimension, End, GenericGraphicsInterface::erase(), FALSE, freeFloating, generateGrid(), getControlFunctions(), Mapping::getGrid(), GenericGraphicsInterface::getMenuItem(), getResidual(), GI_PLOT_THE_OBJECT_AND_EXIT, GI_TOP_LABEL, gridIndexRange, GenericGraphicsInterface::inputString(), jacobiSmooth, line1Smooth, line2Smooth, line3Smooth, lineAttractionDirection, lineAttractionParameters, lineSmooth, maximumNumberOfIterations, maximumNumberOfLevels, mg, normalCurvatureWeight, noSlipOrthogonal, noSlipOrthogonalAndSpecifiedSpacing, numberOfLevels, numberOfLinesOfAttraction, numberOfPeriods, numberOfPointsOfAttraction, omega, GenericGraphicsInterface::outputString(), PlotIt::plot(), pointAttractionParameters, ps, psp, REAL_EPSILON, redBlackSmooth, residualTolerance, Rx, S, GraphicsParameters::set(), DataPointMapping::setDataPoints(), slipOrthogonal, smooth(), smoothingMethod, source, sPrintF(), sScanF(), Start, startingGrid(), GenericGraphicsInterface::stopReadingCommandFile(), stretchTheGrid(), TRUE, u, GenericGraphicsInterface::unAppendTheDefaultPrompt(), updateForNewBoundaryConditions(), useBlockTridiag, useNewStuff, userMap, and zebraSmooth.

Referenced by EllipticTransform::generateGrid(), and HyperbolicMapping::smooth().

int EllipticGridGenerator::updateForNewBoundaryConditions ( )
protected
void EllipticGridGenerator::updateRightHandSideWithFASCorrection ( int  level)
protected
int EllipticGridGenerator::weightFunction ( RealMappedGridFunction &  weight)

Member Data Documentation

bool EllipticGridGenerator::applyBoundarySourceControlFunction
protected
intArray EllipticGridGenerator::boundaryCondition
protected
Mapping* EllipticGridGenerator::boundaryProjectionMap[2][3]
protected
realArray EllipticGridGenerator::boundarySpacing
protected
char EllipticGridGenerator::buff[80]
protected
bool EllipticGridGenerator::controlFunctionComputed
protected
bool EllipticGridGenerator::controlFunctions
protected
int EllipticGridGenerator::debug
protected
FILE* EllipticGridGenerator::debugFile
protected
int EllipticGridGenerator::domainDimension
RealArray EllipticGridGenerator::dx
protected
IntegerArray EllipticGridGenerator::gridIndex
protected
IntegerArray EllipticGridGenerator::lineAttractionDirection
protected

Referenced by getControlFunctions(), and update().

RealArray EllipticGridGenerator::lineAttractionParameters
protected

Referenced by getControlFunctions(), and update().

Mapping* EllipticGridGenerator::map
protected
int EllipticGridGenerator::maximumNumberOfIterations
protected
int EllipticGridGenerator::maximumNumberOfLevels
protected
real EllipticGridGenerator::maximumResidual
protected
MappedGrid* EllipticGridGenerator::mg
protected
real EllipticGridGenerator::normalCurvatureWeight
protected
int EllipticGridGenerator::numberOfCoefficients
protected
int EllipticGridGenerator::numberOfLevels
protected
int EllipticGridGenerator::numberOfLinesOfAttraction
protected
int EllipticGridGenerator::numberOfPeriods
protected
int EllipticGridGenerator::numberOfPointsOfAttraction
protected
real EllipticGridGenerator::omega
protected
RealArray EllipticGridGenerator::omegaMax
protected
MappedGridOperators* EllipticGridGenerator::operators
protected
RealArray EllipticGridGenerator::pointAttractionParameters
protected

Referenced by getControlFunctions(), and update().

real EllipticGridGenerator::previousMaximumResidual
protected
Mapping* EllipticGridGenerator::projectionMap
protected
GenericGraphicsInterface* EllipticGridGenerator::ps
protected

Referenced by initializeParameters(), plot(), and update().

GraphicsParameters EllipticGridGenerator::psp
protected

Referenced by plot(), and update().

RealMappedGridFunction* EllipticGridGenerator::pWeight
protected
int EllipticGridGenerator::rangeDimension
RealMappedGridFunction* EllipticGridGenerator::rBoundary
protected
real EllipticGridGenerator::residualNormalizationFactor
protected
real EllipticGridGenerator::residualTolerance
protected
RealMappedGridFunction* EllipticGridGenerator::rhs
protected
Range EllipticGridGenerator::Rr
protected
Range EllipticGridGenerator::Rx
protected
aString EllipticGridGenerator::smootherNames[numberOfSmoothingTypes]
protected
SmoothingTypes EllipticGridGenerator::smoothingMethod
protected
RealMappedGridFunction* EllipticGridGenerator::source
protected
IntegerArray EllipticGridGenerator::subSurfaceIndex
protected

Referenced by projectBoundaryPoints().

realArray EllipticGridGenerator::subSurfaceNormal
protected

Referenced by projectBoundaryPoints().

TridiagonalSolver* EllipticGridGenerator::tridiagonalSolver
protected
realMappedGridFunction* EllipticGridGenerator::u
protected
int EllipticGridGenerator::useBlockTridiag
protected
bool EllipticGridGenerator::useNewStuff
protected

Referenced by initializeParameters(), and update().

Mapping* EllipticGridGenerator::userMap
protected
bool EllipticGridGenerator::userWeightFunctionDefined
protected
RealMappedGridFunction * EllipticGridGenerator::w
protected
real EllipticGridGenerator::work
protected
RealMappedGridFunction* EllipticGridGenerator::xBoundary
protected

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