Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

StencilUnion Class Reference

stencil that holds several separate stencil. More...

#include <StencilUnion.h>

Inheritance diagram for StencilUnion::

Stencil HandleId List of all members.

Public Methods

 StencilUnion ()
 StencilUnion (int nstencils)
 StencilUnion (const StencilUnion &s)
 ~StencilUnion ()
bool redim (int nstencils)
StencilUnion& operator= (const StencilUnion &p)
virtual int size ()
virtual int maxoff () const
virtual void setNodeDof (int d)
virtual void setDefaultNodeDof (int d)
StencilgetStencil (int i)
const StencilgetStencil (int i) const
void insert (const Stencil &stencil, bool allocate=true)
void insert (const Stencil &stencil, NUMT scaling_factor, bool allocate=true)
virtual NUMT apply (const Ptv(int) &index)
NUMT getScalingFactor (int i) const
int getNumStencils () const
virtual int getNodeDof () const
const VecSimple(NUMT)& getScalingContrib () const
virtual void specialIterate ()
virtual void print (Os os) const
virtual void scan (Is is)

Protected Methods

virtual void specialStartIterator ()

Protected Attributes

VecSimplest(Handle(Stencil)) table
VecSimplest(NUMT) scaling_factors
VecSimple(NUMT) scaling_contrib
Handle(Stencil_prmspm
int curr_it_stencil
int num_stencils

Detailed Description

stencil that holds several separate stencil.

NAME: StencilUnion - stencil that holds several separate stencil.

DESCRIPTION:

The class implements a union of stencils. The class is derived from class "Stencil" such that in addition to holding a group of stencils, a "StencilUnion" object is also a stencil, and can be attached to an object of type "StencilCollection" together with ordinary stencils.


Constructor & Destructor Documentation

StencilUnion::StencilUnion ( )
 

There are three constructors, the one that takes no arguments requires a call to redim. The second constructor takes the number of stencils and initializes the datastructure to hold the given number of stencils. The third constructor takes a "StencilUnion" object and initializes on basis on the supplied stencil. There is also a redim function taking the number of stencils.

StencilUnion::StencilUnion ( int nstencils )
 

See documentation of one of the overloaded constructor.

StencilUnion::StencilUnion ( const StencilUnion & s )
 

See documentation of one of the overloaded constructor.

StencilUnion::~StencilUnion ( )
 


Member Function Documentation

NUMT StencilUnion::apply ( const Ptv(int) & index ) [virtual]
 

function of each stencil multiplied with the scaling factor corresponding to that stencil.

Reimplemented from Stencil.

int StencilUnion::getNodeDof ( ) const [virtual]
 

returns the node_dof of the 'current stencil', used during iterations through the entire stencil union, because the various stencils in the union may have different values of the node_dof variable.

Reimplemented from Stencil.

int StencilUnion::getNumStencils ( ) const [inline]
 

returns the number of stencils inserted into the stencil-union.

const VecSimple(NUMT) & StencilUnion::getScalingContrib ( ) const [inline]
 

NUMT StencilUnion::getScalingFactor ( int i ) const [inline]
 

returns the scaling factor for stencil number 'i' in the union.

const Stencil & StencilUnion::getStencil ( int i ) const
 

See documentation of one of the overloaded functions.

Stencil & StencilUnion::getStencil ( int i )
 

returns stencil number 'i' in the union.

void StencilUnion::insert ( const Stencil & stencil,
NUMT scaling_factor,
bool allocate = true )
 

See documentation of one of the overloaded functions.

void StencilUnion::insert ( const Stencil & stencil,
bool allocate = true )
 

inserts a stencil into the next vacant space in the union. The boolean variable 'allocate' is 'true' by default and meens that when a stencil is added to the union, a copy is created and attached instead. This is a safe approach. One may set this argument to 'false' instead, which means that the supplied stencil is attached instead of a having a copy made. The version of this function which also takes a real value, sets a coefficient which is used together with the stencil in the apply function.

int StencilUnion::maxoff ( ) const [virtual]
 

returns the value of "maxoffset".

Reimplemented from Stencil.

StencilUnion & StencilUnion::operator= ( const StencilUnion & p )
 

void StencilUnion::print ( Os os ) const [virtual]
 

Reimplemented from Stencil.

bool StencilUnion::redim ( int no_algdofs )
 

void StencilUnion::scan ( Is is ) [virtual]
 

void StencilUnion::setDefaultNodeDof ( int d ) [virtual]
 

runs through all the stencils in the union, checking if the node_dof has been set in each of the stencils in the collection, if the value has not been set yet, it is set to the value supplied to this function.

Reimplemented from Stencil.

void StencilUnion::setNodeDof ( int d ) [virtual]
 

set the node dof of the stencil to a specified value.

Reimplemented from Stencil.

int StencilUnion::size ( ) [virtual]
 

returns the total number of active nodes in the object, that is, the sum of the size of all the stencils in the union.

Reimplemented from Stencil.

void StencilUnion::specialIterate ( ) [virtual]
 

implements the code of the iteration functions (the class specific parts). The function is usually not called explicitly by the user, it is only used by the iterator functions in the base class.

Reimplemented from Stencil.

void StencilUnion::specialStartIterator ( ) [protected, virtual]
 

Reimplemented from Stencil.


Member Data Documentation

int StencilUnion::curr_it_stencil [protected]
 

int StencilUnion::num_stencils [protected]
 

VecSimple(NUMT) StencilUnion::scaling_contrib [protected]
 

VecSimplest(NUMT) StencilUnion::scaling_factors [protected]
 

Handle(Stencil_prm) StencilUnion::spm [protected]
 

VecSimplest(Handle(Stencil)) StencilUnion::table [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.