|
Sierra Toolkit
Version of the Day
|
00001 /*------------------------------------------------------------------------*/ 00002 /* Copyright 2010 Sandia Corporation. */ 00003 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ 00004 /* license for use of this work by or on behalf of the U.S. Government. */ 00005 /* Export of this program may require a license from the */ 00006 /* United States Government. */ 00007 /*------------------------------------------------------------------------*/ 00008 00009 #ifndef stk_linsys_LinearSystem_hpp 00010 #define stk_linsys_LinearSystem_hpp 00011 00012 #include <stk_linsys/FeiBaseIncludes.hpp> 00013 #include <stk_linsys/DofMapper.hpp> 00014 #include <stk_linsys/LinearSystemInterface.hpp> 00015 00016 #include <Teuchos_ParameterList.hpp> 00017 00018 namespace stk_classic { 00019 namespace linsys { 00020 00024 class LinearSystem : public LinearSystemInterface { 00025 public: 00027 LinearSystem(MPI_Comm comm, fei::SharedPtr<fei::Factory> factory); 00028 00030 virtual ~LinearSystem(); 00031 00032 void set_parameters(Teuchos::ParameterList& paramlist); 00033 00039 void synchronize_mappings_and_structure(); 00040 00045 void create_fei_LinearSystem(); 00046 00054 void finalize_assembly(); 00055 00057 const DofMapper& get_DofMapper() const; 00058 00060 DofMapper& get_DofMapper(); 00061 00062 void reset_to_zero(); 00063 00065 const fei::SharedPtr<fei::MatrixGraph> get_fei_MatrixGraph() const; 00066 00068 fei::SharedPtr<fei::MatrixGraph> get_fei_MatrixGraph(); 00069 00071 const fei::SharedPtr<fei::LinearSystem> get_fei_LinearSystem() const; 00072 00074 fei::SharedPtr<fei::LinearSystem> get_fei_LinearSystem(); 00075 00076 void write_files(const std::string& base_name) const; 00077 00094 int solve(int & status, const Teuchos::ParameterList & params); 00095 00096 private: 00097 00098 fei::SharedPtr<fei::Factory> m_fei_factory; 00099 DofMapper m_dof_mapper; 00100 fei::SharedPtr<fei::MatrixGraph> m_fei_mgraph; 00101 00102 fei::SharedPtr<fei::LinearSystem> m_fei_linearsystem; 00103 fei::ParameterSet m_param_set; 00104 };//class LinearSystem 00105 00106 }//namespace linsys 00107 }//namespace stk_classic 00108 00109 #endif 00110