MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SrcFinfo3< T1, T2, T3 > Class Template Reference

#include <SrcFinfo.h>

+ Inheritance diagram for SrcFinfo3< T1, T2, T3 >:
+ Collaboration diagram for SrcFinfo3< T1, T2, T3 >:

Public Member Functions

string rttiType () const
 
void send (const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3) const
 
void sendBuffer (const Eref &e, double *buf) const
 
 SrcFinfo3 (const string &name, const string &doc)
 
 ~SrcFinfo3 ()
 
- Public Member Functions inherited from SrcFinfo
bool addMsg (const Finfo *target, ObjId mid, Element *src) const
 
bool checkTarget (const Finfo *target) const
 
BindIndex getBindIndex () const
 
void registerFinfo (Cinfo *c)
 
void setBindIndex (BindIndex b)
 
 SrcFinfo (const string &name, const string &doc)
 
bool strGet (const Eref &tgt, const string &field, string &returnValue) const
 
bool strSet (const Eref &tgt, const string &field, const string &arg) const
 
 ~SrcFinfo ()
 
- Public Member Functions inherited from Finfo
const string & docs () const
 Returns documentation string. More...
 
 Finfo (const string &name, const string &doc)
 
virtual vector< string > innerDest () const
 
virtual vector< string > innerSrc () const
 
const string & name () const
 
virtual void postCreationFunc (Id newId, Element *newElm) const
 
virtual ~Finfo ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Finfo
static const CinfoinitCinfo ()
 
- Static Public Attributes inherited from SrcFinfo
static const BindIndex BadBindIndex = 65535
 

Detailed Description

template<class T1, class T2, class T3>
class SrcFinfo3< T1, T2, T3 >

Definition at line 296 of file SrcFinfo.h.

Constructor & Destructor Documentation

template<class T1, class T2, class T3>
SrcFinfo3< T1, T2, T3 >::~SrcFinfo3 ( )
inline

Definition at line 299 of file SrcFinfo.h.

299 {;}
template<class T1, class T2, class T3>
SrcFinfo3< T1, T2, T3 >::SrcFinfo3 ( const string &  name,
const string &  doc 
)
inline

Definition at line 301 of file SrcFinfo.h.

302  : SrcFinfo( name, doc )
303  { ; }
SrcFinfo(const string &name, const string &doc)
Definition: SrcFinfo.cpp:18
const string & name() const
Definition: Finfo.cpp:80

Member Function Documentation

template<class T1, class T2, class T3>
string SrcFinfo3< T1, T2, T3 >::rttiType ( ) const
inlinevirtual

Returns the documentation string for the Finfo string docs() const; Returns the RTTI type string for the finfo by referring to an internal virtual function. string type() const; Returns the list of subsidiary SrcFinfos. Used in Shared Finfos, empty otherwise. Goes via internal virtual function. vector< string > src() const; Returns the list of subsidiary destFinfos. Used in SharedFinfos and ValueFinfos, empty otherwise. Goes via internal virtual function. vector< string > dest() const; Returns an RTTI type string for this Finfo.

Reimplemented from Finfo.

Definition at line 337 of file SrcFinfo.h.

References Conv< T >::rttiType().

337  {
338  return Conv<T1>::rttiType() + "," + Conv< T2 >::rttiType() +
339  "," + Conv<T3>::rttiType();
340  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T1, class T2, class T3>
void SrcFinfo3< T1, T2, T3 >::send ( const Eref e,
const T1 &  arg1,
const T2 &  arg2,
const T3 &  arg3 
) const
inline

Definition at line 305 of file SrcFinfo.h.

References ALLDATA, Eref::element(), SrcFinfo::getBindIndex(), Element::localDataStart(), Eref::msgDigest(), Element::numData(), and OpFunc3Base< A1, A2, A3 >::op().

Referenced by SrcFinfo3< T1, T2, T3 >::sendBuffer().

307  {
308  const vector< MsgDigest >& md = e.msgDigest( getBindIndex() );
309  for ( vector< MsgDigest >::const_iterator
310  i = md.begin(); i != md.end(); ++i ) {
311  const OpFunc3Base< T1, T2, T3 >* f =
312  dynamic_cast< const OpFunc3Base< T1, T2, T3 >* >(
313  i->func );
314  assert( f );
315  for ( vector< Eref >::const_iterator
316  j = i->targets.begin(); j != i->targets.end(); ++j ) {
317  if ( j->dataIndex() == ALLDATA ) {
318  Element* e = j->element();
319  unsigned int start = e->localDataStart();
320  unsigned int end = start + e->numData();
321  for ( unsigned int k = start; k < end; ++k )
322  f->op( Eref( e, k ), arg1, arg2, arg3 );
323  } else {
324  f->op( *j, arg1, arg2, arg3 );
325  }
326  }
327  }
328  }
BindIndex getBindIndex() const
Definition: SrcFinfo.cpp:28
Element * element() const
Definition: Eref.h:42
const unsigned int ALLDATA
Used by ObjId and Eref.
Definition: consts.cpp:22
const vector< MsgDigest > & msgDigest(unsigned int bindIndex) const
Definition: Eref.cpp:67
Definition: Eref.h:26
virtual void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3) const =0
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class T1, class T2, class T3>
void SrcFinfo3< T1, T2, T3 >::sendBuffer ( const Eref e,
double *  buf 
) const
inlinevirtual

Sends contents of buffer on to msg targets Buffer has a header with the TgtInfo.

Implements SrcFinfo.

Definition at line 330 of file SrcFinfo.h.

References Conv< T >::buf2val(), and SrcFinfo3< T1, T2, T3 >::send().

331  {
332  const T1& arg1 = Conv< T1 >::buf2val( &buf );
333  const T2& arg2 = Conv< T2 >::buf2val( &buf );
334  send( e, arg1, arg2, Conv< T3 >::buf2val( &buf ) );
335  }
Definition: Conv.h:30
void send(const Eref &e, const T1 &arg1, const T2 &arg2, const T3 &arg3) const
Definition: SrcFinfo.h:305
static const T & buf2val(double **buf)
Definition: Conv.h:44

+ Here is the call graph for this function:


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