MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DiagonalMsg.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** Messaging Object Oriented Simulation Environment.
3 ** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
4 ** It is made available under the terms of the
5 ** GNU Lesser General Public License version 2.1
6 ** See the file COPYING.LIB for the full notice.
7 **********************************************************************/
8 
9 #ifndef _DIAGONAL_MSG_H
10 #define _DIAGONAL_MSG_H
11 
28 class DiagonalMsg: public Msg
29 {
30  friend unsigned int Msg::initMsgManagers(); // for initializing Id.
31  public:
32  DiagonalMsg( Element* e1, Element* e2, unsigned int msgIndex );
33  ~DiagonalMsg();
34 
35  Eref firstTgt( const Eref& src ) const;
36 
37  void sources( vector< vector< Eref > >& v ) const;
38  void targets( vector< vector< Eref > >& v ) const;
39 
40  Id managerId() const;
41 
42  ObjId findOtherEnd( ObjId end ) const;
43 
44  Msg* copy( Id origSrc, Id newSrc, Id newTgt,
45  FuncId fid, unsigned int b, unsigned int n ) const;
46 
53  void setStride( int stride );
54 
61  int getStride() const;
62 
64  static unsigned int numMsg();
65  static char* lookupMsg( unsigned int index );
66 
68  static const Cinfo* initCinfo();
69  private:
70  int stride_; // Increment between targets.
71  static Id managerId_;
72  static vector< DiagonalMsg* > msg_;
73 };
74 
75 #endif // _DIAGONAL_MSG_H
Element * e2() const
Definition: Msg.h:68
Id managerId() const
Definition: DiagonalMsg.cpp:76
static char * lookupMsg(unsigned int index)
Static function for Msg access.
Msg * copy(Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const
void sources(vector< vector< Eref > > &v) const
Definition: DiagonalMsg.cpp:50
Eref firstTgt(const Eref &src) const
Definition: DiagonalMsg.cpp:37
Definition: ObjId.h:20
ObjId findOtherEnd(ObjId end) const
Definition: DiagonalMsg.cpp:93
void setStride(int stride)
Definition: DiagonalMsg.cpp:81
void targets(vector< vector< Eref > > &v) const
Definition: DiagonalMsg.cpp:63
static unsigned int numMsg()
Msg lookup functions.
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
Definition: Eref.h:26
Definition: Msg.h:18
Element * e1() const
Definition: Msg.h:61
static unsigned int initMsgManagers()
Definition: Msg.cpp:236
int getStride() const
Definition: DiagonalMsg.cpp:88
Definition: Id.h:17
static vector< DiagonalMsg * > msg_
Definition: DiagonalMsg.h:72
DiagonalMsg(Element *e1, Element *e2, unsigned int msgIndex)
Definition: DiagonalMsg.cpp:17
static Id managerId_
Definition: DiagonalMsg.h:71
unsigned int FuncId
Definition: header.h:42
Definition: Cinfo.h:18