FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
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) |
The impl_utils namespace contains implementation-utilities. Helpers for implementation code, not part of the public API.
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 | ) |
Definition at line 52 of file fei_impl_utils.cpp.
References fei::count_nnz(), and fei::FillableMat::getNumRows().
Referenced by global_union(), and fei::Matrix_core::setCommSizes().
void fei::impl_utils::pack_FillableMat | ( | const fei::FillableMat & | mat, |
char * | buffer | ||
) |
Definition at line 64 of file fei_impl_utils.cpp.
References fei::FillableMat::begin(), fei::CSVec::coefs(), fei::count_nnz(), fei::FillableMat::end(), fei::FillableMat::getNumRows(), fei::CSVec::indices(), and fei::CSVec::size().
Referenced by fei::Matrix_core::gatherFromOverlap(), global_union(), and fei::Matrix_core::setCommSizes().
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 | ||
) |
Definition at line 258 of file fei_impl_utils.cpp.
References fei::FillableMat::begin(), fei::console_out(), fei::FillableMat::end(), and fei::get_entry().
Referenced by extractDirichletBCs(), LinSysCoreFilter::implementAllBCs(), and snl_fei::LinearSystem_FEData::implementBCs().
void fei::impl_utils::create_col_to_row_map | ( | const fei::FillableMat & | mat, |
std::multimap< int, int > & | crmap | ||
) |
Definition at line 290 of file fei_impl_utils.cpp.
References fei::FillableMat::begin(), fei::FillableMat::end(), fei::get_row_numbers(), fei::FillableMat::getNumRows(), and fei::CSVec::indices().
Referenced by remove_couplings().
int fei::impl_utils::remove_couplings | ( | fei::FillableMat & | mat | ) |
Definition at line 319 of file fei_impl_utils.cpp.
References fei::add_entries(), fei::FillableMat::begin(), fei::CSVec::coefs(), fei::console_out(), create_col_to_row_map(), fei::FillableMat::create_or_getRow(), fei::FillableMat::end(), FEI_ENDL, fei::get_entry(), fei::get_row_numbers(), fei::CSVec::indices(), fei::remove_entry(), and fei::CSVec::size().
Referenced by fei::MatrixGraph_Impl2::createSlaveMatrices().
void fei::impl_utils::global_union | ( | MPI_Comm | comm, |
const fei::FillableMat & | localMatrix, | ||
fei::FillableMat & | globalUnionMatrix | ||
) |
Definition at line 385 of file fei_impl_utils.cpp.
References fei::Allgatherv(), fei::localProc(), num_bytes_FillableMat(), fei::numProcs(), pack_FillableMat(), and unpack_FillableMat().
Referenced by fei::MatrixGraph_Impl2::createSlaveMatrices(), and snl_fei::LinearSystem_General::implementBCs().
void fei::impl_utils::global_union | ( | MPI_Comm | comm, |
const fei::CSVec & | localVec, | ||
fei::CSVec & | globalUnionVec | ||
) |
Definition at line 434 of file fei_impl_utils.cpp.
References fei::Allgatherv(), fei::CSVec::coefs(), fei::CSVec::indices(), and fei::put_entry().
void fei::impl_utils::translate_to_reduced_eqns | ( | const fei::Reducer & | reducer, |
fei::CSRMat & | mat | ||
) |
Definition at line 488 of file fei_impl_utils.cpp.
References fei::CSRMat::getGraph(), fei::SparseRowGraph::packedColumnIndices, fei::SparseRowGraph::rowNumbers, and fei::Reducer::translateToReducedEqn().
Referenced by fei::Reducer::assembleReducedGraph(), fei::Reducer::assembleReducedMatrix(), and fei::Reducer::assembleReducedVector().
void fei::impl_utils::translate_to_reduced_eqns | ( | const fei::Reducer & | reducer, |
fei::CSVec & | vec | ||
) |
Definition at line 504 of file fei_impl_utils.cpp.
References fei::CSVec::indices(), and fei::Reducer::translateToReducedEqn().
void fei::impl_utils::add_to_graph | ( | const fei::CSRMat & | inmat, |
fei::Graph & | graph | ||
) |
Definition at line 513 of file fei_impl_utils.cpp.
References fei::Graph::addIndices(), fei::CSRMat::getGraph(), fei::SparseRowGraph::packedColumnIndices, fei::SparseRowGraph::rowNumbers, and fei::SparseRowGraph::rowOffsets.
Referenced by fei::Reducer::assembleReducedGraph().
void fei::impl_utils::add_to_matrix | ( | const fei::CSRMat & | inmat, |
bool | sum_into, | ||
fei::Matrix & | matrix | ||
) |
Definition at line 532 of file fei_impl_utils.cpp.
References fei::Matrix::copyIn(), FEI_DENSE_ROW, fei::CSRMat::getGraph(), fei::CSRMat::getPackedCoefs(), fei::SparseRowGraph::packedColumnIndices, fei::SparseRowGraph::rowNumbers, fei::SparseRowGraph::rowOffsets, and fei::Matrix::sumIn().
Referenced by fei::Reducer::assembleReducedMatrix().