Chombo + EB  3.2
Classes | Macros | Typedefs | Functions
BCFunc.H File Reference
#include "IntVect.H"
#include "RealVect.H"
#include "FArrayBox.H"
#include "LevelData.H"
#include "ProblemDomain.H"
#include "RefCountedPtr.H"
#include "DataIndex.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Include dependency graph for BCFunc.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BCFunction
 
class  BCHolder
 
class  BCValueFunction
 
class  BCValueHolder
 
class  BCFuncWrapper
 this BCFunction simply wraps a BCFunc More...
 
class  ConstBCFunction
 

Macros

#define _BCFUNC_H_
 

Typedefs

typedef void(* BCFunc) (FArrayBox &a_state, const Box &a_valid, const ProblemDomain &a_domain, Real a_dx, bool a_homogeneous)
 
typedef void(* BCValueFunc) (Real *a_pos, int *a_dir, Side::LoHiSide *a_side, Real *a_value)
 

Functions

void doNothingBC (FArrayBox &a_state, const Box &a_valid, const ProblemDomain &a_domain, Real a_dx, bool a_homogeneous)
 For use with pure periodic BC. More...
 
RefCountedPtr< BCFunctionConstDiriNeumBC (const IntVect &a_loSideType, const RealVect &a_loSideValue, const IntVect &a_hiSideType, const RealVect &a_hiSideValue)
 
void NeumBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, const BCValueHolder &a_value, int a_dir, Side::LoHiSide a_side, Interval &a_interval)
 
void NeumBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, const BCValueHolder &a_value, int a_dir, Side::LoHiSide a_side)
 
void NeumBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, BCValueHolder a_value)
 
void DiriBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, BCValueHolder a_value, int a_dir, Side::LoHiSide a_side, Interval &a_interval, int a_order=1)
 
void DiriBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, BCValueHolder a_value, int a_dir, Side::LoHiSide a_side, int a_order=1)
 
void DiriBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, bool a_homogeneous, BCValueHolder a_value, int a_order=1)
 
void NoSlipVectorBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, int a_dir, Side::LoHiSide a_side, int a_order=2)
 
void ReflectiveVectorBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, int a_dir, Side::LoHiSide a_side, int a_order=2)
 
void ExtrapolateBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, int a_dir, Side::LoHiSide a_side, Interval &a_interval, int a_order=1)
 
void ExtrapolateBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, int a_dir, Side::LoHiSide a_side, int a_order=1)
 
void ExtrapolateBC (FArrayBox &a_state, const Box &a_valid, Real a_dx, int a_order=1)
 

Macro Definition Documentation

◆ _BCFUNC_H_

#define _BCFUNC_H_

Typedef Documentation

◆ BCFunc

typedef void(* BCFunc) (FArrayBox &a_state, const Box &a_valid, const ProblemDomain &a_domain, Real a_dx, bool a_homogeneous)

function interface for ghost cell boundary conditions of AMRPoissonOp. If you are using Neumann or Dirichlet boundary conditions, it is easiest to use the functions provided.

◆ BCValueFunc

typedef void(* BCValueFunc) (Real *a_pos, int *a_dir, Side::LoHiSide *a_side, Real *a_value)

given pos [x,y,z] position on center of cell edge int dir direction, x being 0 int side -1 for low, +1 = high, fill in the a_values array

Function Documentation

◆ doNothingBC()

void doNothingBC ( FArrayBox a_state,
const Box a_valid,
const ProblemDomain a_domain,
Real  a_dx,
bool  a_homogeneous 
)

For use with pure periodic BC.

◆ ConstDiriNeumBC()

RefCountedPtr<BCFunction> ConstDiriNeumBC ( const IntVect a_loSideType,
const RealVect a_loSideValue,
const IntVect a_hiSideType,
const RealVect a_hiSideValue 
)

A helper function to produce the needed object for constant Dirichlet/Neumann on all the faces. The return value can be passed to anything expecting a BCFunction/BCHolder.

"a_loSideType/a_hiSideType" specify the type of boundary condition in a given direction by having the enter corresponding to the direction set to 0 for Neumann or 1 for Dirichlet (on the low or high side, respectively). "a_loSideValue/a_hiSideValue" specify the (constant) value for boundary condition specified above.

For example, in 2D if "a_loSideType" = (1,0), "a_hiSideType" = (1,1), "a_loSideValue" = (0.0,1.0) and "a_hiSideValue" = (0.0,0.0) then the boundary conditions are:

   Low  side x:  Dirichlet = 0.0
   Low  side y:  Neumann   = 1.0
   High side x:  Dirichlet = 0.0
   High side y:  Dirichlet = 0.0

◆ NeumBC() [1/3]

void NeumBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
const BCValueHolder a_value,
int  a_dir,
Side::LoHiSide  a_side,
Interval a_interval 
)

Neumann bc for a particular side, specified component interval For use in AMRPoissonOp.

◆ NeumBC() [2/3]

void NeumBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
const BCValueHolder a_value,
int  a_dir,
Side::LoHiSide  a_side 
)

Neumann bc for a particular side, all components For use in AMRPoissonOp.

◆ NeumBC() [3/3]

void NeumBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
BCValueHolder  a_value 
)

Neumann bcs for all sides For use in AMRPoissonOp.

◆ DiriBC() [1/3]

void DiriBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
BCValueHolder  a_value,
int  a_dir,
Side::LoHiSide  a_side,
Interval a_interval,
int  a_order = 1 
)

Dirichlet boundary conditions for a side, specified component interval For use in AMRPoissonOp.

◆ DiriBC() [2/3]

void DiriBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
BCValueHolder  a_value,
int  a_dir,
Side::LoHiSide  a_side,
int  a_order = 1 
)

Dirichlet boundary conditions for a side, all components. For use in AMRPoissonOp.

◆ DiriBC() [3/3]

void DiriBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
bool  a_homogeneous,
BCValueHolder  a_value,
int  a_order = 1 
)

Dirichlet boundary conditions for one side. For use in AMRPoissonOp.

◆ NoSlipVectorBC()

void NoSlipVectorBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
int  a_dir,
Side::LoHiSide  a_side,
int  a_order = 2 
)

No slip vector bc (zero all comps). need a_state.ncomp == spacedim For use in ResistivityOp, for example.

◆ ReflectiveVectorBC()

void ReflectiveVectorBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
int  a_dir,
Side::LoHiSide  a_side,
int  a_order = 2 
)

0 normal comp, reflective for all other comps need a_state.ncomp == spacedim For use in ResistivityOp, for example.

◆ ExtrapolateBC() [1/3]

void ExtrapolateBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
int  a_dir,
Side::LoHiSide  a_side,
Interval a_interval,
int  a_order = 1 
)

Extrapolation boundary conditions for a side, specified component interval For use in AMRPoissonOp.

◆ ExtrapolateBC() [2/3]

void ExtrapolateBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
int  a_dir,
Side::LoHiSide  a_side,
int  a_order = 1 
)

Extrapolation boundary conditions for a side, all components. For use in AMRPoissonOp.

◆ ExtrapolateBC() [3/3]

void ExtrapolateBC ( FArrayBox a_state,
const Box a_valid,
Real  a_dx,
int  a_order = 1 
)

Extrapolation boundary conditions for one side. For use in AMRPoissonOp.