#include <LSProblem.H>
Public Member Functions | |
~LSProblem () | |
LSProblem (const int &a_degreeP, const bool &a_useConstraints) | |
LSProblem (const int &a_orderAccuracy, const int &a_degreeP, const bool &a_useConstraints, const IndexTM< Real, dim > &a_normal) | |
void | invertNormalEq (const Vector< Real > &a_rhs, Vector< Real > &a_residual) |
int | getDegree () |
int | getOrderAccuracy () |
void | getMatrix (Real **a_matrix) |
void | getRhs (Vector< Real > &a_rhs) |
void | getUnknowns (Vector< Real > &a_unknown) |
void | computeBounds (const IndexTM< Real, dim > &a_dx, const CutCellMoments< dim > &a_ccm) |
void | print (ostream &out) const |
void | outputMatrix () const |
void | outputRhs () const |
void | outputUnknowns () const |
const LocPthMoment & | getLocMonomialMapDegreeP () const |
const PthMomentLoc & | getMonomialLocMapDegreeP () const |
const PthMomentLoc & | getMonomialLocMapDegreePLess1 () const |
Real | getUnknown (int loc) |
int | getNumberDegP () |
int | getNumberDegPLess1 () |
Private Types | |
typedef IndexTM< int, dim > | IvDim |
typedef map< IvDim, int, LexLT < IvDim > > | PthMomentLoc |
typedef map< int, IvDim > | LocPthMoment |
Private Member Functions | |
void | setRhs (const Vector< Real > &a_rhs) |
void | setMatrix () |
void | momentBounds (Real &lobnd, Real &hibnd, const IvDim &mono, const IndexTM< Real, dim > &a_dx) |
void | differentiate (int &a_coeff, IvDim &a_Dmono, int &a_idir, const IvDim &a_mono) |
int | nChooseR (int n, int r) |
void | fillMap (PthMomentLoc &m_monoLoc, LocPthMoment &m_locMono, const int &a_degree) |
int | numMonomials (const int &a_monoDegree) |
int | factorial (const int &a_n, const int &a_m=0) |
void | allocArray (const int &rows, const int &cols, Real **&A) |
void | freeArray (const int &rows, const int &cols, Real **&A) |
Private Attributes | |
int | m_order |
int | m_degreeP |
bool | m_useConstraints |
IndexTM< Real, dim > | m_normal |
PthMomentLoc | m_monoLocP |
LocPthMoment | m_locMonoP |
int | m_numP |
PthMomentLoc | m_monoLocPLess1 |
LocPthMoment | m_locMonoPLess1 |
int | m_numPLess1 |
Real ** | m_matrix |
Vector< Real > | m_unknowns |
Vector< Real > | m_rhs |
Real * | m_constraintVec |
Real ** | m_constraintMat |
int | m_nInequality |
typedef map<int,IvDim> LSProblem< dim >::LocPthMoment [private] |
LSProblem< dim >::LSProblem | ( | const int & | a_degreeP, | |
const bool & | a_useConstraints | |||
) | [inline] |
References LSProblem< dim >::fillMap(), LSProblem< dim >::m_constraintMat, LSProblem< dim >::m_constraintVec, LSProblem< dim >::m_degreeP, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_matrix, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, and LSProblem< dim >::numMonomials().
LSProblem< dim >::LSProblem | ( | const int & | a_orderAccuracy, | |
const int & | a_degreeP, | |||
const bool & | a_useConstraints, | |||
const IndexTM< Real, dim > & | a_normal | |||
) | [inline] |
References dim, LSProblem< dim >::fillMap(), LSProblem< dim >::m_constraintMat, LSProblem< dim >::m_constraintVec, LSProblem< dim >::m_degreeP, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, LSProblem< dim >::m_rhs, LSProblem< dim >::m_unknowns, LSProblem< dim >::numMonomials(), and LSProblem< dim >::setMatrix().
void LSProblem< dim >::invertNormalEq | ( | const Vector< Real > & | a_rhs, | |
Vector< Real > & | a_residual | |||
) | [inline] |
References Abs(), dim, i, j, ConstrainedLS::LeastSquares(), LSquares::LeastSquares(), LSProblem< dim >::m_constraintMat, LSProblem< dim >::m_constraintVec, LSProblem< dim >::m_matrix, LSProblem< dim >::m_nInequality, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, LSProblem< dim >::m_rhs, LSProblem< dim >::m_unknowns, LSProblem< dim >::m_useConstraints, and Vector< T >::resize().
Referenced by CutCellMoments< dim >::computeMoments().
References LSProblem< dim >::m_degreeP.
References LSProblem< dim >::m_order.
void LSProblem< dim >::computeBounds | ( | const IndexTM< Real, dim > & | a_dx, | |
const CutCellMoments< dim > & | a_ccm | |||
) | [inline] |
References MayDay::Abort(), LSProblem< dim >::allocArray(), dim, CutCellMoments< dim >::getBdCutCellMoments(), LSProblem< dim >::m_constraintMat, LSProblem< dim >::m_constraintVec, LSProblem< dim >::m_degreeP, CutCellMoments< dim >::m_EBmoments, CutCellMoments< dim >::m_iFData, CutCellMoments< dim >::m_moments, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_nInequality, LSProblem< dim >::m_numP, LSProblem< dim >::m_numPLess1, Max(), Min(), LSProblem< dim >::momentBounds(), pout(), VolMoment, and IndexTM< T, N >::Zero.
Referenced by CutCellMoments< dim >::computeMoments().
References dim, i, j, LSProblem< dim >::m_locMonoP, LSProblem< dim >::m_locMonoPLess1, LSProblem< dim >::m_matrix, and pout().
Referenced by LSProblem< dim >::print().
const LocPthMoment& LSProblem< dim >::getLocMonomialMapDegreeP | ( | ) | const [inline] |
const PthMomentLoc& LSProblem< dim >::getMonomialLocMapDegreeP | ( | ) | const [inline] |
References LSProblem< dim >::m_monoLocP.
Referenced by CutCellMoments< dim >::addBdMoments(), and CutCellMoments< dim >::computeMoments().
const PthMomentLoc& LSProblem< dim >::getMonomialLocMapDegreePLess1 | ( | ) | const [inline] |
References LSProblem< dim >::m_monoLocPLess1.
Referenced by CutCellMoments< dim >::addBdMoments(), and CutCellMoments< dim >::computeMoments().
References LSProblem< dim >::m_numP.
Referenced by CutCellMoments< dim >::computeMoments(), and CutCellMoments< dim >::computeRhs().
References LSProblem< dim >::m_numPLess1.
References MayDay::Abort(), LSProblem< dim >::allocArray(), LSProblem< dim >::differentiate(), dim, LARGEINTVAL, LSProblem< dim >::m_matrix, LSProblem< dim >::m_monoLocP, LSProblem< dim >::m_monoLocPLess1, LSProblem< dim >::m_normal, LSProblem< dim >::m_numP, and LSProblem< dim >::m_numPLess1.
Referenced by LSProblem< dim >::LSProblem().
void LSProblem< dim >::momentBounds | ( | Real & | lobnd, | |
Real & | hibnd, | |||
const IvDim & | mono, | |||
const IndexTM< Real, dim > & | a_dx | |||
) | [inline, private] |
References dim, j, LSProblem< dim >::nChooseR(), Vector< T >::push_back(), and Vector< T >::size().
Referenced by LSProblem< dim >::computeBounds().
void LSProblem< dim >::fillMap | ( | PthMomentLoc & | m_monoLoc, | |
LocPthMoment & | m_locMono, | |||
const int & | a_degree | |||
) | [inline, private] |
References dim, LSProblem< dim >::factorial(), and LARGEINTVAL.
Referenced by LSProblem< dim >::LSProblem().
void LSProblem< dim >::allocArray | ( | const int & | rows, | |
const int & | cols, | |||
Real **& | A | |||
) | [inline, private] |
Referenced by LSProblem< dim >::computeBounds(), and LSProblem< dim >::setMatrix().
Referenced by LSProblem< dim >::getOrderAccuracy().
bool LSProblem< dim >::m_useConstraints [private] |
Referenced by LSProblem< dim >::invertNormalEq().
Referenced by LSProblem< dim >::setMatrix().
PthMomentLoc LSProblem< dim >::m_monoLocP [private] |
LocPthMoment LSProblem< dim >::m_locMonoP [private] |
PthMomentLoc LSProblem< dim >::m_monoLocPLess1 [private] |
LocPthMoment LSProblem< dim >::m_locMonoPLess1 [private] |
Referenced by LSProblem< dim >::LSProblem(), LSProblem< dim >::outputMatrix(), and LSProblem< dim >::print().
int LSProblem< dim >::m_numPLess1 [private] |
Vector<Real> LSProblem< dim >::m_unknowns [private] |
Referenced by LSProblem< dim >::invertNormalEq(), LSProblem< dim >::LSProblem(), and LSProblem< dim >::outputRhs().
Real* LSProblem< dim >::m_constraintVec [private] |
Real** LSProblem< dim >::m_constraintMat [private] |
int LSProblem< dim >::m_nInequality [private] |