#include <VarCoefStencil.H>
This stencil is a fundamental tool for building eb applications by making the ability to cache stencil information. This object consists of a vector of VoFs and a vector of weights.
Public Member Functions | |
VarCoefStencil () | |
~VarCoefStencil () | |
void | clear () |
void | add (const VolIndex &vof, const FaceIndex &coefloc, const Real &weight, int ivar) |
int | size () const |
const VolIndex & | vof (int i) const |
const FaceIndex & | coefLoc (int i) const |
const Real & | weight (int i) const |
Real & | weight (int i) |
const int & | variable (int i) const |
int & | variable (int i) |
VarCoefStencil & | operator+= (const VarCoefStencil &a_vofsten) |
void | operator*= (const Real &scaling) |
VarCoefStencil & | operator= (const VarCoefStencil &a_vofsten) |
VarCoefStencil (const VarCoefStencil &a_vofstenin) | |
void | setAllVariables (int a_var) |
Protected Attributes | |
Vector< VolIndex > | vofs |
the VoFs | |
Vector< Real > | weights |
the weights | |
Vector< int > | variables |
Vector< FaceIndex > | coefLocs |
Where the face-centered coefficients live. |
VarCoefStencil::VarCoefStencil | ( | ) |
default constructor. makes empty vectors.
VarCoefStencil::~VarCoefStencil | ( | ) |
VarCoefStencil::VarCoefStencil | ( | const VarCoefStencil & | a_vofstenin | ) |
void VarCoefStencil::clear | ( | ) |
void VarCoefStencil::add | ( | const VolIndex & | vof, | |
const FaceIndex & | coefloc, | |||
const Real & | weight, | |||
int | ivar | |||
) |
add a VoF to the Stencil, with it's associated weight it is required that all VoFs are in the same EBIndexSpace If the vof is already in the stencil, add the weights.
int VarCoefStencil::size | ( | ) | const [inline] |
const FaceIndex & VarCoefStencil::coefLoc | ( | int | i | ) | const [inline] |
access a VoF
References coefLocs.
const int& VarCoefStencil::variable | ( | int | i | ) | const |
int& VarCoefStencil::variable | ( | int | i | ) |
VarCoefStencil& VarCoefStencil::operator+= | ( | const VarCoefStencil & | a_vofsten | ) |
add all faces and weights of inputs to this. If a vof is already in the stencil, add the weights. only addition is well-defined here as far as arithmatic operations are concerned.
void VarCoefStencil::operator*= | ( | const Real & | scaling | ) |
VarCoefStencil& VarCoefStencil::operator= | ( | const VarCoefStencil & | a_vofsten | ) |
void VarCoefStencil::setAllVariables | ( | int | a_var | ) | [inline] |
References Vector< T >::size(), variables, and vofs.
Vector<VolIndex> VarCoefStencil::vofs [protected] |
Vector<Real> VarCoefStencil::weights [protected] |
Vector<int> VarCoefStencil::variables [protected] |
Referenced by setAllVariables().
Vector<FaceIndex> VarCoefStencil::coefLocs [protected] |