Chombo + EB + MF  3.2
Public Member Functions | Protected Attributes | List of all members
VarCoefStencil Class Reference

VoF-centered stencil. More...

#include <VarCoefStencil.H>

Public Member Functions

 VarCoefStencil ()
 
 ~VarCoefStencil ()
 
void clear ()
 
void add (const VolIndex &vof, const FaceIndex &coefloc, const Real &weight, int ivar)
 
int size () const
 
const VolIndexvof (int i) const
 
const FaceIndexcoefLoc (int i) const
 
const Realweight (int i) const
 
Realweight (int i)
 
const int & variable (int i) const
 
int & variable (int i)
 
VarCoefStenciloperator+= (const VarCoefStencil &a_vofsten)
 
void operator*= (const Real &scaling)
 
VarCoefStenciloperator= (const VarCoefStencil &a_vofsten)
 
 VarCoefStencil (const VarCoefStencil &a_vofstenin)
 
void setAllVariables (int a_var)
 

Protected Attributes

Vector< VolIndexvofs
 the VoFs More...
 
Vector< Realweights
 the weights More...
 
Vector< int > variables
 
Vector< FaceIndexcoefLocs
 Where the face-centered coefficients live. More...
 

Detailed Description

VoF-centered stencil.

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.

Constructor & Destructor Documentation

◆ VarCoefStencil() [1/2]

VarCoefStencil::VarCoefStencil ( )

default constructor. makes empty vectors.

◆ ~VarCoefStencil()

VarCoefStencil::~VarCoefStencil ( )

◆ VarCoefStencil() [2/2]

VarCoefStencil::VarCoefStencil ( const VarCoefStencil a_vofstenin)

Member Function Documentation

◆ clear()

void VarCoefStencil::clear ( )

◆ add()

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.

◆ size()

int VarCoefStencil::size ( ) const
inline

number of VoFs in the Stencil

inlines

References Vector< T >::size(), and weights.

◆ vof()

const VolIndex & VarCoefStencil::vof ( int  i) const
inline

access a VoF

References vofs.

◆ coefLoc()

const FaceIndex & VarCoefStencil::coefLoc ( int  i) const
inline

access a VoF

References coefLocs.

◆ weight() [1/2]

const Real & VarCoefStencil::weight ( int  i) const
inline

access a weight

References weights.

◆ weight() [2/2]

Real & VarCoefStencil::weight ( int  i)
inline

access a weight

References CH_assert, linearSize(), and weights.

◆ variable() [1/2]

const int& VarCoefStencil::variable ( int  i) const

◆ variable() [2/2]

int& VarCoefStencil::variable ( int  i)

◆ operator+=()

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.

◆ operator*=()

void VarCoefStencil::operator*= ( const Real scaling)

◆ operator=()

VarCoefStencil& VarCoefStencil::operator= ( const VarCoefStencil a_vofsten)

◆ setAllVariables()

void VarCoefStencil::setAllVariables ( int  a_var)
inline

References Vector< T >::size(), variables, and vofs.

Member Data Documentation

◆ vofs

Vector<VolIndex> VarCoefStencil::vofs
protected

the VoFs

Referenced by setAllVariables(), and vof().

◆ weights

Vector<Real> VarCoefStencil::weights
protected

the weights

Referenced by size(), and weight().

◆ variables

Vector<int> VarCoefStencil::variables
protected

Referenced by setAllVariables().

◆ coefLocs

Vector<FaceIndex> VarCoefStencil::coefLocs
protected

Where the face-centered coefficients live.

Referenced by coefLoc().


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