class DerivStencil
class to encapsulate the operations to create derivs on irreg stencils
Inheritance:
DerivStencil
public members:
-
void define()
-
-
bool isDefined() const
-
-
DerivStencil()
-
-
DerivStencil(const DerivStencil & a_dsin)
-
~DerivStencil()
-
-
void clear()
-
-
int size() const
-
-
const IntVect& getIndex(int a_ivec) const
-
-
const Real& getWeight(int a_ivec) const
-
-
void accumulate(const IntVect& a_iv, Real a_weight)
-
-
const DerivStencil & operator=(const DerivStencil & a_dsin)
-
-
const DerivStencil & operator*=(Real a_facin)
-
-
const DerivStencil & operator/=(Real a_denom)
-
-
const DerivStencil & operator+=(Real a_facin)
-
-
const DerivStencil & operator-=(Real a_facin)
-
protected members:
-
Vector <IntVect> m_vectIV
-
Vector <Real> m_vectWgt
-
bool isdefined
-
Documentation
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.
- bool isDefined () const
- return true if any define function been called.
- DerivStencil ()
-
default constructor; creates empty vectors
- DerivStencil (const DerivStencil & a_dsin)
-
copy constructor; sets *this = a_dsin
- void clear ()
-
make derivstencil empty
- int size () const
-
return length of vectors
- const IntVect& getIndex (int a_ivec) const
-
get iv at ivec
- const Real& getWeight (int a_ivec) const
-
get weight at ivec
- void 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**
- const DerivStencil & operator= (const DerivStencil & a_dsin)
-
assignment operator
- const DerivStencil & operator*= (Real a_facin)
-
Multiply each weight by a_facin
does nothing if vectors are of zero length
- const 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.
- const DerivStencil & operator+= (Real a_facin)
-
add a_facin to each weight
does nothing if vectors are of zero length
- const DerivStencil & operator-= (Real a_facin)
-
subtract a_facin from each weight
does nothing if vectors are of zero length
this class has no child classes.
alphabetic index hierarchy of classes
Chombo
Copyright Notice
This software is copyright (C) by the Lawrence Berkeley
National Laboratory. Permission is granted to reproduce
this software for non-commercial purposes provided that
this notice is left intact.
It is acknowledged that the U.S. Government has rights to
this software under Contract DE-AC03-765F00098 between
the U.S. Department of Energy and the University of
California.
This software is provided as a professional and academic
contribution for joint exchange. Thus it is experimental,
is provided ``as is'', with no warranties of any kind
whatsoever, no support, no promise of updates, or printed
documentation. By using this software, you acknowledge
that the Lawrence Berkeley National Laboratory and
Regents of the University of California shall have no
liability with respect to the infringement of other
copyrights by any part of this software.