MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OpFunc1Base< A > Class Template Referenceabstract

#include <OpFuncBase.h>

+ Inheritance diagram for OpFunc1Base< A >:
+ Collaboration diagram for OpFunc1Base< A >:

Public Member Functions

bool checkFinfo (const Finfo *s) const
 
const OpFuncmakeHopFunc (HopIndex hopIndex) const
 
virtual void op (const Eref &e, A arg) const =0
 
void opBuffer (const Eref &e, double *buf) const
 Executes the OpFunc by converting args. More...
 
virtual void opVec (const Eref &e, const vector< A > &arg, const OpFunc1Base< A > *op) const
 
void opVecBuffer (const Eref &e, double *buf) const
 Executes the OpFunc for all data by converting a vector of args. More...
 
string rttiType () const
 
- Public Member Functions inherited from OpFunc
 OpFunc ()
 
unsigned int opIndex () const
 
bool setIndex (unsigned int i)
 Used when rebuilding the Fid->OpFunc mapping. More...
 
virtual ~OpFunc ()
 

Additional Inherited Members

- Static Public Member Functions inherited from OpFunc
static const OpFunclookop (unsigned int opIndex)
 
static unsigned int rebuildOpIndex ()
 cleans out the entire Ops vector. Returns size of orig vector. More...
 

Detailed Description

template<class A>
class OpFunc1Base< A >

Definition at line 97 of file OpFuncBase.h.

Member Function Documentation

template<class A>
bool OpFunc1Base< A >::checkFinfo ( const Finfo s) const
inlinevirtual

Implements OpFunc.

Definition at line 101 of file OpFuncBase.h.

101  {
102  return dynamic_cast< const SrcFinfo1< A >* >( s );
103  }
template<class A >
const OpFunc * OpFunc1Base< A >::makeHopFunc ( HopIndex  hopIndex) const
virtual

Deferred specification of function from OpFunc1Base, so it is after the declaration of the HopFunc class to which it refers.

Implements OpFunc.

Definition at line 183 of file HopFunc.h.

Referenced by SetGet1< A >::set(), and SetGet1< A >::setVec().

184 {
185  return new HopFunc1< A >( hopIndex );
186 }

+ Here is the caller graph for this function:

template<class A>
virtual void OpFunc1Base< A >::op ( const Eref e,
arg 
) const
pure virtual
template<class A>
void OpFunc1Base< A >::opBuffer ( const Eref e,
double *  buf 
) const
inlinevirtual

Executes the OpFunc by converting args.

Implements OpFunc.

Definition at line 109 of file OpFuncBase.h.

109  {
110  op( e, Conv< A >::buf2val( &buf ) );
111  }
virtual void op(const Eref &e, A arg) const =0
Definition: Conv.h:30
template<class A>
virtual void OpFunc1Base< A >::opVec ( const Eref e,
const vector< A > &  arg,
const OpFunc1Base< A > *  op 
) const
inlinevirtual

Reimplemented in HopFunc1< A >.

Definition at line 136 of file OpFuncBase.h.

Referenced by SetGet1< A >::setVec().

138  { ; } // overridden in HopFuncs.

+ Here is the caller graph for this function:

template<class A>
void OpFunc1Base< A >::opVecBuffer ( const Eref e,
double *  buf 
) const
inlinevirtual

Executes the OpFunc for all data by converting a vector of args.

Reimplemented from OpFunc.

Definition at line 113 of file OpFuncBase.h.

113  {
114  vector< A > temp = Conv< vector< A > >::buf2val( &buf );
115  Element* elm = e.element();
116  if ( elm->hasFields() ) { // Assignment is to field array.
117  unsigned int di = e.dataIndex();
118  unsigned int nf = elm->numField( di -
119  elm->localDataStart() );
120  for ( unsigned int i = 0; i < nf; ++i) {
121  Eref er( elm, di, i );
122  op( er, temp[ i % temp.size() ] );
123  }
124  } else { // Assignment is to data entries.
125  unsigned int k = 0;
126  unsigned int start = elm->localDataStart();
127  unsigned int end = start + elm->numLocalData();
128  for ( unsigned int i = start; i < end; ++i) {
129  Eref er( elm, i, 0 );
130  op( er, temp[ k % temp.size() ] );
131  ++k;
132  }
133  }
134  }
virtual void op(const Eref &e, A arg) const =0
unsigned int dataIndex() const
Definition: Eref.h:50
Element * element() const
Definition: Eref.h:42
Definition: Conv.h:30
virtual unsigned int numField(unsigned int rawIndex) const =0
Returns number of field entries for specified data.
virtual bool hasFields() const =0
Definition: Eref.h:26
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.
virtual unsigned int numLocalData() const =0
Returns number of local data entries on this node.
template<class A>
string OpFunc1Base< A >::rttiType ( ) const
inlinevirtual

Implements OpFunc.

Definition at line 140 of file OpFuncBase.h.

140  {
141  return Conv< A >::rttiType();
142  }
static string rttiType()
Definition: Conv.h:82

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