Chombo + EB + MF  3.2
Macros | Functions
MBMiscUtil.H File Reference
#include "FArrayBox.H"
#include "LevelData.H"
#include "RealVect.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Include dependency graph for MBMiscUtil.H:

Go to the source code of this file.

Macros

#define _MBMISCUTIL_H_
 

Functions

Box intersectOffset (const Box &a_inputBox, const Box &a_domainBox, const IntVect &a_offset)
 return a_inputBox intersected with a version of a_domainBox extended indefinitely below if offset is -1 and above if offset is +1 More...
 
void order2gradient (FArrayBox &a_gradFab, const Box &a_gradBox, const FArrayBox &a_dataFab, const Box &a_dataBox, const Vector< int > &a_interpDimsVect)
 
void order2gradient (LevelData< FArrayBox > &a_gradData, const LevelData< FArrayBox > &a_data, Vector< int > a_interpDimsVect)
 returns a_gradData = gradient(a_data) on wherever a_data is defined minus 1 layer More...
 
int faceDimension (const Box &a_box)
 returns the dimension of the faces of a_box; crashes if not on faces of codimension 1 More...
 
Box faceSlice (const Box &a_gridBox, int a_idir, Side::LoHiSide a_side, const Box &a_blockBox)
 returns the faces of a_gridBox that are on the (a_idir, a_side) face of a_blockBox More...
 
RealVect centeringOffset (const Box &a_box, const RealVect &a_dxVect)
 component d of return value is a_dxVect[d]/2 if a_box is cell-centered in dimension d, and 0 if node-centered in dimension d. For a d-face-centered box, returns 0 in dimension d, and a_dxVect/2 in other dimensions. More...
 
Vector< RealVectorRealVectToReal (const Vector< RealVect > &a_rv)
 convert Vector<RealVect> to Vector<Real> More...
 
Vector< RealVectVectorRealToRealVect (const Vector< Real > &a_r)
 convert Vector<Real> to Vector<RealVect> More...
 
void minBoxGlobal (Box &a_bx)
 change a_bx to its minBox across all processors More...
 
int minBufferSizeAMR (const Vector< int > &a_refRatio, int a_maxLevel, int a_numGhost, int a_order=4, bool a_fromJU=true)
 
int ceilRatio (int a_num, int a_denom)
 returns ceil(a_num / a_denom) More...
 
IntVect ceilRatio (const IntVect &a_num, const IntVect &a_denom)
 returns ceil(a_num / a_denom) component by component More...
 
Real dotSubvectors (const Vector< Real > &a_vec1, int a_start1, const Vector< Real > &a_vec2, int a_start2, int a_length)
 
void addPowersPoint (Vector< Real > &a_powers, const RealVect &a_x, const Vector< IntVect > &a_exponents, Real a_weight)
 
void addPowersVector (Vector< Real > &a_powers, const RealVect &a_x, const Vector< IntVect > &a_exponents, Real a_weight, const Real *const a_vecTransform)
 

Macro Definition Documentation

◆ _MBMISCUTIL_H_

#define _MBMISCUTIL_H_

Function Documentation

◆ intersectOffset()

Box intersectOffset ( const Box a_inputBox,
const Box a_domainBox,
const IntVect a_offset 
)

return a_inputBox intersected with a version of a_domainBox extended indefinitely below if offset is -1 and above if offset is +1

◆ order2gradient() [1/2]

void order2gradient ( FArrayBox a_gradFab,
const Box a_gradBox,
const FArrayBox a_dataFab,
const Box a_dataBox,
const Vector< int > &  a_interpDimsVect 
)

Returns dx * gradient of a_dataFab, using a second-order formula. Takes data in a_dataFab available on a_dataBox and returns dx * gradient in a_gradFab on a_gradBox.

Order of components within a_gradFab, with 2D vector data: difference in data[0] in direction 0; difference in data[1] in direction 0; difference in data[0] in direction 1; difference in data[1] in direction 1.

That is: dData[0]/dx[0], dData[1]/dx[0], dData[0]/dx[1], dData[1]/dx[1].

◆ order2gradient() [2/2]

void order2gradient ( LevelData< FArrayBox > &  a_gradData,
const LevelData< FArrayBox > &  a_data,
Vector< int >  a_interpDimsVect 
)

returns a_gradData = gradient(a_data) on wherever a_data is defined minus 1 layer

◆ faceDimension()

int faceDimension ( const Box a_box)

returns the dimension of the faces of a_box; crashes if not on faces of codimension 1

◆ faceSlice()

Box faceSlice ( const Box a_gridBox,
int  a_idir,
Side::LoHiSide  a_side,
const Box a_blockBox 
)

returns the faces of a_gridBox that are on the (a_idir, a_side) face of a_blockBox

◆ centeringOffset()

RealVect centeringOffset ( const Box a_box,
const RealVect a_dxVect 
)

component d of return value is a_dxVect[d]/2 if a_box is cell-centered in dimension d, and 0 if node-centered in dimension d. For a d-face-centered box, returns 0 in dimension d, and a_dxVect/2 in other dimensions.

◆ VectorRealVectToReal()

Vector<Real> VectorRealVectToReal ( const Vector< RealVect > &  a_rv)

◆ VectorRealToRealVect()

Vector<RealVect> VectorRealToRealVect ( const Vector< Real > &  a_r)

◆ minBoxGlobal()

void minBoxGlobal ( Box a_bx)

change a_bx to its minBox across all processors

◆ minBufferSizeAMR()

int minBufferSizeAMR ( const Vector< int > &  a_refRatio,
int  a_maxLevel,
int  a_numGhost,
int  a_order = 4,
bool  a_fromJU = true 
)

◆ ceilRatio() [1/2]

int ceilRatio ( int  a_num,
int  a_denom 
)

returns ceil(a_num / a_denom)

◆ ceilRatio() [2/2]

IntVect ceilRatio ( const IntVect a_num,
const IntVect a_denom 
)

returns ceil(a_num / a_denom) component by component

◆ dotSubvectors()

Real dotSubvectors ( const Vector< Real > &  a_vec1,
int  a_start1,
const Vector< Real > &  a_vec2,
int  a_start2,
int  a_length 
)

◆ addPowersPoint()

void addPowersPoint ( Vector< Real > &  a_powers,
const RealVect a_x,
const Vector< IntVect > &  a_exponents,
Real  a_weight 
)

◆ addPowersVector()

void addPowersVector ( Vector< Real > &  a_powers,
const RealVect a_x,
const Vector< IntVect > &  a_exponents,
Real  a_weight,
const Real *const  a_vecTransform 
)