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

#include <dgeequ.h>

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

Public Member Functions

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

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 RowSumMatrixScale< T >

Definition at line 93 of file dgeequ.h.

Constructor & Destructor Documentation

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

Definition at line 368 of file dgeequ.h.

369  :MatrixScale<T>(scale)
370 {
371 
372 }
template<typename T >
RowSumMatrixScale< T >::~RowSumMatrixScale ( )
virtual

Definition at line 375 of file dgeequ.h.

376 {
377 
378 }

Member Function Documentation

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

Implements MatrixScale< T >.

Definition at line 381 of file dgeequ.h.

References MatrixScaleBase::PrepareRows().

382 {
383  integer nrows;
384 
385  MatrixScaleBase::PrepareRows(mh, nrows);
386 
387  if (normRow.empty()) {
388  normRow.resize(nrows, 0.);
389  } else {
390  std::fill(normRow.begin(), normRow.end(), 0.);
391  }
392 
393  for (typename T::const_iterator i = mh.begin(); i != mh.end(); ++i) {
394  normRow[i->iRow] += std::abs(i->dCoef);
395  }
396 
397  for (int i = 0; i < nrows; ++i) {
398  rowScale[i] = 1. / normRow[i];
399  }
400 
401  return true;
402 }
std::vector< doublereal > rowScale
Definition: dgeequ.h:68
std::vector< doublereal > normRow
Definition: dgeequ.h:104
void PrepareRows(const MatrixHandler &mh, integer &nrows)
Definition: dgeequ.cc:82
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

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

Implements MatrixScaleBase.

Definition at line 405 of file dgeequ.h.

406 {
407  return os;
408 }

Member Data Documentation

template<typename T >
std::vector<doublereal> RowSumMatrixScale< T >::normRow
private

Definition at line 104 of file dgeequ.h.


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