|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Here we show some simple examples of using code in the Thyra package with an example linear ANA algorithm for the power method for estimating the dominate eigen value of a matrix. More...
|
Modules | |
| Templated Serial Implementation of the Power Method | |
Here is an example program that shows the use of the example serial templated matrix class | |
Functions | |
| template<class Scalar > | |
| bool | sillyPowerMethod (const Thyra::LinearOpBase< Scalar > &A, const int maxNumIters, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType tolerance, const Teuchos::Ptr< Scalar > &lambda, std::ostream &out) |
| Silly little example power method abstract numerical algorithm (ANA). | |
Here we show some simple examples of using code in the Thyra package with an example linear ANA algorithm for the power method for estimating the dominate eigen value of a matrix.
These example programs are meant to mimic the power method example program shown in the Epetra documentation.
The power method ANA is implemented in the function sillyPowerMethod() and its implementation is shown below:
The above templated function sillyPowerMethod() is used in the following various example implementations which use several different scalar types:
| bool sillyPowerMethod | ( | const Thyra::LinearOpBase< Scalar > & | A, |
| const int | maxNumIters, | ||
| const typename Teuchos::ScalarTraits< Scalar >::magnitudeType | tolerance, | ||
| const Teuchos::Ptr< Scalar > & | lambda, | ||
| std::ostream & | out | ||
| ) |
Silly little example power method abstract numerical algorithm (ANA).
This little function is just a silly little ANA that implements the power method for estimating the dominate eigenvalue for a matrix using the foundational Thyra operator/vector interfaces.
This function is small and is meant to be looked at so study its implementation by clicking on the below link to its definition.
Definition at line 48 of file sillyPowerMethod.hpp.
References Thyra::apply(), Thyra::VectorSpaceBase< Scalar >::createMember(), Thyra::LinearOpBase< Scalar >::domain(), Thyra::VectorBase< Scalar >::norm(), Thyra::NOTRANS, Thyra::randomize(), Thyra::LinearOpBase< Scalar >::range(), Thyra::VectorBase< Scalar >::scalarProd(), Thyra::VectorBase< Scalar >::V_StV(), and Thyra::MultiVectorBase< Scalar >::V_StVpV().
Referenced by runPowerMethodExample().
1.7.4