Sierra Toolkit Version of the Day
stk::linsys Namespace Reference


namespace  impl


class  AggregateLinearSystem
class  DofMapper
class  LinearSystem


typedef std::map< const
stk::mesh::FieldBase *, int > 


void add_connectivities (stk::linsys::LinearSystemInterface &ls, stk::mesh::EntityRank entity_rank, stk::mesh::EntityRank connected_entity_rank, const stk::mesh::FieldBase &field, const stk::mesh::Selector &selector, const stk::mesh::BulkData &mesh_bulk)
void dirichlet_bc (stk::linsys::LinearSystemInterface &ls, const stk::mesh::BulkData &mesh, const stk::mesh::Part &bcpart, stk::mesh::EntityRank entity_rank, const stk::mesh::FieldBase &field, unsigned field_component, double prescribed_value)
int fei_solve (int &status, fei::LinearSystem &fei_ls, const Teuchos::ParameterList &params)
double compute_residual_norm2 (fei::LinearSystem &fei_ls, fei::Vector &r)
void copy_vector_to_mesh (fei::Vector &vec, const DofMapper &dof, stk::mesh::BulkData &mesh_bulk_data)
void scale_matrix (double scalar, fei::Matrix &matrix)
void add_matrix_to_matrix (double scalar, const fei::Matrix &src_matrix, fei::Matrix &dest_matrix)
void scale_vector (double scalar, fei::Vector &vec)
void add_vector_to_vector (double scalar, const fei::Vector &src_vector, fei::Vector &dest_vector)

Detailed Description

Linear-System Assembly

Typedef Documentation

typedef std::map<const stk::mesh::FieldBase*,int> stk::linsys::FieldIdMap

Mappings from stk::mesh::Field objects to integer ids used by fei objects.

Definition at line 20 of file FieldIdMap.hpp.

Function Documentation

void stk::linsys::add_connectivities ( stk::linsys::LinearSystemInterface &  ls,
stk::mesh::EntityRank  from_type,
stk::mesh::EntityRank  to_connected_type,
const stk::mesh::FieldBase field,
const stk::mesh::Selector selector,
const stk::mesh::BulkData mesh_bulk 

Add connectivities (matrix-graph sparsity contributions) to the fei::MatrixGraph object in the specified LinearSystemInterface object.

Connectivities are connections between two types of entities that are related to each other in the mesh. The most common example of this is element-to-node connectivities. So when from_type is element and to_connected_type is node, the matrix-graph will be populated with connectivities for nodes connected to each element selected by the given selector.

Definition at line 25 of file LinsysFunctions.cpp.

void stk::linsys::dirichlet_bc ( stk::linsys::LinearSystemInterface &  ls,
const stk::mesh::BulkData mesh,
const stk::mesh::Part bcpart,
stk::mesh::EntityRank  entity_rank,
const stk::mesh::FieldBase field,
unsigned  field_component,
double  prescribed_value 

Apply a Dirichlet boundary-condition for the specified field, on entities of the specified entity-type which are members of the specified Part. Obtains the list of entity-ids and passes that along with the prescribed value, etc., to the fei::LinearSystem object. The corresponding modifications to the matrix and vector will be made when LinearSystemInterface::finalize_assembly() is called.

Definition at line 77 of file LinsysFunctions.cpp.

int stk::linsys::fei_solve ( int &  status,
fei::LinearSystem &  fei_ls,
const Teuchos::ParameterList &  params 

Create an fei::Solver instance and perform a linear-solve on the matrix and vectors contained in the given fei::LinearSystem instance.

statusOutput flag indicating the termination condition of the underlying linear-solver. Values are solver-specific. In general, 0 indicates that the solver achieved a solution that satisfied the stopping test, within the iteration limit, etc. If an iterative solver fails to converge, this status value will generally be non-zero, but the actual value can vary by solver-library.
error-code 0 if successful. Note that a 0 error-return does not necessarily mean that the underlying solver achieved a solution. It simply means that no fatal errors were encountered, such as allocation failures, etc.

Definition at line 110 of file LinsysFunctions.cpp.

double stk::linsys::compute_residual_norm2 ( fei::LinearSystem &  fei_ls,
fei::Vector &  r 

Return a 2-norm of |b - A*x|

!!!!! fix this !!!!!!!!!

Definition at line 129 of file LinsysFunctions.cpp.

void stk::linsys::copy_vector_to_mesh ( fei::Vector &  vec,
const DofMapper &  dof,
stk::mesh::BulkData mesh_bulk_data 

Copy the contents of an fei::Vector to the corresponding field-data locations in a stk::mesh::BulkData instance. This function first calls vec.scatterToOverlap() to ensure that coefficients for shared-entities are available on all sharing processors.

Definition at line 163 of file LinsysFunctions.cpp.

void stk::linsys::scale_matrix ( double  scalar,
fei::Matrix &  matrix 

Scale matrix by a scalar: matrix = scalar*matrix

Definition at line 218 of file LinsysFunctions.cpp.

void stk::linsys::add_matrix_to_matrix ( double  scalar,
const fei::Matrix &  src_matrix,
fei::Matrix &  dest_matrix 

Add a scaled matrix to another: dest += scalar*src

Definition at line 249 of file LinsysFunctions.cpp.

void stk::linsys::scale_vector ( double  scalar,
fei::Vector &  vec 

Scale vector by a scalar: vec = scalar*vec

Definition at line 282 of file LinsysFunctions.cpp.

void stk::linsys::add_vector_to_vector ( double  scalar,
const fei::Vector &  src_vector,
fei::Vector &  dest_vector 

Add a scaled vector to another: dest += scalar*src

Definition at line 302 of file LinsysFunctions.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends