MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SparseMsg.cpp File Reference
+ Include dependency graph for SparseMsg.cpp:

Go to the source code of this file.

Functions

void fillErefsFromMatrix (const SparseMatrix< unsigned int > &matrix, vector< vector< Eref > > &v, Element *e1, Element *e2)
 
unsigned int rowIndex (const Element *e, const DataId &d)
 

Variables

static const CinfosparseMsgCinfo = SparseMsg::initCinfo()
 

Function Documentation

void fillErefsFromMatrix ( const SparseMatrix< unsigned int > &  matrix,
vector< vector< Eref > > &  v,
Element e1,
Element e2 
)

Definition at line 603 of file SparseMsg.cpp.

References SparseMatrix< T >::getRow(), SparseMatrix< T >::nColumns(), SparseMatrix< T >::nRows(), and Element::numData().

Referenced by SparseMsg::sources(), and SparseMsg::targets().

606 {
607  v.clear();
608  v.resize( e1->numData() );
609  assert( e1->numData() == matrix.nRows() );
610  assert( e2->numData() == matrix.nColumns() );
611  for ( unsigned int i = 0; i < e1->numData(); ++i )
612  {
613  const unsigned int* entry;
614  const unsigned int* colIndex;
615  unsigned int num = matrix.getRow( i, &entry, &colIndex );
616  v[i].resize( num );
617  for ( unsigned int j = 0; j < num; ++j )
618  {
619  v[i][j] = Eref( e2, colIndex[j], entry[j] );
620  }
621  }
622 }
unsigned int nColumns() const
Definition: SparseMatrix.h:92
unsigned int getRow(unsigned int row, const T **entry, const unsigned int **colIndex) const
Definition: SparseMatrix.h:288
unsigned int nRows() const
Definition: SparseMatrix.h:87
Definition: Eref.h:26
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int rowIndex ( const Element e,
const DataId d 
)

Definition at line 425 of file SparseMsg.cpp.

Referenced by SparseMsg::findOtherEnd(), and SparseMatrix< unsigned int >::transpose().

426 {
427  // FieldDataHandlerBase* fdh = dynamic_cast< FieldDataHandlerBase* >( e->dataHandler() );
428 
429  return d;
430 }

+ Here is the caller graph for this function:

Variable Documentation

const Cinfo* sparseMsgCinfo = SparseMsg::initCinfo()
static

Definition at line 182 of file SparseMsg.cpp.

Referenced by SparseMsg::initCinfo().