basso::Solver< KMAT > Class Template Reference

Base class for linear solvers. More...

#include <Solver.h>

List of all members.

Public Types

typedef KMAT matrix_type

Public Member Functions

 Solver (KMAT &K, nArray &f)
int NumEquations () const
virtual int Solve (nArray &d)=0
template<class INDX>
int SolveConstrained (nArray &d, INDX &ifix)
int SolveConstrained (nArray &d, iArray &ifix, nArray &ival)
virtual void GetReactionForces (const nArray &d, nArray &freac)
bool Solved () const

Protected Member Functions

template<class INDX>
void GetReactionMatrix (const INDX &ifix)
template<class INDX>
void SetConstraintsOnMatrix (const INDX &ifix)
template<class INDX>
void SetConstraintsOnF (const INDX &ifix)
template<class INDX>
void SetConstraintsOnF (const INDX &ifix, nArray &ival)

Protected Attributes

KMAT * Kptr
nArray * fptr
KMAT Kreac
Numeric wt
bool solved


Detailed Description

template<class KMAT>
class basso::Solver< KMAT >

Base class for linear solvers.

This class is templated so that it can serve for various system matricies

Definition at line 25 of file Solver.h.


Member Function Documentation

template<class KMAT>
int basso::Solver< KMAT >::NumEquations (  )  const [inline]

returns the number of equations in the system

Definition at line 38 of file Solver.h.

Referenced by basso::Solver< KMAT >::SetConstraintsOnF(), and basso::Solver< KMAT >::SetConstraintsOnMatrix().

template<class KMAT>
virtual int basso::Solver< KMAT >::Solve ( nArray &  d  )  [pure virtual]

solves the system. The solution is returned in

Parameters:
d if the solution is succesful zero is returned, if not the unity is returned.

Implemented in basso::SuperLUSolverCSR.

Referenced by basso::Solver< KMAT >::SolveConstrained().

template<class KMAT>
template<class INDX>
int basso::Solver< KMAT >::SolveConstrained ( nArray &  d,
INDX &  ifix 
) [inline]

Solves the system with the constraints d(ifix)=0

Definition at line 143 of file Solver.h.

References basso::Solver< KMAT >::GetReactionMatrix(), basso::Solver< KMAT >::SetConstraintsOnF(), basso::Solver< KMAT >::SetConstraintsOnMatrix(), and basso::Solver< KMAT >::Solve().

template<class KMAT>
int basso::Solver< KMAT >::SolveConstrained ( nArray &  d,
iArray &  ifix,
nArray &  ival 
) [inline]

Solves the system with the constraints d(ifix)=ival

Definition at line 152 of file Solver.h.

References basso::Solver< KMAT >::GetReactionMatrix(), basso::Solver< KMAT >::SetConstraintsOnF(), basso::Solver< KMAT >::SetConstraintsOnMatrix(), and basso::Solver< KMAT >::Solve().

template<class KMAT>
virtual void basso::Solver< KMAT >::GetReactionForces ( const nArray &  d,
nArray &  freac 
) [inline, virtual]

Computes the reaction forces for the constrained system with the solution given in

Parameters:
d. 

Definition at line 54 of file Solver.h.

template<class KMAT>
bool basso::Solver< KMAT >::Solved (  )  const [inline]

Returns true if the system has been solved, else false

Definition at line 58 of file Solver.h.

template<class KMAT>
template<class INDX>
void basso::Solver< KMAT >::GetReactionMatrix ( const INDX &  ifix  )  [inline, protected]

Gets the reaction matrix for constraints on ifix

Definition at line 88 of file Solver.h.

References basso::Solver< KMAT >::Kptr, and basso::Solver< KMAT >::Kreac.

Referenced by basso::Solver< KMAT >::SolveConstrained().

template<class KMAT>
template<class INDX>
void basso::Solver< KMAT >::SetConstraintsOnMatrix ( const INDX &  ifix  )  [inline, protected]

Modifies the matrix so that the constraints on ifix are imposed

Definition at line 105 of file Solver.h.

References basso::Solver< KMAT >::NumEquations(), and basso::Solver< KMAT >::wt.

Referenced by basso::Solver< KMAT >::SolveConstrained().

template<class KMAT>
template<class INDX>
void basso::Solver< KMAT >::SetConstraintsOnF ( const INDX &  ifix  )  [inline, protected]

Modifies the RHS vector so that homogeious constraints on ifix are imposed

Definition at line 123 of file Solver.h.

References basso::Solver< KMAT >::fptr.

Referenced by basso::Solver< KMAT >::SolveConstrained().

template<class KMAT>
template<class INDX>
void basso::Solver< KMAT >::SetConstraintsOnF ( const INDX &  ifix,
nArray &  ival 
) [inline, protected]

Modifies the RHS vector so that inhomogeionus constraints on ifix are imposed

Definition at line 131 of file Solver.h.

References basso::Solver< KMAT >::fptr, basso::Solver< KMAT >::Kptr, basso::Solver< KMAT >::NumEquations(), and basso::Solver< KMAT >::wt.


The documentation for this class was generated from the following file:
Generated on Sat Jan 19 09:03:59 2008 for Basso by  doxygen 1.5.2