| 
    libMesh
    
   | 
 
This class defines a coupling matrix. More...
#include <coupling_matrix.h>
Public Member Functions | |
| CouplingMatrix (const unsigned int n=0) | |
| Constructor.  More... | |
| bool | operator() (const unsigned int i, const unsigned int j) const | 
| CouplingAccessor | operator() (const unsigned int i, const unsigned int j) | 
| unsigned int | size () const | 
| void | resize (const unsigned int n) | 
| Resizes the matrix and initializes all entries to be 0.  More... | |
| void | clear () | 
| Clears the matrix.  More... | |
| bool | empty () const | 
| CouplingMatrix & | operator&= (const CouplingMatrix &other) | 
Private Types | |
| typedef std::pair< std::size_t, std::size_t > | range_type | 
| Coupling matrices are typically either full or very sparse, and all values are only zero or one.  More... | |
| typedef std::vector< range_type > | rc_type | 
Private Attributes | |
| rc_type | _ranges | 
| unsigned int | _size | 
| The size of the matrix.  More... | |
Friends | |
| class | ConstCouplingAccessor | 
| class | CouplingAccessor | 
| class | ConstCouplingRow | 
| class | ConstCouplingRowConstIterator | 
This class defines a coupling matrix.
A coupling matrix is simply a matrix of ones and zeros describing how different components in a system couple with each other. A coupling matrix is necessarily square but not necessarily symmetric.
Defines the coupling between variables of a System.
Definition at line 54 of file coupling_matrix.h.
      
  | 
  private | 
Coupling matrices are typically either full or very sparse, and all values are only zero or one.
We store non-zeros as ranges: the first entry of each range pair is the location of the first non-zero, and the second is the location of the last subsequent non-zero (not the next subsequent zero; we drop empty ranges).
We store locations (i,j) as long integers i*_size+j
Definition at line 119 of file coupling_matrix.h.
      
  | 
  private | 
Definition at line 120 of file coupling_matrix.h.
      
  | 
  inlineexplicit | 
      
  | 
  inline | 
      
  | 
  inline | 
true if the matrix is empty. Definition at line 631 of file coupling_matrix.h.
References _size.
Referenced by libMesh::DofMap::reinit(), and libMesh::DefaultCoupling::set_dof_coupling().
| CouplingMatrix & libMesh::CouplingMatrix::operator&= | ( | const CouplingMatrix & | other | ) | 
Definition at line 24 of file coupling_matrix.C.
References _ranges, and libMesh::MeshTools::Subdivision::next.
      
  | 
  inline | 
Definition at line 594 of file coupling_matrix.h.
References _size, and CouplingAccessor.
      
  | 
  inline | 
Definition at line 579 of file coupling_matrix.h.
References _size, and ConstCouplingAccessor.
      
  | 
  inline | 
Resizes the matrix and initializes all entries to be 0.
Definition at line 613 of file coupling_matrix.h.
References _ranges, and _size.
Referenced by clear(), CouplingMatrix(), main(), and CouplingMatrixTest::testSimpleAPI().
      
  | 
  inline | 
Definition at line 605 of file coupling_matrix.h.
References _size.
Referenced by libMesh::ConstCouplingAccessor::ConstCouplingAccessor(), libMesh::ConstCouplingRow::ConstCouplingRow(), libMesh::SparsityPattern::Build::operator()(), and libMesh::ConstCouplingRowConstIterator::operator*().
      
  | 
  friend | 
Definition at line 103 of file coupling_matrix.h.
Referenced by operator()().
      
  | 
  friend | 
Definition at line 105 of file coupling_matrix.h.
      
  | 
  friend | 
Definition at line 106 of file coupling_matrix.h.
      
  | 
  friend | 
Definition at line 104 of file coupling_matrix.h.
Referenced by operator()().
      
  | 
  private | 
Definition at line 121 of file coupling_matrix.h.
Referenced by libMesh::ConstCouplingRow::ConstCouplingRow(), libMesh::ConstCouplingRowConstIterator::ConstCouplingRowConstIterator(), libMesh::ConstCouplingRow::end(), libMesh::ConstCouplingAccessor::operator bool(), operator&=(), libMesh::ConstCouplingRowConstIterator::operator++(), libMesh::CouplingAccessor::operator=(), and resize().
      
  | 
  private | 
The size of the matrix.
Definition at line 126 of file coupling_matrix.h.
Referenced by empty(), operator()(), resize(), and size().
 1.8.16