CG  Version 25
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
InterfaceTransfer Class Reference

#include <InterfaceTransfer.h>

Public Member Functions

 InterfaceTransfer ()
 : Constructor for the class used to transfer information across an interface between
 
 ~InterfaceTransfer ()
 : Destructor for the class used to transfer information across an interface between
 
int initialize (InterfaceDescriptor &interfaceDescriptor, std::vector< DomainSolver * > domainSolver, std::vector< int > &gfIndex, Parameters &parameters)
 : Initialize the interface transfer.
 
int setInterpolationWidth (int width, int interfaceSide=-1)
 : Set the interface transfer interpolation widths
 
int transferData (int domainSource, int domainTarget, RealArray **sourceDataArray, Range &Cs, RealArray **targetDataArray, Range &Ct, InterfaceDescriptor &interfaceDescriptor, std::vector< DomainSolver * > domainSolver, std::vector< int > &gfIndex, Parameters &parameters)
 : Transfer the interface data from one domain to another.
 

Static Public Member Functions

static int setDefaultInterpolationWidth (int width, int interfaceSide=-1)
 : Set the default interface transfer interpolation widths. These values will apply when new InterfaceTransfer objects are built. This is a static function that can be called before any class objects are constructed.
 

Protected Member Functions

int internalInterpolate (RealArray **sourceDataArray, Range &Cs, RealArray **targetDataArray, Range &Ct, CompositeGrid &cg, int interfaceSide)
 

Protected Attributes

int initialized
 
InterpolatePointsOnAGrid * interpolatePointsOnAGrid
 
IntegerArray * indirectionArray
 
int interpolationWidth [2]
 

Static Protected Attributes

static int defaultInterpolationWidth [2] ={2,2}
 

Constructor & Destructor Documentation

InterfaceTransfer::InterfaceTransfer ( )

: Constructor for the class used to transfer information across an interface between

References defaultInterpolationWidth, indirectionArray, initialized, interpolatePointsOnAGrid, and interpolationWidth.

InterfaceTransfer::~InterfaceTransfer ( )

: Destructor for the class used to transfer information across an interface between

References indirectionArray, and interpolatePointsOnAGrid.

Member Function Documentation

int InterfaceTransfer::initialize ( InterfaceDescriptor interfaceDescriptor,
std::vector< DomainSolver * >  domainSolver,
std::vector< int > &  gfIndex,
Parameters parameters 
)

: Initialize the interface transfer.

Parameters
interfaceDescriptor(input): defines the interface.
domainSolver(input) : holds PDE solvers for each domain
parameters(input) : parameters from Cgmp

This function will query the interface and build the transfer function that can transfer (interpolate) the interface values from one side of the interface to the other. Currently this is implemented by interpolating points from one side to the other. In the future we may want options to transfer data so that certain quantities are conserved.

References assert(), axis, GridFaceDescriptor::axis, cg, ci, Parameters::dbase, dir, GridFaceDescriptor::domain, InterfaceDescriptor::domain1, InterfaceDescriptor::domain2, eps, FOR_3D, GridFaceDescriptor::grid, grid, gridIsOnInterface, InterfaceDescriptor::gridListSide1, InterfaceDescriptor::gridListSide2, i, i1, I1, i2, I2, i3, I3, includeGhost, indirectionArray, initialized, interpolatePointsOnAGrid, interpolationWidth, J1, J2, J3, mask, maskLocal, mg, np, ok, OV_ABORT(), printF(), side, and GridFaceDescriptor::side.

Referenced by transferData().

int InterfaceTransfer::internalInterpolate ( RealArray **  sourceDataArray,
Range &  Cs,
RealArray **  targetDataArray,
Range &  Ct,
CompositeGrid &  cg,
int  interfaceSide 
)
protected
int InterfaceTransfer::setDefaultInterpolationWidth ( int  width,
int  interfaceSide = -1 
)
static

: Set the default interface transfer interpolation widths. These values will apply when new InterfaceTransfer objects are built. This is a static function that can be called before any class objects are constructed.

Parameters
width(input) : set the interpolation width (positive integer)
interfaceSide(input) : if interfaceSide=-1 then set both transfer directions. If interfaceSide=dir set the width for transfer direction "dir", dir=0 or dir=1.

References defaultInterpolationWidth, and printF().

int InterfaceTransfer::setInterpolationWidth ( int  width,
int  interfaceSide = -1 
)

: Set the interface transfer interpolation widths

Parameters
width(input) : set the interpolation width (positive integer)
interfaceSide(input) : if interfaceSide=-1 then set both transfer directions. If interfaceSide=dir set the width for transfer direction "dir", dir=0 or dir=1.

References interpolationWidth, and printF().

int InterfaceTransfer::transferData ( int  domainSource,
int  domainTarget,
RealArray **  sourceDataArray,
Range &  Cs,
RealArray **  targetDataArray,
Range &  Ct,
InterfaceDescriptor interfaceDescriptor,
std::vector< DomainSolver * >  domainSolver,
std::vector< int > &  gfIndex,
Parameters parameters 
)

: Transfer the interface data from one domain to another.

Parameters
domainSource,domainTarget(input) : domain identifiers for the source domain and target domain.
targetDataArray[grid](input) : pointer to an array of data on the interface from domainTarget (if non-null)
Ct(input) : target components to fill in.
sourceDataArray[grid]: pointer to an array of data on the interface from domainSource (if non-null)
Cs(input) : source components to fill in.
interfaceDescriptor(input): defines the interface.
domainSolver(input) : holds PDE solvers for each domain
parameters(input) : parameters from Cgmp

This function will query the interface and build the transfer function that can transfer (interpolate) the inteface values from one side of the interface to the other.

References assert(), cg, ci, display(), InterfaceDescriptor::domain1, InterfaceDescriptor::domain2, grid, i, initialize(), initialized, internalInterpolate(), interpolatePointsOnAGrid, and printF().

Referenced by Cgmp::assignInterfaceRightHandSide(), Cgmp::assignInterfaceRightHandSideOld(), and Cgmp::getInterfaceResiduals().

Member Data Documentation

int InterfaceTransfer::defaultInterpolationWidth ={2,2}
staticprotected
IntegerArray* InterfaceTransfer::indirectionArray
protected
int InterfaceTransfer::initialized
protected
InterpolatePointsOnAGrid* InterfaceTransfer::interpolatePointsOnAGrid
protected
int InterfaceTransfer::interpolationWidth[2]
protected

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