Chombo + EB  3.0
Public Member Functions | Protected Attributes | List of all members
DerivStencil Class Reference

class to encapsulate the operations to create derivs on irreg stencils More...

#include <DerivStencil.H>

Public Member Functions

void define ()
 
bool isDefined () const
 
 DerivStencil ()
 
 DerivStencil (const DerivStencil &a_dsin)
 
 ~DerivStencil ()
 
void clear ()
 
int size () const
 
const IntVectgetIndex (int a_ivec) const
 
const RealgetWeight (int a_ivec) const
 
void accumulate (const IntVect &a_iv, Real a_weight)
 
const DerivStenciloperator= (const DerivStencil &a_dsin)
 
const DerivStenciloperator*= (Real a_facin)
 
const DerivStenciloperator/= (Real a_denom)
 
const DerivStenciloperator+= (Real a_facin)
 
const DerivStenciloperator-= (Real a_facin)
 

Protected Attributes

Vector< IntVectm_vectIV
 
Vector< Realm_vectWgt
 
bool isdefined
 

Detailed Description

class to encapsulate the operations to create derivs on irreg stencils

DerivStencil is meant to be used to encapsulate the information necessary to take finite difference derivatives at a point in space. Every point in the stencil has a weight. You add them (the boxarrayindex and the weight) at the same time and you can manipulate the weights enmasse by real number operations. Stencils may not interact with each other with the same sort of arithmetic because that would bring up issues as to what to do when there is incomplete intersection between the stencils.

Constructor & Destructor Documentation

◆ DerivStencil() [1/2]

DerivStencil::DerivStencil ( )

default constructor; creates empty vectors

Referenced by isDefined().

◆ DerivStencil() [2/2]

DerivStencil::DerivStencil ( const DerivStencil a_dsin)

copy constructor; sets *this = a_dsin

◆ ~DerivStencil()

DerivStencil::~DerivStencil ( )

Referenced by isDefined().

Member Function Documentation

◆ define()

void DerivStencil::define ( )

◆ isDefined()

bool DerivStencil::isDefined ( ) const
inline

◆ clear()

void DerivStencil::clear ( )

make derivstencil empty

Referenced by isDefined().

◆ size()

int DerivStencil::size ( ) const

return length of vectors

Referenced by isDefined().

◆ getIndex()

const IntVect& DerivStencil::getIndex ( int  a_ivec) const

get iv at ivec

Referenced by isDefined().

◆ getWeight()

const Real& DerivStencil::getWeight ( int  a_ivec) const

get weight at ivec

Referenced by isDefined().

◆ accumulate()

void DerivStencil::accumulate ( const IntVect a_iv,
Real  a_weight 
)

add another set if the IntVect is not in the stencil already. \ Add the weight to the existing weight otherwise**

Referenced by isDefined().

◆ operator=()

const DerivStencil& DerivStencil::operator= ( const DerivStencil a_dsin)

assignment operator

Referenced by isDefined().

◆ operator*=()

const DerivStencil& DerivStencil::operator*= ( Real  a_facin)

Multiply each weight by a_facin does nothing if vectors are of zero length

Referenced by isDefined().

◆ operator/=()

const DerivStencil& DerivStencil::operator/= ( Real  a_denom)

divide each weight by a_denom does nothing if vectors are of zero length. Be advised — This function does no checking to see if a_denom is close to zero.

Referenced by isDefined().

◆ operator+=()

const DerivStencil& DerivStencil::operator+= ( Real  a_facin)

add a_facin to each weight does nothing if vectors are of zero length

Referenced by isDefined().

◆ operator-=()

const DerivStencil& DerivStencil::operator-= ( Real  a_facin)

subtract a_facin from each weight does nothing if vectors are of zero length

Referenced by isDefined().

Member Data Documentation

◆ m_vectIV

Vector<IntVect> DerivStencil::m_vectIV
protected

◆ m_vectWgt

Vector<Real> DerivStencil::m_vectWgt
protected

◆ isdefined

bool DerivStencil::isdefined
protected

Referenced by isDefined().


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