stk::linsys::AggregateLinearSystem Class Reference

Container for holding and manipulating collections of matrices and vectors. More...

#include <AggregateLinearSystem.hpp>

Inherits stk::linsys::LinearSystemInterface.

List of all members.

Public Member Functions

 AggregateLinearSystem (MPI_Comm comm, fei::SharedPtr< fei::Factory > factory, size_t num_matrices, size_t num_rhsvecs)
 Constructor.
virtual ~AggregateLinearSystem ()
 Destructor.
void synchronize_mappings_and_structure ()
 This is a collective call -- will hang if only a subset of processors call it.
void create_fei_LinearSystem ()
 Uses the fei::Factory (that was passed as a constructor argument) to create a fei::LinearSystem and populate it with a fei::Matrix and fei::Vectors.
fei::SharedPtr< fei::Matrix > get_matrix (size_t index)
 Return the matrix at offset 'index' in the internally-stored array of matrices.
fei::SharedPtr< fei::Vector > get_rhsvec (size_t index)
 Return the rhs-vec at offset 'index' in the internally-stored array of rhs-vectors.
void aggregate_system (const std::vector< double > &mat_scalars, const std::vector< double > &rhs_scalars)
 Given arrays of scalars (which must have the same lengths as specified when this class was constructed), form an aggregate linear system as described in the class-description comments above.
void finalize_assembly ()
 This is a collective call -- will hang if only a subset of processors call it.
const DofMapperget_DofMapper () const
 Return DOF-mapping object.
DofMapperget_DofMapper ()
 Return DOF-mapping object.
const fei::SharedPtr
< fei::MatrixGraph > 
get_fei_MatrixGraph () const
 Return fei::MatrixGraph object.
fei::SharedPtr< fei::MatrixGraph > get_fei_MatrixGraph ()
 Return fei::MatrixGraph object.
const fei::SharedPtr
< fei::LinearSystem > 
get_fei_LinearSystem () const
 Return fei::LinearSystem object.
fei::SharedPtr< fei::LinearSystem > get_fei_LinearSystem ()
 Return fei::LinearSystem object.
int solve (int &status, const Teuchos::ParameterList &params)
 Solve the linear system.

Detailed Description

Container for holding and manipulating collections of matrices and vectors.

This class provides the ability to form a linear system in which the matrix is a linear combination of other matrices, and the right-hand-side is a linear combination of other vectors. If n matrices A[0..n-1] and m vectors b[0..n-1] are each assembled, then the 'aggregate' linear-system is formed with A = sum(alpha[i]*A[i]) and b = sum(beta[i]*b[i]) where alpha and beta are arrays of scalars provided by the calling code.

Definition at line 32 of file AggregateLinearSystem.hpp.


Member Function Documentation

void stk::linsys::AggregateLinearSystem::synchronize_mappings_and_structure (  ) 

This is a collective call -- will hang if only a subset of processors call it.

Internally calls fei::MatrixGraph::initComplete() and DofMapper::finalize().

Definition at line 33 of file AggregateLinearSystem.cpp.

void stk::linsys::AggregateLinearSystem::finalize_assembly (  ) 

This is a collective call -- will hang if only a subset of processors call it.

Internally calls fei::LinearSystem::loadComplete(), which in turn calls fei::Matrix::globalAssemble() and fei::Vector::gatherFromOverlap(). These operations perform communication to move shared contributions to owning processors, etc.

Definition at line 107 of file AggregateLinearSystem.cpp.

int stk::linsys::AggregateLinearSystem::solve ( int &  status,
const Teuchos::ParameterList &  params 
)

Solve the linear system.

Parameters:
status Output 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.
params Teuchos::ParameterList for the solver
Returns:
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 149 of file AggregateLinearSystem.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Apr 13 10:05:50 2011 for Sierra Toolkit by  doxygen 1.6.3