Peano
Loading...
Searching...
No Matches
mghype Namespace Reference

This file is part of the multigrid project within Peano 4. More...

Namespaces

namespace  api
 
This file is part of the MGHyPE project within Peano 4.
 
namespace  matrixfree
 

Functions

template<int Rows, int Cols>
tarch::la::Matrix< Rows, Cols, double > composeMatrixFromHWeightedLinearCombination (const std::vector< tarch::la::Matrix< Rows, Cols, double > > &matrices, const std::vector< int > &scaleFactors, const tarch::la::Vector< Dimensions, double > &h)
 Compute a weighted linear combination of matrices.
 
template<int Rows, int Cols>
tarch::la::Vector< Rows, double > applyMatrixFromHWeightedLinearCombination (const std::vector< tarch::la::Matrix< Rows, Cols, double > > &matrices, const std::vector< int > &scaleFactors, const tarch::la::Vector< Dimensions, double > &h, const tarch::la::Vector< Cols, double > &v)
 Apply a series of vectors to another vector.
 

Detailed Description

This file is part of the multigrid project within Peano 4.

For conditions of distribution and use, please see the copyright notice at www.peano-framework.org

Function Documentation

◆ applyMatrixFromHWeightedLinearCombination()

template<int Rows, int Cols>
tarch::la::Vector< Rows, double > mghype::applyMatrixFromHWeightedLinearCombination ( const std::vector< tarch::la::Matrix< Rows, Cols, double > > & matrices,
const std::vector< int > & scaleFactors,
const tarch::la::Vector< Dimensions, double > & h,
const tarch::la::Vector< Cols, double > & v )

Apply a series of vectors to another vector.

Compute

\( r = \sum _i h^{s_i} M_i v \)

which is the standard operation that we need in any multigrid code. The \( s_i \) from above are from scaleFactors, while the \( M_i \) are the elements from matrices.

◆ composeMatrixFromHWeightedLinearCombination()

template<int Rows, int Cols>
tarch::la::Matrix< Rows, Cols, double > mghype::composeMatrixFromHWeightedLinearCombination ( const std::vector< tarch::la::Matrix< Rows, Cols, double > > & matrices,
const std::vector< int > & scaleFactors,
const tarch::la::Vector< Dimensions, double > & h )

Compute a weighted linear combination of matrices.

See also
applyMatrixFromHWeightedLinearCombination() for a description of the arguments.