|
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 { 00022 namespace linsys { 00023 00035 void add_connectivities(stk::linsys::LinearSystemInterface& ls, 00036 stk::mesh::EntityRank from_type, 00037 stk::mesh::EntityRank to_connected_type, 00038 const stk::mesh::FieldBase& field, 00039 const stk::mesh::Selector& selector, 00040 const stk::mesh::BulkData& mesh_bulk); 00041 00050 void dirichlet_bc(stk::linsys::LinearSystemInterface& ls, 00051 const stk::mesh::BulkData& mesh, 00052 const stk::mesh::Part& bcpart, 00053 stk::mesh::EntityRank entity_rank, 00054 const stk::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 00076 00082 void copy_vector_to_mesh( fei::Vector & vec, 00083 const DofMapper & dof, 00084 stk::mesh::BulkData & mesh_bulk_data 00085 ); 00086 00089 void scale_matrix(double scalar, fei::Matrix& matrix); 00090 00093 void add_matrix_to_matrix(double scalar, 00094 const fei::Matrix& src_matrix, 00095 fei::Matrix& dest_matrix); 00096 00099 void scale_vector(double scalar, 00100 fei::Vector& vec); 00101 00104 void add_vector_to_vector(double scalar, 00105 const fei::Vector& src_vector, 00106 fei::Vector& dest_vector); 00107 00108 }//namespace linsys 00109 }//namespace stk 00110 00111 #endif 00112