MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ColMaxMatrixScale< T > Class Template Reference

#include <dgeequ.h>

Inheritance diagram for ColMaxMatrixScale< T >:
Collaboration diagram for ColMaxMatrixScale< T >:

Public Member Functions

 ColMaxMatrixScale (const SolutionManager::ScaleOpt &scale)
 
virtual ~ColMaxMatrixScale ()
 
- Public Member Functions inherited from MatrixScale< T >
 MatrixScale (const SolutionManager::ScaleOpt &scale)
 
virtual ~MatrixScale ()
 
T & ScaleMatrix (T &mh) const
 
bool ComputeScaleFactors (const T &mh)
 
- Public Member Functions inherited from MatrixScaleBase
 MatrixScaleBase (const SolutionManager::ScaleOpt &scale)
 
virtual ~MatrixScaleBase ()
 
VectorHandlerScaleRightHandSide (VectorHandler &bVH) const
 
VectorHandlerScaleSolution (VectorHandler &xVH) const
 
std::ostream & Report (std::ostream &os) const
 
const std::vector< doublereal > & GetRowScale () const
 
const std::vector< doublereal > & GetColScale () const
 
bool bGetInitialized () const
 

Protected Member Functions

virtual bool ComputeScaleFactors (const T &mh, std::vector< doublereal > &rowScale, std::vector< doublereal > &colScale)
 
virtual std::ostream & vReport (std::ostream &os) const
 
- Protected Member Functions inherited from MatrixScaleBase
MatrixHandler::Norm_t GetCondNumNorm () const
 
void Prepare (const MatrixHandler &mh, integer &nrows, integer &ncols)
 
void PrepareRows (const MatrixHandler &mh, integer &nrows)
 
void PrepareCols (const MatrixHandler &mh, integer &ncols)
 
bool bReport () const
 

Private Attributes

std::vector< doublerealnormCol
 

Additional Inherited Members

- Static Public Member Functions inherited from MatrixScale< T >
static MatrixScale< T > * Allocate (const SolutionManager::ScaleOpt &scale)
 
- Protected Attributes inherited from MatrixScaleBase
std::vector< doublerealrowScale
 
std::vector< doublerealcolScale
 
doublereal dCondBefore
 
doublereal dCondAfter
 
const unsigned uFlags
 
bool bOK
 

Detailed Description

template<typename T>
class ColMaxMatrixScale< T >

Definition at line 138 of file dgeequ.h.

Constructor & Destructor Documentation

template<typename T >
ColMaxMatrixScale< T >::ColMaxMatrixScale ( const SolutionManager::ScaleOpt scale)
inline

Definition at line 501 of file dgeequ.h.

502  :MatrixScale<T>(scale)
503 {
504 
505 }
template<typename T >
ColMaxMatrixScale< T >::~ColMaxMatrixScale ( )
virtual

Definition at line 508 of file dgeequ.h.

509 {
510 
511 }

Member Function Documentation

template<typename T >
bool ColMaxMatrixScale< T >::ComputeScaleFactors ( const T &  mh,
std::vector< doublereal > &  rowScale,
std::vector< doublereal > &  colScale 
)
protectedvirtual

Implements MatrixScale< T >.

Definition at line 514 of file dgeequ.h.

References MatrixScaleBase::PrepareCols().

515 {
516  integer ncols;
517 
518  MatrixScaleBase::PrepareCols(mh, ncols);
519 
520  if (normCol.empty()) {
521  normCol.resize(ncols, 0.);
522  } else {
523  std::fill(normCol.begin(), normCol.end(), 0.);
524  }
525 
526  for (typename T::const_iterator i = mh.begin(); i != mh.end(); ++i) {
527  const doublereal d = std::abs(i->dCoef);
528 
529  if (d > normCol[i->iCol]) {
530  normCol[i->iCol] = d;
531  }
532  }
533 
534  for (int i = 0; i < ncols; ++i) {
535  colScale[i] = 1. / normCol[i];
536  }
537 
538  return true;
539 }
std::vector< doublereal > colScale
Definition: dgeequ.h:68
void PrepareCols(const MatrixHandler &mh, integer &ncols)
Definition: dgeequ.cc:104
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
std::vector< doublereal > normCol
Definition: dgeequ.h:149

Here is the call graph for this function:

template<typename T >
std::ostream & ColMaxMatrixScale< T >::vReport ( std::ostream &  os) const
protectedvirtual

Implements MatrixScaleBase.

Definition at line 542 of file dgeequ.h.

543 {
544  return os;
545 }

Member Data Documentation

template<typename T >
std::vector<doublereal> ColMaxMatrixScale< T >::normCol
private

Definition at line 149 of file dgeequ.h.


The documentation for this class was generated from the following file: