FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
fei::impl_utils Namespace Reference

Functions

void find_offsets (const std::vector< int > &sources, const std::vector< int > &targets, std::vector< int > &offsets)
 
size_t num_bytes_FillableMat (const fei::FillableMat &mat)
 
void pack_FillableMat (const fei::FillableMat &mat, char *buffer)
 
void unpack_FillableMat (const char *buffer_begin, const char *buffer_end, fei::FillableMat &mat, bool clear_mat_on_entry, bool overwrite_entries)
 
bool unpack_CSRMat (const char *buffer_begin, const char *buffer_end, fei::CSRMat &mat)
 
size_t num_bytes_indices_coefs (const std::vector< int > &indices, const std::vector< double > &coefs)
 
void pack_indices_coefs (const std::vector< int > &indices, const std::vector< double > &coefs, std::vector< char > &buffer, bool resize_buffer)
 
void unpack_indices_coefs (const std::vector< char > &buffer, std::vector< int > &indices, std::vector< double > &coefs)
 
void separate_BC_eqns (const fei::FillableMat &mat, std::vector< int > &bcEqns, std::vector< double > &bcVals)
 
void create_col_to_row_map (const fei::FillableMat &mat, std::multimap< int, int > &crmap)
 
int remove_couplings (fei::FillableMat &mat)
 
void global_union (MPI_Comm comm, const fei::FillableMat &localMatrix, fei::FillableMat &globalUnionMatrix)
 
void global_union (MPI_Comm comm, const fei::CSVec &localVec, fei::CSVec &globalUnionVec)
 
void translate_to_reduced_eqns (const fei::Reducer &reducer, fei::CSRMat &mat)
 
void translate_to_reduced_eqns (const fei::Reducer &reducer, fei::CSVec &vec)
 
void add_to_graph (const fei::CSRMat &inmat, fei::Graph &graph)
 
void add_to_matrix (const fei::CSRMat &inmat, bool sum_into, fei::Matrix &matrix)
 

Detailed Description

The impl_utils namespace contains implementation-utilities. Helpers for implementation code, not part of the public API.

Function Documentation

void fei::impl_utils::find_offsets ( const std::vector< int > &  sources,
const std::vector< int > &  targets,
std::vector< int > &  offsets 
)

Given a vector of sources and a vector of targets, fill the offsets vector such that if offsets[i] >= 0, then sources[i] == targets[offsets[i]]. For any i such that sources[i] is not found in targets, then offsets[i] == -1. The offsets vector will have length equal to the length of sources.

For efficiency, it is assumed that both sources and targets are sorted.

Definition at line 23 of file fei_impl_utils.cpp.

Referenced by fei::multiply_trans_CSRMat_CSRMat(), and fei::multiply_trans_CSRMat_CSVec().

size_t fei::impl_utils::num_bytes_FillableMat ( const fei::FillableMat mat)
void fei::impl_utils::pack_FillableMat ( const fei::FillableMat mat,
char *  buffer 
)
void fei::impl_utils::unpack_FillableMat ( const char *  data_begin,
const char *  data_end,
fei::FillableMat mat,
bool  clear_mat_on_entry = true,
bool  overwrite_entries = true 
)

unpack a pair of std::vector objects into an fei::FillableMat object. The std::vector objects are assumed to have been produced by the function pack_FillableMat(...).

Definition at line 105 of file fei_impl_utils.cpp.

References fei::FillableMat::clear(), fei::FillableMat::putCoef(), and fei::FillableMat::sumInCoef().

Referenced by global_union().

bool fei::impl_utils::unpack_CSRMat ( const char *  buffer_begin,
const char *  buffer_end,
fei::CSRMat mat 
)

return-value is true if the unpacked matrix contains nothing but zeros...

Definition at line 153 of file fei_impl_utils.cpp.

References fei::CSRMat::getGraph(), fei::CSRMat::getPackedCoefs(), fei::SparseRowGraph::packedColumnIndices, fei::SparseRowGraph::rowNumbers, and fei::SparseRowGraph::rowOffsets.

Referenced by fei::Matrix_core::gatherFromOverlap().

size_t fei::impl_utils::num_bytes_indices_coefs ( const std::vector< int > &  indices,
const std::vector< double > &  coefs 
)

Definition at line 198 of file fei_impl_utils.cpp.

void fei::impl_utils::pack_indices_coefs ( const std::vector< int > &  indices,
const std::vector< double > &  coefs,
std::vector< char > &  buffer,
bool  resize_buffer 
)

Definition at line 207 of file fei_impl_utils.cpp.

Referenced by fei::Vector_core::pack_send_buffers().

void fei::impl_utils::unpack_indices_coefs ( const std::vector< char > &  buffer,
std::vector< int > &  indices,
std::vector< double > &  coefs 
)

Definition at line 235 of file fei_impl_utils.cpp.

Referenced by fei::Vector_core::gatherFromOverlap().

void fei::impl_utils::separate_BC_eqns ( const fei::FillableMat mat,
std::vector< int > &  bcEqns,
std::vector< double > &  bcVals 
)
void fei::impl_utils::create_col_to_row_map ( const fei::FillableMat mat,
std::multimap< int, int > &  crmap 
)
int fei::impl_utils::remove_couplings ( fei::FillableMat mat)
void fei::impl_utils::global_union ( MPI_Comm  comm,
const fei::FillableMat localMatrix,
fei::FillableMat globalUnionMatrix 
)
void fei::impl_utils::global_union ( MPI_Comm  comm,
const fei::CSVec localVec,
fei::CSVec globalUnionVec 
)
void fei::impl_utils::translate_to_reduced_eqns ( const fei::Reducer reducer,
fei::CSRMat mat 
)
void fei::impl_utils::translate_to_reduced_eqns ( const fei::Reducer reducer,
fei::CSVec vec 
)
void fei::impl_utils::add_to_graph ( const fei::CSRMat inmat,
fei::Graph graph 
)
void fei::impl_utils::add_to_matrix ( const fei::CSRMat inmat,
bool  sum_into,
fei::Matrix matrix 
)