FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
fei::Matrix_core Class Referenceabstract

#include <fei_Matrix_core.hpp>

Inheritance diagram for fei::Matrix_core:
Inheritance graph
[legend]

Public Member Functions

 Matrix_core (fei::SharedPtr< fei::MatrixGraph > matrixGraph, int numLocalEqns)
 
virtual ~Matrix_core ()
 
virtual int giveToMatrix (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sumInto, int format)=0
 
void setRHS (fei::SharedPtr< fei::Vector > rhsvector)
 
void setSlaveInfo (fei::SharedPtr< fei::MatrixGraph > matrixGraph)
 
fei::SharedPtr< fei::MatrixGraphgetMatrixGraph () const
 
const FillableMatgetRemotelyOwnedMatrix (int proc) const
 
FillableMatgetRemotelyOwnedMatrix (int proc)
 
std::map< int, FillableMat * > & getRemotelyOwnedMatrices ()
 
void putScalar_remotelyOwned (double scalar)
 
void setEqnComm (fei::SharedPtr< fei::EqnComm > eqnComm)
 

Static Public Member Functions

static void copyTransposeToWorkArrays (int numRows, int numCols, const double *const *values, std::vector< double > &work_1D, std::vector< const double * > &work_2D)
 

Protected Member Functions

void parameters (const fei::ParameterSet &paramset)
 
virtual int giveToUnderlyingMatrix (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sumInto, int format)=0
 
virtual int giveToBlockMatrix (int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sumInto)=0
 
virtual int giveToUnderlyingBlockMatrix (int row, int rowDim, int numCols, const int *cols, const int *LDAs, const int *colDims, const double *const *values, bool sumInto)=0
 
void setName (const char *name)
 
void setCommSizes ()
 
int gatherFromOverlap (bool accumulate)
 
void setMatrixGraph (fei::SharedPtr< fei::MatrixGraph > matrixGraph)
 
int copyPointRowsToBlockRow (int numPtRows, int numPtCols, const double *const *ptValues, int numBlkCols, const int *blkColDims, double **blkValues)
 
int convertPtToBlk (int numRows, const int *rows, int numCols, const int *cols, int *blkRows, int *blkRowOffsets, int *blkCols, int *blkColOffsets)
 
MPI_Comm getCommunicator () const
 
const fei::SharedPtr
< fei::VectorSpace
vecSpace () const
 
fei::SharedPtr< fei::VectorSpacevecSpace ()
 
std::vector< int > & globalOffsets ()
 
const std::vector< int > & globalOffsets () const
 
int firstLocalOffset () const
 
int lastLocalOffset () const
 
int numProcs () const
 
int localProc () const
 
bool haveBlockMatrix () const
 
void setBlockMatrix (bool flag)
 
bool haveFEMatrix () const
 
void setFEMatrix (bool flag)
 
int getOwnerProc (int globalEqn) const
 
- Protected Member Functions inherited from fei::Logger
 Logger ()
 
virtual ~Logger ()
 
void setOutputLevel (OutputLevel olevel)
 
void addLogID (int ID)
 
void addLogEqn (int eqn)
 
bool isLogID (int ID)
 
bool isLogEqn (int eqn)
 
std::set< int > & getLogIDs ()
 
std::set< int > & getLogEqns ()
 

Protected Attributes

std::string name_
 
std::vector< int > work_indices_
 
std::vector< int > work_indices2_
 
std::vector< int > work_ints_
 
std::vector< double > work_data1D_
 
std::vector< const double * > work_data2D_
 
fei::SharedPtr< fei::EqnCommeqnComm_
 
- Protected Attributes inherited from fei::Logger
OutputLevel output_level_
 
FEI_OSTREAMoutput_stream_
 
std::set< int > logIDs_
 
std::set< int > logEqns_
 

Private Attributes

fei::SharedPtr< fei::VectorrhsVector_
 
MPI_Comm comm_
 
int localProc_
 
int numProcs_
 
fei::SharedPtr< fei::VectorSpacevecSpace_
 
fei::SharedPtr< fei::MatrixGraphmatrixGraph_
 
std::map< int, FillableMat * > remotelyOwned_
 
FillableMatremotelyOwned_last_requested_
 
std::vector< int > sendProcs_
 
std::vector< int > recvProcs_
 
std::vector< std::vector< char > > recv_chars_
 
std::vector< std::vector< char > > send_chars_
 
bool sendRecvProcsNeedUpdated_
 
int proc_last_requested_
 
bool haveBlockMatrix_
 
bool haveFEMatrix_
 
std::vector< int > globalOffsets_
 
int firstLocalOffset_
 
int lastLocalOffset_
 

Detailed Description

Definition at line 25 of file fei_Matrix_core.hpp.

Constructor & Destructor Documentation

fei::Matrix_core::Matrix_core ( fei::SharedPtr< fei::MatrixGraph matrixGraph,
int  numLocalEqns 
)
fei::Matrix_core::~Matrix_core ( )
virtual

Definition at line 113 of file fei_Matrix_core.cpp.

Member Function Documentation

virtual int fei::Matrix_core::giveToMatrix ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
bool  sumInto,
int  format 
)
pure virtual

Implemented in fei::Matrix_Impl< T >.

void fei::Matrix_core::copyTransposeToWorkArrays ( int  numRows,
int  numCols,
const double *const *  values,
std::vector< double > &  work_1D,
std::vector< const double * > &  work_2D 
)
static

Given a 2-D table (C-style list-of-pointers) of size numRows X numCols, copy the transpose of the data into the given 1-D work array and set the given 2-D array of pointers to point into the 1-D data. In other words, columns in the input will be rows in the output, and the entries in work_2D will point to the beginnings of those rows (former columns).

Parameters
numRowsFirst dimension of 'values'. i.e., number of pointers in the list of pointers.
numColsSecond dimension of 'values'. i.e., the length of each of the rows (all rows have the same length).
values2-D C-style table of data. List of pointers of length numRows, with each pointer pointing to 'numCols' items.
work_1Don exit, will have length numRows X numCols, and will contain the data from values. The data from 'values' will be transposed such that the entries from each column of 'values' will now lie contiguously.
work_2Don exit, will have length numCols, and will represent a C-style list-of-pointers where work_2D[i] = &(work_1D[i*numRows]). In other words, each entry of work_2D points to a row which was a column of 'values'. work_2D represents a table with 'numCols' rows, each of length 'numRows'.

Definition at line 320 of file fei_Matrix_core.cpp.

Referenced by fei::Reducer::addMatrixValues(), fei::Matrix_Local::giveToMatrix(), and test_matrix_unit1().

void fei::Matrix_core::setRHS ( fei::SharedPtr< fei::Vector rhsvector)

If slave-constraints have been registered with the matrix-graph, and if the constraints have a non-zero right-hand-side coefficient, then this matrix needs access to the linear-system's right-hand-side vector for assembling data into. For more details, see the SAND report that documents the FEI's constraint reduction.

Definition at line 166 of file fei_Matrix_core.cpp.

void fei::Matrix_core::setSlaveInfo ( fei::SharedPtr< fei::MatrixGraph matrixGraph)

Instruct the Matrix_core to set its slave-constraint information (such as dependency matrix and constraint-right-hand-side vector) from the specified matrix-graph object.

fei::SharedPtr<fei::MatrixGraph> fei::Matrix_core::getMatrixGraph ( ) const
inline

Definition at line 81 of file fei_Matrix_core.hpp.

References matrixGraph_.

Referenced by fei::Matrix_Impl< T >::getMatrixGraph().

const FillableMat* fei::Matrix_core::getRemotelyOwnedMatrix ( int  proc) const
inline
FillableMat* fei::Matrix_core::getRemotelyOwnedMatrix ( int  proc)
inline
std::map< int, fei::FillableMat * > & fei::Matrix_core::getRemotelyOwnedMatrices ( )
void fei::Matrix_core::putScalar_remotelyOwned ( double  scalar)

Definition at line 93 of file fei_Matrix_core.cpp.

References fei::MatrixTraits< T >::setValues().

void fei::Matrix_core::setEqnComm ( fei::SharedPtr< fei::EqnComm eqnComm)

Definition at line 104 of file fei_Matrix_core.cpp.

References fei::EqnComm::getGlobalOffsets().

Referenced by fei::MatrixReducer::MatrixReducer().

void fei::Matrix_core::parameters ( const fei::ParameterSet paramset)
protected
virtual int fei::Matrix_core::giveToUnderlyingMatrix ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
bool  sumInto,
int  format 
)
protectedpure virtual

Implemented in fei::Matrix_Impl< T >.

virtual int fei::Matrix_core::giveToBlockMatrix ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
const double *const *  values,
bool  sumInto 
)
protectedpure virtual

Implemented in fei::Matrix_Impl< T >.

virtual int fei::Matrix_core::giveToUnderlyingBlockMatrix ( int  row,
int  rowDim,
int  numCols,
const int *  cols,
const int *  LDAs,
const int *  colDims,
const double *const *  values,
bool  sumInto 
)
protectedpure virtual

Implemented in fei::Matrix_Impl< T >.

void fei::Matrix_core::setName ( const char *  name)
protected

Definition at line 143 of file fei_Matrix_core.cpp.

Referenced by Matrix_core().

void fei::Matrix_core::setCommSizes ( )
protected
int fei::Matrix_core::gatherFromOverlap ( bool  accumulate)
protected
void fei::Matrix_core::setMatrixGraph ( fei::SharedPtr< fei::MatrixGraph matrixGraph)
protected

Definition at line 399 of file fei_Matrix_core.cpp.

References fei::MatrixGraph::getRowSpace().

int fei::Matrix_core::copyPointRowsToBlockRow ( int  numPtRows,
int  numPtCols,
const double *const *  ptValues,
int  numBlkCols,
const int *  blkColDims,
double **  blkValues 
)
protected

Copy a rectangular (non-ragged) table of coefficients representing a set of point-entry matrix rows into a block-entry matrix row which is laid out as follows: blkValues[i], i in [0 .. numBlkCols-1], is an array containing the values for a single block-entry. The dimensions of the block-entry are numPtRows X blkColDims[i], and the block-entry values will be arranged in column-major order, meaning that each column of the block-entry occupies contiguous memory.

Definition at line 376 of file fei_Matrix_core.cpp.

int fei::Matrix_core::convertPtToBlk ( int  numRows,
const int *  rows,
int  numCols,
const int *  cols,
int *  blkRows,
int *  blkRowOffsets,
int *  blkCols,
int *  blkColOffsets 
)
protected

Definition at line 350 of file fei_Matrix_core.cpp.

References ERReturn, and snl_fei::PointBlockMap::getPtEqnInfo().

MPI_Comm fei::Matrix_core::getCommunicator ( ) const
inlineprotected

Definition at line 178 of file fei_Matrix_core.hpp.

References comm_.

const fei::SharedPtr<fei::VectorSpace> fei::Matrix_core::vecSpace ( ) const
inlineprotected

Definition at line 180 of file fei_Matrix_core.hpp.

References vecSpace_.

fei::SharedPtr<fei::VectorSpace> fei::Matrix_core::vecSpace ( )
inlineprotected

Definition at line 181 of file fei_Matrix_core.hpp.

References vecSpace_.

std::vector<int>& fei::Matrix_core::globalOffsets ( )
inlineprotected

Definition at line 183 of file fei_Matrix_core.hpp.

References globalOffsets_.

Referenced by fei::Matrix_Impl< T >::getGlobalNumRows().

const std::vector<int>& fei::Matrix_core::globalOffsets ( ) const
inlineprotected

Definition at line 184 of file fei_Matrix_core.hpp.

References globalOffsets_.

int fei::Matrix_core::firstLocalOffset ( ) const
inlineprotected

Definition at line 186 of file fei_Matrix_core.hpp.

References firstLocalOffset_.

Referenced by fei::Matrix_Impl< T >::getLocalNumRows().

int fei::Matrix_core::lastLocalOffset ( ) const
inlineprotected

Definition at line 187 of file fei_Matrix_core.hpp.

References lastLocalOffset_.

Referenced by fei::Matrix_Impl< T >::getLocalNumRows().

int fei::Matrix_core::numProcs ( ) const
inlineprotected

Definition at line 189 of file fei_Matrix_core.hpp.

References numProcs_.

Referenced by fei::Matrix_Impl< T >::getGlobalNumRows().

int fei::Matrix_core::localProc ( ) const
inlineprotected

Definition at line 190 of file fei_Matrix_core.hpp.

References localProc_.

bool fei::Matrix_core::haveBlockMatrix ( ) const
inlineprotected
void fei::Matrix_core::setBlockMatrix ( bool  flag)
inlineprotected

Definition at line 193 of file fei_Matrix_core.hpp.

References haveBlockMatrix_.

Referenced by fei::Matrix_Impl< T >::Matrix_Impl().

bool fei::Matrix_core::haveFEMatrix ( ) const
inlineprotected

Definition at line 195 of file fei_Matrix_core.hpp.

References haveFEMatrix_.

Referenced by fei::Matrix_Impl< T >::typeName().

void fei::Matrix_core::setFEMatrix ( bool  flag)
inlineprotected

Definition at line 196 of file fei_Matrix_core.hpp.

References haveFEMatrix_.

Referenced by fei::Matrix_Impl< T >::Matrix_Impl().

int fei::Matrix_core::getOwnerProc ( int  globalEqn) const
protected

Definition at line 152 of file fei_Matrix_core.cpp.

Member Data Documentation

std::string fei::Matrix_core::name_
protected

Definition at line 200 of file fei_Matrix_core.hpp.

std::vector<int> fei::Matrix_core::work_indices_
protected

Definition at line 202 of file fei_Matrix_core.hpp.

std::vector<int> fei::Matrix_core::work_indices2_
protected

Definition at line 203 of file fei_Matrix_core.hpp.

std::vector<int> fei::Matrix_core::work_ints_
protected

Definition at line 205 of file fei_Matrix_core.hpp.

std::vector<double> fei::Matrix_core::work_data1D_
protected

Definition at line 207 of file fei_Matrix_core.hpp.

std::vector<const double*> fei::Matrix_core::work_data2D_
protected

Definition at line 208 of file fei_Matrix_core.hpp.

fei::SharedPtr<fei::EqnComm> fei::Matrix_core::eqnComm_
protected

Definition at line 211 of file fei_Matrix_core.hpp.

Referenced by Matrix_core().

fei::SharedPtr<fei::Vector> fei::Matrix_core::rhsVector_
private

Definition at line 214 of file fei_Matrix_core.hpp.

MPI_Comm fei::Matrix_core::comm_
private

Definition at line 216 of file fei_Matrix_core.hpp.

Referenced by getCommunicator(), and Matrix_core().

int fei::Matrix_core::localProc_
private

Definition at line 218 of file fei_Matrix_core.hpp.

Referenced by localProc(), and Matrix_core().

int fei::Matrix_core::numProcs_
private

Definition at line 218 of file fei_Matrix_core.hpp.

Referenced by Matrix_core(), and numProcs().

fei::SharedPtr<fei::VectorSpace> fei::Matrix_core::vecSpace_
private

Definition at line 220 of file fei_Matrix_core.hpp.

Referenced by Matrix_core(), and vecSpace().

fei::SharedPtr<fei::MatrixGraph> fei::Matrix_core::matrixGraph_
private

Definition at line 221 of file fei_Matrix_core.hpp.

Referenced by getMatrixGraph().

std::map<int,FillableMat*> fei::Matrix_core::remotelyOwned_
private

Definition at line 223 of file fei_Matrix_core.hpp.

Referenced by getRemotelyOwnedMatrix().

FillableMat* fei::Matrix_core::remotelyOwned_last_requested_
mutableprivate

Definition at line 224 of file fei_Matrix_core.hpp.

Referenced by getRemotelyOwnedMatrix().

std::vector<int> fei::Matrix_core::sendProcs_
private

Definition at line 225 of file fei_Matrix_core.hpp.

std::vector<int> fei::Matrix_core::recvProcs_
private

Definition at line 226 of file fei_Matrix_core.hpp.

std::vector<std::vector<char> > fei::Matrix_core::recv_chars_
private

Definition at line 227 of file fei_Matrix_core.hpp.

std::vector<std::vector<char> > fei::Matrix_core::send_chars_
private

Definition at line 228 of file fei_Matrix_core.hpp.

bool fei::Matrix_core::sendRecvProcsNeedUpdated_
private

Definition at line 229 of file fei_Matrix_core.hpp.

int fei::Matrix_core::proc_last_requested_
mutableprivate

Definition at line 230 of file fei_Matrix_core.hpp.

Referenced by getRemotelyOwnedMatrix().

bool fei::Matrix_core::haveBlockMatrix_
private

Definition at line 232 of file fei_Matrix_core.hpp.

Referenced by haveBlockMatrix(), and setBlockMatrix().

bool fei::Matrix_core::haveFEMatrix_
private

Definition at line 233 of file fei_Matrix_core.hpp.

Referenced by haveFEMatrix(), and setFEMatrix().

std::vector<int> fei::Matrix_core::globalOffsets_
private

Definition at line 235 of file fei_Matrix_core.hpp.

Referenced by globalOffsets(), and Matrix_core().

int fei::Matrix_core::firstLocalOffset_
private

Definition at line 236 of file fei_Matrix_core.hpp.

Referenced by firstLocalOffset(), and Matrix_core().

int fei::Matrix_core::lastLocalOffset_
private

Definition at line 236 of file fei_Matrix_core.hpp.

Referenced by lastLocalOffset(), and Matrix_core().


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