FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
fei_impl_utils.hpp
Go to the documentation of this file.
1#ifndef _fei_impl_utils_hpp_
2#define _fei_impl_utils_hpp_
3
4/*--------------------------------------------------------------------*/
5/* Copyright 2008 Sandia Corporation. */
6/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7/* non-exclusive license for use of this work by or on behalf */
8/* of the U.S. Government. Export of this program may require */
9/* a license from the United States Government. */
10/*--------------------------------------------------------------------*/
11
12#include <fei_macros.hpp>
13#include <fei_fwd.hpp>
14#include <fei_mpi.h>
15
16#include <Teuchos_ParameterList.hpp>
17
18#include <string>
19#include <vector>
20#include <map>
21
22
25namespace fei {
26
30namespace impl_utils {
31
39void find_offsets(const std::vector<int>& sources,
40 const std::vector<int>& targets,
41 std::vector<int>& offsets);
42
44
45void pack_FillableMat(const fei::FillableMat& mat, char* buffer);
46
51void unpack_FillableMat(const char* data_begin, const char* data_end,
53 bool clear_mat_on_entry = true,
54 bool overwrite_entries = true);
55
57bool unpack_CSRMat(const char* buffer_begin, const char* buffer_end, fei::CSRMat& mat);
58
59size_t num_bytes_indices_coefs(const std::vector<int>& indices,
60 const std::vector<double>& coefs);
61
62void pack_indices_coefs(const std::vector<int>& indices,
63 const std::vector<double>& coefs,
64 std::vector<char>& buffer,
65 bool resize_buffer=true);
66
67void unpack_indices_coefs(const std::vector<char>& buffer,
68 std::vector<int>& indices,
69 std::vector<double>& coefs);
70
72 std::vector<int>& bcEqns,
73 std::vector<double>& bcVals);
74
76 std::multimap<int,int>& crmap);
77
79
80void global_union(MPI_Comm comm,
81 const fei::FillableMat& localMatrix,
82 fei::FillableMat& globalUnionMatrix);
83
84void global_union(MPI_Comm comm,
85 const fei::CSVec& localVec,
86 fei::CSVec& globalUnionVec);
87
88void translate_to_reduced_eqns(const fei::Reducer& reducer, fei::CSRMat& mat);
89
90void translate_to_reduced_eqns(const fei::Reducer& reducer, fei::CSVec& vec);
91
92void add_to_graph(const fei::CSRMat& inmat, fei::Graph& graph);
93
94void add_to_matrix(const fei::CSRMat& inmat, bool sum_into, fei::Matrix& matrix);
95
96}//namespace impl_utils
97}//namespace fei
98
99#endif
100
#define MPI_Comm
Definition fei_mpi.h:56
size_t num_bytes_FillableMat(const fei::FillableMat &mat)
size_t num_bytes_indices_coefs(const std::vector< int > &indices, const std::vector< double > &coefs)
void global_union(MPI_Comm comm, const fei::FillableMat &localMatrix, fei::FillableMat &globalUnionMatrix)
void translate_to_reduced_eqns(const fei::Reducer &reducer, fei::CSRMat &mat)
void find_offsets(const std::vector< int > &sources, const std::vector< int > &targets, std::vector< int > &offsets)
void separate_BC_eqns(const fei::FillableMat &mat, std::vector< int > &bcEqns, std::vector< double > &bcVals)
void add_to_matrix(const fei::CSRMat &inmat, bool sum_into, fei::Matrix &matrix)
bool unpack_CSRMat(const char *buffer_begin, const char *buffer_end, fei::CSRMat &mat)
int remove_couplings(fei::FillableMat &mat)
void unpack_FillableMat(const char *buffer_begin, const char *buffer_end, fei::FillableMat &mat, bool clear_mat_on_entry, bool overwrite_entries)
void pack_FillableMat(const fei::FillableMat &mat, char *buffer)
void create_col_to_row_map(const fei::FillableMat &mat, std::multimap< int, int > &crmap)
void unpack_indices_coefs(const std::vector< char > &buffer, std::vector< int > &indices, 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 add_to_graph(const fei::CSRMat &inmat, fei::Graph &graph)