|
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_LinsysFunctions_hpp 00010 #define stk_linsys_LinsysFunctions_hpp 00011 00012 #include <stk_linsys/LinearSystemInterface.hpp> 00013 00014 #include <stk_mesh/base/Field.hpp> 00015 #include <stk_mesh/base/Selector.hpp> 00016 #include <stk_mesh/base/BulkData.hpp> 00017 00018 #include <Teuchos_ParameterList.hpp> 00019 00020 00021 namespace stk_classic { 00022 namespace linsys { 00023 00035 void add_connectivities(stk_classic::linsys::LinearSystemInterface& ls, 00036 stk_classic::mesh::EntityRank from_type, 00037 stk_classic::mesh::EntityRank to_connected_type, 00038 const stk_classic::mesh::FieldBase& field, 00039 const stk_classic::mesh::Selector& selector, 00040 const stk_classic::mesh::BulkData& mesh_bulk); 00041 00050 void dirichlet_bc(stk_classic::linsys::LinearSystemInterface& ls, 00051 const stk_classic::mesh::BulkData& mesh, 00052 const stk_classic::mesh::Part& bcpart, 00053 stk_classic::mesh::EntityRank entity_rank, 00054 const stk_classic::mesh::FieldBase& field, 00055 unsigned field_component, 00056 double prescribed_value); 00057 00058 00074 int fei_solve(int & status, fei::LinearSystem &fei_ls, const Teuchos::ParameterList & params); 00075 00078 double compute_residual_norm2(fei::LinearSystem& fei_ls, fei::Vector& r); 00079 00085 void copy_vector_to_mesh( fei::Vector & vec, 00086 const DofMapper & dof, 00087 stk_classic::mesh::BulkData & mesh_bulk_data 00088 ); 00089 00092 void scale_matrix(double scalar, fei::Matrix& matrix); 00093 00096 void add_matrix_to_matrix(double scalar, 00097 const fei::Matrix& src_matrix, 00098 fei::Matrix& dest_matrix); 00099 00102 void scale_vector(double scalar, 00103 fei::Vector& vec); 00104 00107 void add_vector_to_vector(double scalar, 00108 const fei::Vector& src_vector, 00109 fei::Vector& dest_vector); 00110 00111 }//namespace linsys 00112 }//namespace stk_classic 00113 00114 #endif 00115