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

#include <dgeequ.h>

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

Public Member Functions

 ColSumMatrixScale (const SolutionManager::ScaleOpt &scale)
 
virtual ~ColSumMatrixScale ()
 
- 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 ColSumMatrixScale< T >

Definition at line 123 of file dgeequ.h.

Constructor & Destructor Documentation

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

Definition at line 458 of file dgeequ.h.

459  :MatrixScale<T>(scale)
460 {
461 
462 }
template<typename T >
ColSumMatrixScale< T >::~ColSumMatrixScale ( )
virtual

Definition at line 465 of file dgeequ.h.

466 {
467 
468 }

Member Function Documentation

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

Implements MatrixScale< T >.

Definition at line 471 of file dgeequ.h.

References MatrixScaleBase::PrepareCols().

472 {
473  integer ncols;
474 
475  MatrixScaleBase::PrepareCols(mh, ncols);
476 
477  if (normCol.empty()) {
478  normCol.resize(ncols, 0.);
479  } else {
480  std::fill(normCol.begin(), normCol.end(), 0.);
481  }
482 
483  for (typename T::const_iterator i = mh.begin(); i != mh.end(); ++i) {
484  normCol[i->iCol] += std::abs(i->dCoef);
485  }
486 
487  for (int i = 0; i < ncols; ++i) {
488  colScale[i] = 1. / normCol[i];
489  }
490 
491  return true;
492 }
std::vector< doublereal > colScale
Definition: dgeequ.h:68
void PrepareCols(const MatrixHandler &mh, integer &ncols)
Definition: dgeequ.cc:104
std::vector< doublereal > normCol
Definition: dgeequ.h:134
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements MatrixScaleBase.

Definition at line 495 of file dgeequ.h.

496 {
497  return os;
498 }

Member Data Documentation

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

Definition at line 134 of file dgeequ.h.


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