fei_impl_utils.hpp

00001 #ifndef _fei_impl_utils_hpp_
00002 #define _fei_impl_utils_hpp_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2008 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 #include <fei_macros.hpp>
00013 #include <fei_fwd.hpp>
00014 #include <fei_mpi.h>
00015 
00016 #include <Teuchos_ParameterList.hpp>
00017 
00018 #include <string>
00019 #include <vector>
00020 #include <map>
00021 
00022 
00025 namespace fei {
00026 
00030 namespace impl_utils {
00031 
00039 void find_offsets(const std::vector<int>& sources,
00040                   const std::vector<int>& targets,
00041                   std::vector<int>& offsets);
00042 
00045 void pack_FillableMat(const fei::FillableMat& mat,
00046                       std::vector<int>& intdata,
00047                       std::vector<double>& doubledata);
00048 
00053 void unpack_FillableMat(const std::vector<int>& intdata,
00054                         const std::vector<double>& doubledata,
00055                         fei::FillableMat& mat,
00056                         bool clear_mat_on_entry = true,
00057                         bool overwrite_entries = true);
00058 
00059 void separate_BC_eqns(const fei::FillableMat& mat,
00060                     std::vector<int>& bcEqns,
00061                     std::vector<double>& bcVals);
00062 
00063 void create_col_to_row_map(const fei::FillableMat& mat,
00064                            std::multimap<int,int>& crmap);
00065 
00066 int remove_couplings(fei::FillableMat& mat);
00067 
00068 void global_union(MPI_Comm comm,
00069                   const fei::FillableMat& localMatrix,
00070                   fei::FillableMat& globalUnionMatrix);
00071 
00072 void global_union(MPI_Comm comm,
00073                   const fei::CSVec& localVec,
00074                   fei::CSVec& globalUnionVec);
00075 
00076 void translate_to_reduced_eqns(const fei::Reducer& reducer, fei::CSRMat& mat);
00077 
00078 void translate_to_reduced_eqns(const fei::Reducer& reducer, fei::CSVec& vec);
00079 
00080 void add_to_graph(const fei::CSRMat& inmat, fei::Graph& graph);
00081 
00082 void add_to_matrix(const fei::CSRMat& inmat, bool sum_into, fei::Matrix& matrix);
00083 
00084 }//namespace impl_utils
00085 }//namespace fei
00086 
00087 #endif
00088 

Generated on Tue Jul 13 09:27:45 2010 for FEI by  doxygen 1.4.7