AbstractLinAlgPack::BasisSystemComposite Class Reference

Simple BasisSystem subclass the case where the client sets up seperate C and N matrices. More...

#include <AbstractLinAlgPack_BasisSystemComposite.hpp>

Inheritance diagram for AbstractLinAlgPack::BasisSystemComposite:

Inheritance graph
[legend]
List of all members.

Public types

typedef Teuchos::RCP< const
Teuchos::AbstractFactory<
MatrixOp > > 
fcty_Gc_ptr_t
 
typedef Teuchos::RCP< MatrixOpNonsingC_ptr_t
 
typedef Teuchos::RCP< MatrixOpN_ptr_t
 

Constructors / initializers

 BasisSystemComposite ()
 BasisSystemComposite (const VectorSpace::space_ptr_t &space_x, const VectorSpace::space_ptr_t &space_c, const mat_nonsing_fcty_ptr_t &factory_C, const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S)
 Calls this->initialize() in a way that is consistant with above helper functions.
 BasisSystemComposite (const VectorSpace::space_ptr_t &space_x, const Range1D &var_dep, const Range1D &var_indep, const VectorSpace::space_ptr_t &space_c, const mat_nonsing_fcty_ptr_t &factory_C, const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S, const mat_fcty_ptr_t &factory_D=Teuchos::null)
 Calls this->initialize().
void initialize (const VectorSpace::space_ptr_t &space_x, const Range1D &var_dep, const Range1D &var_indep, const VectorSpace::space_ptr_t &space_c, const mat_nonsing_fcty_ptr_t &factory_C, const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S, const mat_fcty_ptr_t &factory_D=Teuchos::null)
 Initialize.
virtual void set_uninitialized ()
 Set uninitialized.

Access

const VectorSpace::space_ptr_tspace_x () const
 
const VectorSpace::space_ptr_tspace_c () const
 

To be overridden by subclasses

virtual void update_D (const MatrixOpNonsing &C, const MatrixOp &N, MatrixOp *D, EMatRelations mat_rel) const
 Overridden by subclasses to update D if a specialized implementation is needed.

Overridden from BasisSystem

const mat_nonsing_fcty_ptr_t factory_C () const
 
const mat_fcty_ptr_t factory_D () const
 
Range1D var_dep () const
 
Range1D var_indep () const
 
void update_basis (const MatrixOp &Gc, MatrixOpNonsing *C, MatrixOp *D, MatrixOp *GcUP, EMatRelations mat_rel, std::ostream *out) const
 

Static member functions

static void initialize_space_x (const VectorSpace::space_ptr_t &space_xD, const VectorSpace::space_ptr_t &space_xI, Range1D *var_dep, Range1D *var_indep, VectorSpace::space_ptr_t *space_x)
 Initialize the composite vector space for x = [ xD; xI ] as well as var_dep and var_indep.
static const fcty_Gc_ptr_t factory_Gc ()
 Return a matrix factory object for the composte Gc matrix object.
static void initialize_Gc (const VectorSpace::space_ptr_t &space_x, const Range1D &var_dep, const Range1D &var_indep, const VectorSpace::space_ptr_t &space_c, const C_ptr_t &C, const N_ptr_t &N, MatrixOp *Gc)
 Initialize the Gc matrix object given created from space_Gc()->create().
static void get_C_N (MatrixOp *Gc, MatrixOpNonsing **C, MatrixOp **N)
 Get the non-const aggregate matrices C and N (or NULL pointers if not initialized).
static void get_C_N (const MatrixOp &Gc, const MatrixOpNonsing **C, const MatrixOp **N)
 Get the const aggregate matrices C and N.

Detailed Description

Simple BasisSystem subclass the case where the client sets up seperate C and N matrices.

This interface is based an implementation where C and N are manipulated by the application and are concatenated into Gc = [ C'; N' ]. Here, there are no undecomposed equality constraints allowed.

For this implementation, the basis matrix C must override the method MatrixOp::operator=() for correct behavior. A smart implementation of the basis matrix subclass will use lazy evaluation and not copy data inside of MatrixOp::operator=() unless necessary later on.

Definition at line 47 of file AbstractLinAlgPack_BasisSystemComposite.hpp.


Member Typedef Documentation

typedef Teuchos::RCP<const Teuchos::AbstractFactory<MatrixOp> > AbstractLinAlgPack::BasisSystemComposite::fcty_Gc_ptr_t

Definition at line 56 of file AbstractLinAlgPack_BasisSystemComposite.hpp.

typedef Teuchos::RCP<MatrixOpNonsing> AbstractLinAlgPack::BasisSystemComposite::C_ptr_t

Definition at line 58 of file AbstractLinAlgPack_BasisSystemComposite.hpp.

typedef Teuchos::RCP<MatrixOp> AbstractLinAlgPack::BasisSystemComposite::N_ptr_t

Definition at line 60 of file AbstractLinAlgPack_BasisSystemComposite.hpp.


Constructor & Destructor Documentation

AbstractLinAlgPack::BasisSystemComposite::BasisSystemComposite (  ) 

Default constructor.

Definition at line 278 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

AbstractLinAlgPack::BasisSystemComposite::BasisSystemComposite ( const VectorSpace::space_ptr_t space_x,
const VectorSpace::space_ptr_t space_c,
const mat_nonsing_fcty_ptr_t factory_C,
const mat_sym_fcty_ptr_t factory_transDtD,
const mat_sym_nonsing_fcty_ptr_t factory_S 
)

Calls this->initialize() in a way that is consistant with above helper functions.

Definition at line 282 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

AbstractLinAlgPack::BasisSystemComposite::BasisSystemComposite ( const VectorSpace::space_ptr_t space_x,
const Range1D var_dep,
const Range1D var_indep,
const VectorSpace::space_ptr_t space_c,
const mat_nonsing_fcty_ptr_t factory_C,
const mat_sym_fcty_ptr_t factory_transDtD,
const mat_sym_nonsing_fcty_ptr_t factory_S,
const mat_fcty_ptr_t factory_D = Teuchos::null 
)

Calls this->initialize().

Definition at line 299 of file AbstractLinAlgPack_BasisSystemComposite.cpp.


Member Function Documentation

void AbstractLinAlgPack::BasisSystemComposite::initialize_space_x ( const VectorSpace::space_ptr_t space_xD,
const VectorSpace::space_ptr_t space_xI,
Range1D var_dep,
Range1D var_indep,
VectorSpace::space_ptr_t space_x 
) [static]

Initialize the composite vector space for x = [ xD; xI ] as well as var_dep and var_indep.

Parameters:
space_xD [in/out] Vector space for the dependent variables. On output space_xD.count() will be incremented by 1.
space_xI [in/out] Vector space for the independent variables. It is allowed for space_xI.get()==NULL in which case there are no independent variables. If space_xI.get()!=NULL then on output space_xI.count() will be incremented by 1.
var_dep [out] Range for dependent variables in output space_x
var_indep [out] Range for independent variables in output space_x. Only applicable if space_xI.get()!=NULL.
space_x [out] If space_xI.get()!=NULL then on output this will be the newly formed composite vector space space_x = [ space_xD; space_xI ]. The object *space_x will be dependent on the objects *space_xD *space_xI. If the client wants *space_x to be independent from these vector space objects then space_x->clone() can be used. If space_xI.get()==NULL then on output *space_x=space_xD will just be performed.
Preconditions:

Postconditions:

Definition at line 73 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

const BasisSystemComposite::fcty_Gc_ptr_t AbstractLinAlgPack::BasisSystemComposite::factory_Gc (  )  [static]

Return a matrix factory object for the composte Gc matrix object.

Definition at line 110 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::initialize_Gc ( const VectorSpace::space_ptr_t space_x,
const Range1D var_dep,
const Range1D var_indep,
const VectorSpace::space_ptr_t space_c,
const C_ptr_t C,
const N_ptr_t N,
MatrixOp Gc 
) [static]

Initialize the Gc matrix object given created from space_Gc()->create().

Initializes the composite matrix object:

   Gc = [ C'; N' ]
   

Parameters:
space_x [in] Vector space for the variables (returned from initialize_space_x()).
var_dep [in] Range for dependent variables in space_x.
var_indep [in] Range for independent variables in space_x.
space_c [in] Vector space for the equality constraints.
C [in/out] Nonsingular basis matrix, initialized and ready to go. On output C.count() will be incremented by 1.
N [in/out] Non-basis matrix, initialized and ready to go. On output N.count() will be incremented by 1.
Gc [in/out] Composite matrix object that on output is initialized with. C and N.
Preconditions:

Postconditions:

Definition at line 116 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::get_C_N ( MatrixOp Gc,
MatrixOpNonsing **  C,
MatrixOp **  N 
) [static]

Get the non-const aggregate matrices C and N (or NULL pointers if not initialized).

Parameters:
Gc [in] Composite matrix object Gc = [ C'; N' ]
C [out] Pointer to basis matrix object C. If Gc has not been initialized then *C == NULL on output.
N [out] Pointer to nonbasis matrix object N. If Gc has not been initialized then *N == NULL on output. Preconditions:
  • Gc != NULL (throw std::invalid_argument)
  • C != NULL (throw std::invalid_argument)
  • [Gc->rows() < Gc->cols()] N != NULL (throw std::invalid_argument)
  • [Gc->rows() == Gc->cols()] N == NULL (throw std::invalid_argument)

Definition at line 188 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::get_C_N ( const MatrixOp Gc,
const MatrixOpNonsing **  C,
const MatrixOp **  N 
) [static]

Get the const aggregate matrices C and N.

Parameters:
Gc [in] Composite matrix object Gc = [ C'; N' ]. If this matrix object has not been initialized with C and N matrix objects then an exception is thown.
C [out] Pointer to basis matrix object C.
N [out] Pointer to nonbasis matrix object N.
Preconditions:

Definition at line 234 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::initialize ( const VectorSpace::space_ptr_t space_x,
const Range1D var_dep,
const Range1D var_indep,
const VectorSpace::space_ptr_t space_c,
const mat_nonsing_fcty_ptr_t factory_C,
const mat_sym_fcty_ptr_t factory_transDtD,
const mat_sym_nonsing_fcty_ptr_t factory_S,
const mat_fcty_ptr_t factory_D = Teuchos::null 
)

Initialize.

Parameters:
space_x [in] Smart pointer to vector space for x.
var_dep [in] Range for dependent variables xD.
var_indep [in] Range for independent variables xI.
factory_C [in] Smart pointer to factory object for basis matrix C.
factory_transDtD [in] Smart point to the factory object for the matrix J = D'*D. Only valid if var_dep.size() < space_x->dim().
factory_S [in] Smart point to the factory object for the matrix S = I + D'*D. Only valid if var_dep.size() < space_x->dim().
factory_D [in] Smart pointer to factory object for direct sensitivity matrix D. If factory_D == NULL then an AbstractFactoryStd<> object will be used which calls space_xD->create_members(space_xI->dim()). which in turn of course creates MultiVectorMutable objects. Only valid if var_dep.size() < space_x->dim().
Preconditions:

Postconditions:

Definition at line 317 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::set_uninitialized (  )  [virtual]

Set uninitialized.

Postconditions:

Definition at line 368 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

const VectorSpace::space_ptr_t & AbstractLinAlgPack::BasisSystemComposite::space_x (  )  const

Definition at line 380 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

const VectorSpace::space_ptr_t & AbstractLinAlgPack::BasisSystemComposite::space_c (  )  const

Definition at line 386 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::update_D ( const MatrixOpNonsing C,
const MatrixOp N,
MatrixOp D,
EMatRelations  mat_rel 
) const [virtual]

Overridden by subclasses to update D if a specialized implementation is needed.

The default implementation just relies on the MultiVectorMutable interface and the M_StInvMtV() method.

Definition at line 393 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

const BasisSystem::mat_nonsing_fcty_ptr_t AbstractLinAlgPack::BasisSystemComposite::factory_C (  )  const [virtual]

Implements AbstractLinAlgPack::BasisSystem.

Definition at line 407 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

const BasisSystem::mat_fcty_ptr_t AbstractLinAlgPack::BasisSystemComposite::factory_D (  )  const [virtual]

Implements AbstractLinAlgPack::BasisSystem.

Definition at line 413 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

Range1D AbstractLinAlgPack::BasisSystemComposite::var_dep (  )  const [virtual]

Implements AbstractLinAlgPack::BasisSystem.

Definition at line 418 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

Range1D AbstractLinAlgPack::BasisSystemComposite::var_indep (  )  const [virtual]

Implements AbstractLinAlgPack::BasisSystem.

Definition at line 423 of file AbstractLinAlgPack_BasisSystemComposite.cpp.

void AbstractLinAlgPack::BasisSystemComposite::update_basis ( const MatrixOp Gc,
MatrixOpNonsing C,
MatrixOp D,
MatrixOp GcUP,
EMatRelations  mat_rel,
std::ostream *  out 
) const

Definition at line 428 of file AbstractLinAlgPack_BasisSystemComposite.cpp.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:31:45 2010 for AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects by  doxygen 1.4.7